From: kernel test robot <lkp@intel.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Johannes Berg <johannes.berg@intel.com>
Subject: [linux-next:master 9440/10945] net/mac80211/s1g.c:107:23: warning: taking address of packed member 'req_type' of class or structure 'ieee80211_twt_params' may result in an unaligned pointer value
Date: Sat, 28 Aug 2021 16:03:42 +0800 [thread overview]
Message-ID: <202108281640.GA8tpU1V-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3847 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5e63226c72287bc6c6724d4fc7e157af0e3d7908
commit: f5a4c24e689f54e66201f04d343bdd2e8a1d7923 [9440/10945] mac80211: introduce individual TWT support in AP mode
config: i386-randconfig-a015-20210828 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f5a4c24e689f54e66201f04d343bdd2e8a1d7923
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f5a4c24e689f54e66201f04d343bdd2e8a1d7923
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from net/mac80211/s1g.c:6:
In file included from include/linux/ieee80211.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:14:
In file included from include/linux/mm.h:10:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:8:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/mac80211/s1g.c:107:23: warning: taking address of packed member 'req_type' of class or structure 'ieee80211_twt_params' may result in an unaligned pointer value [-Waddress-of-packed-member]
le16p_replace_bits(&twt_agrt->req_type,
^~~~~~~~~~~~~~~~~~
3 warnings generated.
vim +107 net/mac80211/s1g.c
94
95 static void
96 ieee80211_s1g_rx_twt_setup(struct ieee80211_sub_if_data *sdata,
97 struct sta_info *sta, struct sk_buff *skb)
98 {
99 struct ieee80211_mgmt *mgmt = (void *)skb->data;
100 struct ieee80211_twt_setup *twt = (void *)mgmt->u.action.u.s1g.variable;
101 struct ieee80211_twt_params *twt_agrt = (void *)twt->params;
102
103 twt_agrt->req_type &= cpu_to_le16(~IEEE80211_TWT_REQTYPE_REQUEST);
104
105 /* broadcast TWT not supported yet */
106 if (twt->control & IEEE80211_TWT_CONTROL_NEG_TYPE_BROADCAST) {
> 107 le16p_replace_bits(&twt_agrt->req_type,
108 TWT_SETUP_CMD_REJECT,
109 IEEE80211_TWT_REQTYPE_SETUP_CMD);
110 goto out;
111 }
112
113 drv_add_twt_setup(sdata->local, sdata, &sta->sta, twt);
114 out:
115 ieee80211_s1g_send_twt_setup(sdata, mgmt->sa, sdata->vif.addr, twt);
116 }
117
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36493 bytes --]
reply other threads:[~2021-08-28 8:04 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=202108281640.GA8tpU1V-lkp@intel.com \
--to=lkp@intel.com \
--cc=johannes.berg@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=lorenzo@kernel.org \
/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