From a0a471feed34b0da677b6ec7e821addac41d2510 Mon Sep 17 00:00:00 2001 From: Simon Que Date: Wed, 30 Jan 2013 15:51:18 -0800 Subject: [PATCH] CHROMIUM: net: ipw2x00: #ifdef condtionally used variable 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 Reviewed-on: https://gerrit.chromium.org/gerrit/42357 Reviewed-by: Mandeep Singh Baines --- drivers/net/wireless/ipw2x00/libipw_wx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ipw2x00/libipw_wx.c b/drivers/net/wireless/ipw2x00/libipw_wx.c index 1571505b1a38b..2e5a8b65427da 100644 --- a/drivers/net/wireless/ipw2x00/libipw_wx.c +++ b/drivers/net/wireless/ipw2x00/libipw_wx.c @@ -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; -- 2.39.5