[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZS206TuYnhE3PozK@ashyti-mobl2.lan>
Date: Tue, 17 Oct 2023 00:10:49 +0200
From: Andi Shyti <andi.shyti@...ux.intel.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Badal Nilawar <badal.nilawar@...el.com>,
Ashutosh Dixit <ashutosh.dixit@...el.com>,
Arnd Bergmann <arnd@...db.de>, intel-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Matt Roper <matthew.d.roper@...el.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/mtl: avoid stringop-overflow warning
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 res_reg[INTEL_RC6_RES_MAX] = {
> + [0 ... INTEL_RC6_RES_MAX - 1] = INVALID_MMIO_REG,
> + };
This is basically a
i915_reg_t res_reg[INTEL_RC6_RES_MAX] = { };
Don't know which one is clearer.
Andi
Powered by blists - more mailing lists