From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: drivers/hid/hid-nvidia-shield.c:59:2: warning: field within 'struct thunderstrike_hostcmd_resp_report' is less aligned than 'union thunderstrike_hostcmd_resp_report::(anonymous at drivers/hid/hid-nvidia-shield.c:59:2)' and is usually due to 'struct thund...
Date: Tue, 04 Jul 2023 08:56:39 -0700 [thread overview]
Message-ID: <87a5wb7jrc.fsf@nvidia.com> (raw)
In-Reply-To: <202307041500.6bKn7nCl-lkp@intel.com> (kernel test robot's message of "Tue, 4 Jul 2023 15:13:08 +0800")
On Tue, 04 Jul, 2023 15:13:08 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 24be4d0b46bb0c3c1dc7bacd30957d6144a70dfc
> commit: 09308562d4afb1abc66366608fa1cb9de783272f HID: nvidia-shield: Initial driver implementation with Thunderstrike support
> date: 4 weeks ago
> config: arm-randconfig-r014-20230704 (https://download.01.org/0day-ci/archive/20230704/202307041500.6bKn7nCl-lkp@intel.com/config)
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce: (https://download.01.org/0day-ci/archive/20230704/202307041500.6bKn7nCl-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/oe-kbuild-all/202307041500.6bKn7nCl-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/hid/hid-nvidia-shield.c:59:2: warning: field within 'struct thunderstrike_hostcmd_resp_report' is less aligned than 'union thunderstrike_hostcmd_resp_report::(anonymous at drivers/hid/hid-nvidia-shield.c:59:2)' and is usually due to 'struct thunderstrike_hostcmd_resp_report' being packed, which can lead to unaligned accesses [-Wunaligned-access]
> union {
> ^
> 1 warning generated.
>
>
> vim +59 drivers/hid/hid-nvidia-shield.c
>
> 53
> 54 struct thunderstrike_hostcmd_resp_report {
> 55 u8 report_id; /* THUNDERSTRIKE_HOSTCMD_RESP_REPORT_ID */
> 56 u8 cmd_id;
> 57 u8 reserved_at_10;
> 58
> > 59 union {
> 60 struct thunderstrike_hostcmd_board_info board_info;
> 61 struct thunderstrike_hostcmd_haptics motors;
> 62 __le16 fw_version;
> 63 u8 payload[30];
> 64 };
> 65 } __packed;
> 66 static_assert(sizeof(struct thunderstrike_hostcmd_resp_report) ==
> 67 THUNDERSTRIKE_HOSTCMD_REPORT_SIZE);
> 68
Will send out a fix for this soon.
-- Rahul Rameshbabu
prev parent reply other threads:[~2023-07-04 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 7:13 drivers/hid/hid-nvidia-shield.c:59:2: warning: field within 'struct thunderstrike_hostcmd_resp_report' is less aligned than 'union thunderstrike_hostcmd_resp_report::(anonymous at drivers/hid/hid-nvidia-shield.c:59:2)' and is usually due to 'struct thund kernel test robot
2023-07-04 15:56 ` Rahul Rameshbabu [this message]
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=87a5wb7jrc.fsf@nvidia.com \
--to=rrameshbabu@nvidia.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox