All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [hid:for-6.6/nvidia 2/3] drivers/hid/hid-nvidia-shield.c:121:1: sparse: sparse: static assertion failed: "sizeof(enum thunderstrike_charger_type) == 1"
Date: Tue, 15 Aug 2023 18:17:03 +0800	[thread overview]
Message-ID: <202308151816.bcZbOG9c-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "low confidence static check warning: drivers/hid/hid-nvidia-shield.c:121:1: sparse: sparse: static assertion failed: "sizeof(enum thunderstrike_charger_type) == 1""
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-input@vger.kernel.org
TO: Rahul Rameshbabu <rrameshbabu@nvidia.com>
CC: Jiri Kosina <jkosina@suse.cz>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.6/nvidia
head:   77fe1fed4741b14ccf5abf19dc794cc5928c1ac8
commit: 3ab196f882377ed5c2a946cf9f7ede8be4727f44 [2/3] HID: nvidia-shield: Add battery support for Thunderstrike
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230815/202308151816.bcZbOG9c-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230815/202308151816.bcZbOG9c-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/202308151816.bcZbOG9c-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/hid/hid-nvidia-shield.c:104:1: sparse: sparse: static assertion failed: "sizeof(enum thunderstrike_led_state) == 1"
>> drivers/hid/hid-nvidia-shield.c:121:1: sparse: sparse: static assertion failed: "sizeof(enum thunderstrike_charger_type) == 1"
>> drivers/hid/hid-nvidia-shield.c:130:1: sparse: sparse: static assertion failed: "sizeof(enum thunderstrike_charger_state) == 1"
   drivers/hid/hid-nvidia-shield.c:183:1: sparse: sparse: static assertion failed: "sizeof(struct thunderstrike_hostcmd_req_report) == THUNDERSTRIKE_HOSTCMD_REPORT_SIZE"

vim +121 drivers/hid/hid-nvidia-shield.c

09308562d4afb1 Rahul Rameshbabu 2023-06-08   99  
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29  100  enum thunderstrike_led_state {
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29  101  	THUNDERSTRIKE_LED_OFF = 1,
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29  102  	THUNDERSTRIKE_LED_ON = 8,
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29  103  } __packed;
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29 @104  static_assert(sizeof(enum thunderstrike_led_state) == 1);
f88af60e74a5b3 Rahul Rameshbabu 2023-05-29  105  
3ab196f882377e Rahul Rameshbabu 2023-08-07  106  struct thunderstrike_hostcmd_battery {
3ab196f882377e Rahul Rameshbabu 2023-08-07  107  	__le16 voltage_avg;
3ab196f882377e Rahul Rameshbabu 2023-08-07  108  	u8 reserved_at_10;
3ab196f882377e Rahul Rameshbabu 2023-08-07  109  	__le16 thermistor;
3ab196f882377e Rahul Rameshbabu 2023-08-07  110  	__le16 voltage_min;
3ab196f882377e Rahul Rameshbabu 2023-08-07  111  	__le16 voltage_boot;
3ab196f882377e Rahul Rameshbabu 2023-08-07  112  	__le16 voltage_now;
3ab196f882377e Rahul Rameshbabu 2023-08-07  113  	u8 capacity;
3ab196f882377e Rahul Rameshbabu 2023-08-07  114  } __packed;
3ab196f882377e Rahul Rameshbabu 2023-08-07  115  
3ab196f882377e Rahul Rameshbabu 2023-08-07  116  enum thunderstrike_charger_type {
3ab196f882377e Rahul Rameshbabu 2023-08-07  117  	THUNDERSTRIKE_CHARGER_TYPE_NONE = 0,
3ab196f882377e Rahul Rameshbabu 2023-08-07  118  	THUNDERSTRIKE_CHARGER_TYPE_TRICKLE,
3ab196f882377e Rahul Rameshbabu 2023-08-07  119  	THUNDERSTRIKE_CHARGER_TYPE_NORMAL,
3ab196f882377e Rahul Rameshbabu 2023-08-07  120  } __packed;
3ab196f882377e Rahul Rameshbabu 2023-08-07 @121  static_assert(sizeof(enum thunderstrike_charger_type) == 1);
3ab196f882377e Rahul Rameshbabu 2023-08-07  122  
3ab196f882377e Rahul Rameshbabu 2023-08-07  123  enum thunderstrike_charger_state {
3ab196f882377e Rahul Rameshbabu 2023-08-07  124  	THUNDERSTRIKE_CHARGER_STATE_UNKNOWN = 0,
3ab196f882377e Rahul Rameshbabu 2023-08-07  125  	THUNDERSTRIKE_CHARGER_STATE_DISABLED,
3ab196f882377e Rahul Rameshbabu 2023-08-07  126  	THUNDERSTRIKE_CHARGER_STATE_CHARGING,
3ab196f882377e Rahul Rameshbabu 2023-08-07  127  	THUNDERSTRIKE_CHARGER_STATE_FULL,
3ab196f882377e Rahul Rameshbabu 2023-08-07  128  	THUNDERSTRIKE_CHARGER_STATE_FAILED = 8,
3ab196f882377e Rahul Rameshbabu 2023-08-07  129  } __packed;
3ab196f882377e Rahul Rameshbabu 2023-08-07 @130  static_assert(sizeof(enum thunderstrike_charger_state) == 1);
3ab196f882377e Rahul Rameshbabu 2023-08-07  131  

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

                 reply	other threads:[~2023-08-15 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202308151816.bcZbOG9c-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@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.