lkml.org 
[lkml]   [2021]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@intel.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

\
 
 \ /
  Last update: 2021-08-19 07:35    [W:0.057 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site