Re: [PATCH] drm/i915/mtl: avoid stringop-overflow warning

2023-10-25 Thread Jani Nikula
On Tue, 24 Oct 2023, Andi Shyti wrote: > Hi Jani, > >> > static void rc6_res_reg_init(struct intel_rc6 *rc6) >> > { >> > - memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); >> >> That's just bollocks. memset() is byte granularity, while >> INVALID_MMIO_REG.reg is u32. If the va

Re: [PATCH] drm/i915/mtl: avoid stringop-overflow warning

2023-10-24 Thread Andi Shyti
Hi Jani, > > static void rc6_res_reg_init(struct intel_rc6 *rc6) > > { > > - memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); > > That's just bollocks. memset() is byte granularity, while > INVALID_MMIO_REG.reg is u32. If the value was anything other than 0, > this would brea

Re: [PATCH] drm/i915/mtl: avoid stringop-overflow warning

2023-10-23 Thread Jani Nikula
On Mon, 16 Oct 2023, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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