Re: [PATCH v2 2/2] staging: rtl8188eu: ternary operator (?:) replaced by min kernel macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ivan,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Ivan-Safonov/staging-rtl8188eu-integer-type-replaced-by-size_t-in-length-variables/20151027-122454
config: mn10300-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=mn10300 

All warnings (new ones prefixed by >>):

   In file included from include/linux/skbuff.h:17:0,
                    from include/linux/if_ether.h:23,
                    from include/linux/ieee80211.h:20,
                    from drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:22:
   drivers/staging/rtl8188eu/core/rtw_mlme_ext.c: In function 'OnAssocReq':
   include/linux/kernel.h:722:17: warning: comparison of distinct pointer types lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
>> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3243:15: note: in expansion of macro 'min'
       copy_len = min(wpa_ie_len + 2, sizeof(pstat->wpa_ie));
                  ^
--
   In file included from include/linux/skbuff.h:17:0,
                    from include/linux/if_ether.h:23,
                    from include/linux/ieee80211.h:20,
                    from drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:22:
   drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function 'rtw_get_sta_wpaie':
   include/linux/kernel.h:722:17: warning: comparison of distinct pointer types lacks a cast
     (void) (&_min1 == &_min2);  \
                    ^
>> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:2672:15: note: in expansion of macro 'min'
       copy_len = min(wpa_ie_len + 2, sizeof(psta->wpa_ie));
                  ^

vim +/min +3243 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

  3227			if (psecuritypriv->wpa_psk == 0) {
  3228				DBG_88E("STA %pM: WPA/RSN IE in association "
  3229				"request, but AP don't support WPA/RSN\n", pstat->hwaddr);
  3230	
  3231				status = WLAN_STATUS_INVALID_IE;
  3232	
  3233				goto OnAssocReqFail;
  3234			}
  3235	
  3236			if (elems.wps_ie) {
  3237				DBG_88E("STA included WPS IE in "
  3238					   "(Re)Association Request - WPS is "
  3239					   "used\n");
  3240				pstat->flags |= WLAN_STA_WPS;
  3241				copy_len = 0;
  3242			} else {
> 3243				copy_len = min(wpa_ie_len + 2, sizeof(pstat->wpa_ie));
  3244			}
  3245			if (copy_len > 0)
  3246				memcpy(pstat->wpa_ie, wpa_ie-2, copy_len);
  3247		}
  3248		/*  check if there is WMM IE & support WWM-PS */
  3249		pstat->flags &= ~WLAN_STA_WME;
  3250		pstat->qos_option = 0;
  3251		pstat->qos_info = 0;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux