[PATCH v2] staging: wlan-ng: Remove unnecessary parentheses

kbuild test robot lkp at intel.com
Thu Oct 19 11:02:03 UTC 2017


Hi Frank,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.14-rc5 next-20171018]
[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/Frank-A-Cancio-Bello/staging-wlan-ng-Remove-unnecessary-parentheses/20171018-202349
config: i386-randconfig-b0-10191645 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/wlan-ng/hfa384x_usb.c:113,
                    from drivers/staging/wlan-ng/prism2usb.c:1:
   drivers/staging/wlan-ng/hfa384x_usb.c: In function 'hfa384x_drvr_enable':
   drivers/staging/wlan-ng/hfa384x_usb.c:1784:16: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (!hw->isap && macport != 0 ||
                   ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> drivers/staging/wlan-ng/hfa384x_usb.c:1784:2: note: in expansion of macro 'if'
     if (!hw->isap && macport != 0 ||
     ^
   drivers/staging/wlan-ng/hfa384x_usb.c:1784:16: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (!hw->isap && macport != 0 ||
                   ^
   include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^
>> drivers/staging/wlan-ng/hfa384x_usb.c:1784:2: note: in expansion of macro 'if'
     if (!hw->isap && macport != 0 ||
     ^
   drivers/staging/wlan-ng/hfa384x_usb.c:1784:16: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (!hw->isap && macport != 0 ||
                   ^
   include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/staging/wlan-ng/hfa384x_usb.c:1784:2: note: in expansion of macro 'if'
     if (!hw->isap && macport != 0 ||
     ^
--
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/staging/wlan-ng/p80211netdev.c:52:
   drivers/staging/wlan-ng/cfg80211.c: In function 'prism2_connect':
   drivers/staging/wlan-ng/cfg80211.c:479:51: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC && !is_wep)
                                                      ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> drivers/staging/wlan-ng/cfg80211.c:478:2: note: in expansion of macro 'if'
     if (sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM ||
     ^
   drivers/staging/wlan-ng/cfg80211.c:479:51: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC && !is_wep)
                                                      ^
   include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^
>> drivers/staging/wlan-ng/cfg80211.c:478:2: note: in expansion of macro 'if'
     if (sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM ||
     ^
   drivers/staging/wlan-ng/cfg80211.c:479:51: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC && !is_wep)
                                                      ^
   include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/staging/wlan-ng/cfg80211.c:478:2: note: in expansion of macro 'if'
     if (sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM ||
     ^

vim +/if +1784 drivers/staging/wlan-ng/hfa384x_usb.c

  1756	
  1757	/*----------------------------------------------------------------
  1758	 * hfa384x_drvr_enable
  1759	 *
  1760	 * Issues the enable command to enable communications on one of
  1761	 * the MACs 'ports'.  Only macport 0 is valid  for stations.
  1762	 * APs may also enable macports 1-6.  Only ports that are currently
  1763	 * disabled may be enabled.
  1764	 *
  1765	 * Arguments:
  1766	 *	hw		device structure
  1767	 *	macport		MAC port number
  1768	 *
  1769	 * Returns:
  1770	 *	0		success
  1771	 *	>0		f/w reported failure - f/w status code
  1772	 *	<0		driver reported error (timeout|bad arg)
  1773	 *
  1774	 * Side effects:
  1775	 *
  1776	 * Call context:
  1777	 *	process
  1778	 *----------------------------------------------------------------
  1779	 */
  1780	int hfa384x_drvr_enable(struct hfa384x *hw, u16 macport)
  1781	{
  1782		int result = 0;
  1783	
> 1784		if (!hw->isap && macport != 0 ||
  1785		    hw->isap && !(macport <= HFA384x_PORTID_MAX) ||
  1786		    hw->port_enabled[macport]) {
  1787			result = -EINVAL;
  1788		} else {
  1789			result = hfa384x_cmd_enable(hw, macport);
  1790			if (result == 0)
  1791				hw->port_enabled[macport] = 1;
  1792		}
  1793		return result;
  1794	}
  1795	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33081 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20171019/dbc8dbca/attachment-0001.bin>


More information about the devel mailing list