Hi Mikhail,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v5.1-rc2 next-20190329]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Mikhail-Gusarov/staging-wlan-ng-Shorten-excessively-long-p80211-constants/20190329-151335
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wlan-ng/p80211req.c:236:14: sparse: undefined identifier 
'SMT_PRIVTABLE_EXCLUDEUNENCRYPTED'
>> drivers/staging/wlan-ng/p80211req.c:236:14: sparse: incompatible types for 
>> 'case' statement
   drivers/staging/wlan-ng/p80211req.c:236:14: sparse: Expected constant 
expression in case statement

vim +/case +236 drivers/staging/wlan-ng/p80211req.c

   197  
   198  static void p80211req_mibset_mibget(struct wlandevice *wlandev,
   199                                      struct p80211msg_dot11req_mibget 
*mib_msg,
   200                                      int isget)
   201  {
   202          struct p80211itemd *mibitem =
   203                  (struct p80211itemd *)mib_msg->mibattribute.data;
   204          struct p80211pstrd *pstr = (struct p80211pstrd *)mibitem->data;
   205          u8 *key = mibitem->data + sizeof(struct p80211pstrd);
   206  
   207          switch (mibitem->did) {
   208          case smt_wepdefaultkeystable_key(1):
   209          case smt_wepdefaultkeystable_key(2):
   210          case smt_wepdefaultkeystable_key(3):
   211          case smt_wepdefaultkeystable_key(4):
   212                  if (!isget)
   213                          wep_change_key(wlandev,
   214                                         ITEM(0, mibitem->did) - 1,
   215                                         key, pstr->len);
   216                  break;
   217  
   218          case SMT_PRIVTABLE_WEPDEFAULTKEYID: {
   219                  u32 *data = (u32 *)mibitem->data;
   220  
   221                  if (isget) {
   222                          *data = wlandev->hostwep & 
HOSTWEP_DEFAULTKEY_MASK;
   223                  } else {
   224                          wlandev->hostwep &= ~(HOSTWEP_DEFAULTKEY_MASK);
   225                          wlandev->hostwep |= (*data & 
HOSTWEP_DEFAULTKEY_MASK);
   226                  }
   227                  break;
   228          }
   229          case SMT_PRIVTABLE_PRIVACYINVOKED: {
   230                  u32 *data = (u32 *)mibitem->data;
   231  
   232                  p80211req_handle_action(wlandev, data, isget,
   233                                          HOSTWEP_PRIVACYINVOKED);
   234                  break;
   235          }
 > 236          case SMT_PRIVTABLE_EXCLUDEUNENCRYPTED: {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to