[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANhJrGOh+9PoMmsv-Q9petTV-hv9rv9nOitg0NCQHqXVXzJvvw@mail.gmail.com>
Date: Thu, 19 Aug 2021 08:34:22 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: kernel test robot <yujie.liu@...el.com>
Cc: Cristian Marussi <cristian.marussi@....com>,
clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>
Subject: Re: [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning:
Excessive padding in 'struct bd718xx_regulator_data' (8 padding bytes, where
0 is optimal).
Hi,
On Thu, Aug 19, 2021 at 6:26 AM kernel test robot <yujie.liu@...el.com> wrote:
> >> drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive
> padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is
> optimal).
> Optimal fields order:
> dvs,
> additional_inits,
> additional_init_amnt,
> init,
> desc,
> consider reordering the fields or adding explicit padding members
> [clang-analyzer-optin.performance.Padding]
> struct bd718xx_regulator_data {
> ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/regulator/bd718x7-regulator.c:531:8: note: Excessive padding
> in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is
> optimal). Optimal fields order: dvs, additional_inits,
> additional_init_amnt, init, desc, consider reordering the fields or
> adding explicit padding members
> struct bd718xx_regulator_data {
> ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
I don't have a good feeling about these checks. Especially when a
struct is composed of other structs - which may be modified
independently of the code we are looking at here. Any unrelated
addition of a member to any of the structs (well, maybe not the one at
the bottom). I guess fixing all the users of these structs when
something changes would cause quite a churn of changes... What is
expected to be done as a result from these mails?
Best Regards
-- Matti
Powered by blists - more mailing lists