All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [gustavoars:testing/wfamnae-next20240710-cbc 1/13] drivers/leds/leds-cros_ec.c:70:40: warning: structure containing a flexible array member is not at the end of another structure
Date: Fri, 12 Jul 2024 12:19:02 +0800	[thread overview]
Message-ID: <ZpCuthsR28hPyodY@rli9-mobl> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20240710-cbc
head:   73efb8d9b6a2ba4b07021861a1760ec742ddf432
commit: d692eacf807861f523e66bd7d1c60f5dc254f4c6 [1/13] Makefile: Enable -Wflex-array-member-not-at-end globally
:::::: branch date: 8 hours ago
:::::: commit date: 9 hours ago
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240711/202407112258.ZvWw5uJq-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240711/202407112258.ZvWw5uJq-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202407112258.ZvWw5uJq-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/leds/leds-cros_ec.c: In function 'cros_ec_led_send_cmd':
>> drivers/leds/leds-cros_ec.c:70:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      70 |                 struct cros_ec_command msg;
         |                                        ^~~


vim +70 drivers/leds/leds-cros_ec.c

8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  64  
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  65  static int cros_ec_led_send_cmd(struct cros_ec_device *cros_ec,
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  66  				union cros_ec_led_cmd_data *arg)
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  67  {
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  68  	int ret;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  69  	struct {
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13 @70  		struct cros_ec_command msg;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  71  		union cros_ec_led_cmd_data data;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  72  	} __packed buf = {
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  73  		.msg = {
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  74  			.version = 1,
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  75  			.command = EC_CMD_LED_CONTROL,
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  76  			.insize  = sizeof(arg->resp),
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  77  			.outsize = sizeof(arg->req),
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  78  		},
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  79  		.data.req = arg->req
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  80  	};
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  81  
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  82  	ret = cros_ec_cmd_xfer_status(cros_ec, &buf.msg);
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  83  	if (ret < 0)
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  84  		return ret;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  85  
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  86  	arg->resp = buf.data.resp;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  87  
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  88  	return 0;
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  89  }
8d6ce6f3ec9d5f Thomas Weißschuh 2024-06-13  90  

:::::: The code at line 70 was first introduced by commit
:::::: 8d6ce6f3ec9d5f384e3eac92e43cfeac7a36e6b1 leds: Add ChromeOS EC driver

:::::: TO: Thomas Weißschuh <linux@weissschuh.net>
:::::: CC: Lee Jones <lee@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


             reply	other threads:[~2024-07-12  4:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  4:19 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-11 14:07 [gustavoars:testing/wfamnae-next20240710-cbc 1/13] drivers/leds/leds-cros_ec.c:70:40: warning: structure containing a flexible array member is not at the end of another structure 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=ZpCuthsR28hPyodY@rli9-mobl \
    --to=lkp@intel.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.