Re: [kbuild] drivers/regulator/bd718x7-regulator.c:531:8: warning: Excessive padding in 'struct bd718xx_regulator_data' (8 padding bytes, where 0 is optimal).

From: kernel test robot
Date: Sat Aug 21 2021 - 00:39:05 EST


Hi Mark,

On 8/19/2021 11:23 PM, Mark Brown wrote:
On Thu, Aug 19, 2021 at 10:49:13PM +0800, kernel test robot wrote:

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

I think the warnings are useful, it's just that they're not important
for all structs. If the struct was getting allocated a lot it could be
pointing out an issue that makes a real difference. I'm not sure it s
realistic for automation to figure it out for itself so it's better to
send them even if they get ignored a lot.


It's not very practical for automation to figure out how many copies of a struct would be created and how much space would be saved in total by adjusting struct padding.

For similar warnings in the future, we'll make an effort to do manual check first, and send out reports that we think are worthy of notice.

Best Regards,
Yujie Liu