]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: net: ipw2x00: #ifdef condtionally used variable
authorSimon Que <sque@chromium.org>
Wed, 30 Jan 2013 23:51:18 +0000 (15:51 -0800)
committerChromeBot <chrome-bot@google.com>
Fri, 1 Feb 2013 01:33:25 +0000 (17:33 -0800)
The variable 'dev' is only used by a macro LIBIPW_DEBUG_WX() that is
conditional upon the config option 'CONFIG_LIBIPW_DEBUG'.  When this
config option isn't defined, we get this warning:

  libipw_wx.c:526:21: error: unused variable 'dev'

The solution is to define 'dev' only if CONFIG_LIBIPW_DEBUG is defined.

BUG=chromium-os:5542
TEST=emerge-x86-generic chromeos-kernel, make sure warning doesn't
appear.

Change-Id: I537c361f363879971ca045687e3dbd98475925fc
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42357
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/net/wireless/ipw2x00/libipw_wx.c

index 1571505b1a38ba4903f6664cb0a25ada4e9a6e04..2e5a8b65427dac03b5f79031ed666e3d5ac0f4ca 100644 (file)
@@ -523,7 +523,9 @@ int libipw_wx_set_encodeext(struct libipw_device *ieee,
                               struct iw_request_info *info,
                               union iwreq_data *wrqu, char *extra)
 {
+#ifdef CONFIG_LIBIPW_DEBUG
        struct net_device *dev = ieee->dev;
+#endif
        struct iw_point *encoding = &wrqu->encoding;
        struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
        int i, idx, ret = 0;