linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>
Cc: <clang-built-linux@googlegroups.com>, <kbuild-all@lists.01.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.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).
Date: Thu, 19 Aug 2021 22:49:13 +0800	[thread overview]
Message-ID: <422ade1b-8e88-d6dc-ae4e-799e729932b7@intel.com> (raw)
In-Reply-To: <CANhJrGOh+9PoMmsv-Q9petTV-hv9rv9nOitg0NCQHqXVXzJvvw@mail.gmail.com>

Hi,

On 8/19/2021 1:34 PM, Matti Vaittinen wrote:
> 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
> 

Sorry for bothering, we'll ignore struct padding warnings next time.

Best Regards,
Yujie Liu

  parent reply	other threads:[~2021-08-19 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202108172206.9cbgvI53-lkp@intel.com>
2021-08-19  3:24 ` [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is optimal) kernel test robot
2021-08-19  5:34   ` Matti Vaittinen
2021-08-19 11:37     ` Mark Brown
2021-08-19 14:49     ` kernel test robot [this message]
2021-08-19 15:23       ` Mark Brown
2021-08-21  4:38         ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=422ade1b-8e88-d6dc-ae4e-799e729932b7@intel.com \
    --to=yujie.liu@intel.com \
    --cc=broonie@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=cristian.marussi@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).