Arnd Bergmann
9b0cebc70d
drm/i915/mtl: avoid stringop-overflow warning
...
[ Upstream commit 390001d648 ]
The newly added memset() causes a warning for some reason I could not
figure out:
In file included from arch/x86/include/asm/string.h:3,
from drivers/gpu/drm/i915/gt/intel_rc6.c:6:
In function 'rc6_res_reg_init',
inlined from 'intel_rc6_init' at drivers/gpu/drm/i915/gt/intel_rc6.c:610:2:
arch/x86/include/asm/string_32.h:195:29: error: '__builtin_memset' writing 16 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
195 | #define memset(s, c, count) __builtin_memset(s, c, count)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_rc6.c:584:9: note: in expansion of macro 'memset'
584 | memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg));
| ^~~~~~
In function 'intel_rc6_init':
Change it to an normal initializer and an added memcpy() that does not have
this problem.
Fixes: 4bb9ca7ee0 ("drm/i915/mtl: C6 residency and C state type for MTL SAMedia")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20231016201012.1022812-1-arnd@kernel.org
(cherry picked from commit 0520b30b21 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-28 17:19:48 +00:00
..
2023-09-26 13:58:16 -04:00
2023-07-24 17:24:35 +02:00
2022-01-11 14:03:25 -08:00
2023-05-11 17:38:55 +02:00
2021-11-19 17:38:03 +00:00
2021-03-24 19:30:34 +01:00
2022-12-06 10:52:42 +01:00
2021-03-24 19:30:34 +01:00
2023-10-04 09:00:29 -04:00
2023-07-26 14:35:32 +02:00
2023-07-11 09:21:28 +01:00
2023-05-11 17:38:55 +02:00
2021-03-24 19:30:34 +01:00
2021-03-24 19:30:34 +01:00
2021-07-27 17:31:35 -07:00
2022-07-12 17:44:43 -04:00
2021-07-27 17:31:35 -07:00
2021-07-08 19:43:49 +02:00
2022-02-17 15:42:09 +02:00
2023-05-02 10:22:47 -07:00
2023-05-02 10:22:47 -07:00
2023-05-04 12:11:36 +03:00
2023-09-20 10:55:37 -04:00
2022-10-24 12:12:36 -07:00
2021-07-27 17:31:45 -07:00
2023-08-10 14:14:11 +02:00
2021-10-15 10:37:26 -07:00
2023-01-18 12:29:10 -08:00
2021-10-28 11:02:18 -07:00
2023-08-30 11:32:48 -04:00
2023-04-19 16:04:52 +02:00
2021-03-24 19:30:34 +01:00
2023-01-30 15:48:21 -05:00
2023-09-20 10:55:37 -04:00
2023-01-30 15:48:21 -05:00
2023-07-25 15:31:34 +02:00
2021-03-24 19:30:34 +01:00
2023-06-02 02:46:09 +02:00
2022-06-22 15:52:56 -07:00
2023-09-26 13:58:12 -04:00
2023-07-26 14:35:32 +02:00
2022-11-22 06:02:29 -08:00
2023-02-27 23:22:54 +01:00
2021-04-08 12:46:12 +10:00
2023-06-10 06:33:11 +03:00
2023-01-17 15:28:28 -08:00
2023-03-21 10:09:31 +01:00
2022-03-22 10:08:20 +00:00
2023-08-02 15:41:31 +02:00
2021-09-18 23:33:22 -07:00
2021-09-18 23:33:22 -07:00
2023-07-04 17:12:48 +03:00
2021-05-25 15:14:40 +02:00
2023-10-25 08:44:26 -04:00
2022-11-30 09:06:34 -08:00
2023-05-17 16:20:32 -07:00
2022-03-22 10:08:20 +00:00
2022-09-12 15:23:12 +03:00
2021-03-24 19:30:34 +01:00
2023-06-10 06:32:58 +03:00
2022-08-08 13:14:47 -04:00
2023-02-08 23:51:05 -08:00
2023-08-07 13:49:25 +10:00
2023-06-10 06:33:11 +03:00
2021-09-06 09:31:23 +02:00
2023-07-19 11:28:32 +01:00
2022-03-21 08:37:42 +00:00
2023-02-17 11:50:28 +02:00
2022-10-27 19:14:53 +02:00
2023-08-07 17:14:42 -04:00
2023-08-15 11:53:32 +10:00
2023-08-10 14:14:13 +02:00
2023-08-10 14:14:11 +02:00
2023-05-11 17:38:55 +02:00
2022-03-17 19:51:48 -07:00
2021-03-24 19:30:34 +01:00
2022-09-06 14:51:43 -04:00
2021-03-24 19:30:34 +01:00
2022-01-11 14:03:25 -08:00
2023-09-20 10:55:30 -04:00
2022-10-27 12:35:56 -07:00
2021-06-17 14:23:05 +01:00
2023-07-24 17:24:35 +02:00
2023-05-11 17:38:55 +02:00
2023-04-23 02:11:21 +02:00
2021-09-20 08:23:27 -07:00
2023-08-02 15:56:44 +02:00
2023-03-24 08:43:32 -07:00
2023-11-28 17:19:48 +00:00
2023-03-24 08:43:32 -07:00
2023-07-25 18:18:29 +02:00
2022-02-18 22:31:46 -08:00
2022-12-06 10:52:42 +01:00
2021-06-17 14:22:59 +01:00
2023-02-27 23:22:54 +01:00
2023-08-07 13:49:25 +10:00
2022-11-04 13:45:45 -07:00
2023-07-24 17:24:35 +02:00
2021-03-24 19:30:34 +01:00
2023-08-10 14:14:11 +02:00
2021-06-17 14:23:05 +01:00
2023-02-27 23:22:54 +01:00
2023-08-07 13:49:25 +10:00
2023-07-19 11:28:28 +01:00
2023-07-04 17:12:48 +03:00
2022-09-12 15:23:12 +03:00
2022-06-02 07:20:59 -07:00
2023-08-07 15:37:06 -07:00
2023-03-13 11:38:05 +02:00
2021-04-08 12:46:12 +10:00
2022-02-14 13:19:37 +02:00
2021-04-08 12:46:12 +10:00
2023-08-02 15:40:11 +02:00
2023-08-02 15:40:11 +02:00
2022-11-14 10:11:47 -08:00
2022-11-14 10:11:47 -08:00
2022-11-10 12:35:46 +00:00
2023-08-07 15:37:06 -07:00
2021-09-20 08:06:36 -07:00
2021-12-21 13:27:29 +01:00
2021-03-24 19:30:34 +01:00
2023-08-10 14:14:11 +02:00
2023-08-07 13:49:25 +10:00
2021-12-17 21:50:06 -08:00
2021-07-27 17:32:23 -07:00
2023-05-03 12:56:10 +02:00
2021-12-17 21:50:06 -08:00
2021-03-24 19:30:34 +01:00
2023-06-01 18:14:53 +02:00
2023-03-03 19:36:33 +05:30
2023-08-10 14:14:11 +02:00
2023-03-06 18:26:30 +02:00
2021-03-24 19:30:34 +01:00
2023-08-10 14:14:11 +02:00
2023-05-11 17:38:55 +02:00
2023-07-24 17:24:35 +02:00
2023-07-24 17:24:35 +02:00
2021-03-24 19:30:34 +01:00
2023-05-11 17:38:55 +02:00
2022-12-06 10:52:42 +01:00
2023-04-19 15:55:05 +03:00
2023-04-28 09:59:54 -07:00
2023-07-24 17:24:35 +02:00
2023-08-02 15:40:11 +02:00
2023-01-09 14:23:52 +01:00
2023-08-10 14:13:52 +02:00
2022-02-25 15:23:18 -08:00
2023-03-15 12:20:11 +02:00