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

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

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

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

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

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

2023-10-16 Thread Arnd Bergmann
On Tue, Oct 17, 2023, at 00:10, Andi Shyti wrote: > Hi Arnd, > >> static void rc6_res_reg_init(struct intel_rc6 *rc6) >> { >> -memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); > > This is a complex initialization, indeed... how about just > >memset(rc6->res_reg, 0,

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

2023-10-16 Thread Andi Shyti
Hi Arnd, > static void rc6_res_reg_init(struct intel_rc6 *rc6) > { > - memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); This is a complex initialization, indeed... how about just memset(rc6->res_reg, 0, sizeof(rc6->res_reg)); > + i915_reg_t

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

2023-10-16 Thread Arnd Bergmann
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_reg_init', inlined from 'intel_rc6_init' at