Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

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

 



Hi Punit,

[auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]

config: x86_64-randconfig-x005-201541 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8712/osdep_service.h:32,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r871x_get_ap_info':
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:32: error: incompatible type for argument 2 of 'ether_addr_equal'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
                                   ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:3: note: in expansion of macro 'if'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
      ^
   In file included from drivers/staging/rtl8712/osdep_service.h:39:0,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
   include/linux/etherdevice.h:310:20: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'struct wlan_bssid_ex'
    static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8712/osdep_service.h:32,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:32: error: incompatible type for argument 2 of 'ether_addr_equal'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
                                   ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:3: note: in expansion of macro 'if'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
      ^
   In file included from drivers/staging/rtl8712/osdep_service.h:39:0,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
   include/linux/etherdevice.h:310:20: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'struct wlan_bssid_ex'
    static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
                       ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from drivers/staging/rtl8712/osdep_service.h:32,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:32: error: incompatible type for argument 2 of 'ether_addr_equal'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
                                   ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:3: note: in expansion of macro 'if'
      if (!ether_addr_equal(bssid, pnetwork->network)) {
      ^
   In file included from drivers/staging/rtl8712/osdep_service.h:39:0,
                    from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
   include/linux/etherdevice.h:310:20: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'struct wlan_bssid_ex'
    static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
                       ^

vim +/ether_addr_equal +2010 drivers/staging/rtl8712/rtl871x_ioctl_linux.c

  2004					    (u8 *)data);
  2005				spin_unlock_irqrestore(&(pmlmepriv->scanned_queue.lock),
  2006						       irqL);
  2007				return -EINVAL;
  2008			}
  2009			netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
> 2010			if (!ether_addr_equal(bssid, pnetwork->network)) {
  2011				/* BSSID match, then check if supporting wpa/wpa2 */
  2012				pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],
  2013				       &wpa_ielen, pnetwork->network.IELength-12);

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