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: [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