[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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux