From 80135b182cee12d60d878c170a435a3605e7843c Mon Sep 17 00:00:00 2001 From: Tugce Sirin Date: Mon, 17 Mar 2014 16:01:51 +0200 Subject: [PATCH] Staging: wlan-ng: Fix prefer netdev_err to printk This patch fixes checkpatch.pl error prefer netdev_error to printk in wlan-ng driver. Signed-off-by: Tugce Sirin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2sta.c | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 2199f5afbf90..e880053d8c04 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -454,7 +454,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) */ result = hfa384x_drvr_start(hw); if (result) { - printk(KERN_ERR + netdev_err(wlandev->netdev, "hfa384x_drvr_start() failed," "result=%d\n", (int)result); result = @@ -499,7 +499,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) */ result = hfa384x_drvr_start(hw); if (result) { - printk(KERN_ERR + netdev_err(wlandev->netdev, "hfa384x_drvr_start() failed," "result=%d\n", (int)result); result = @@ -510,7 +510,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) result = prism2sta_getcardinfo(wlandev); if (result) { - printk(KERN_ERR + netdev_err(wlandev->netdev, "prism2sta_getcardinfo() failed," "result=%d\n", (int)result); result = @@ -521,7 +521,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) } result = prism2sta_globalsetup(wlandev); if (result) { - printk(KERN_ERR + netdev_err(wlandev->netdev, "prism2sta_globalsetup() failed," "result=%d\n", (int)result); result = @@ -623,7 +623,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->ident_nic, sizeof(hfa384x_compident_t)); if (result) { - printk(KERN_ERR "Failed to retrieve NICIDENTITY\n"); + netdev_err(wlandev->netdev, "Failed to retrieve NICIDENTITY\n"); goto failed; } @@ -642,7 +642,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->ident_pri_fw, sizeof(hfa384x_compident_t)); if (result) { - printk(KERN_ERR "Failed to retrieve PRIIDENTITY\n"); + netdev_err(wlandev->netdev, "Failed to retrieve PRIIDENTITY\n"); goto failed; } @@ -661,12 +661,12 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->ident_sta_fw, sizeof(hfa384x_compident_t)); if (result) { - printk(KERN_ERR "Failed to retrieve STAIDENTITY\n"); + netdev_err(wlandev->netdev, "Failed to retrieve STAIDENTITY\n"); goto failed; } if (hw->ident_nic.id < 0x8000) { - printk(KERN_ERR + netdev_err(wlandev->netdev, "FATAL: Card is not an Intersil Prism2/2.5/3\n"); result = -1; goto failed; @@ -692,7 +692,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) "ident: ap f/w: id=0x%02x %d.%d.%d\n", hw->ident_sta_fw.id, hw->ident_sta_fw.major, hw->ident_sta_fw.minor, hw->ident_sta_fw.variant); - printk(KERN_ERR "Unsupported Tertiary AP firmeare loaded!\n"); + netdev_err(wlandev->netdev, "Unsupported Tertiary AP firmeare loaded!\n"); goto failed; } @@ -701,7 +701,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_sup_mfi, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve MFISUPRANGE\n"); + netdev_err(wlandev->netdev, "Failed to retrieve MFISUPRANGE\n"); goto failed; } @@ -724,7 +724,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_sup_cfi, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve CFISUPRANGE\n"); + netdev_err(wlandev->netdev, "Failed to retrieve CFISUPRANGE\n"); goto failed; } @@ -747,7 +747,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_sup_pri, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve PRISUPRANGE\n"); + netdev_err(wlandev->netdev, "Failed to retrieve PRISUPRANGE\n"); goto failed; } @@ -770,7 +770,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_sup_sta, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve STASUPRANGE\n"); + netdev_err(wlandev->netdev, "Failed to retrieve STASUPRANGE\n"); goto failed; } @@ -801,7 +801,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_act_pri_cfi, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve PRI_CFIACTRANGES\n"); + netdev_err(wlandev->netdev, "Failed to retrieve PRI_CFIACTRANGES\n"); goto failed; } @@ -824,7 +824,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_act_sta_cfi, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve STA_CFIACTRANGES\n"); + netdev_err(wlandev->netdev, "Failed to retrieve STA_CFIACTRANGES\n"); goto failed; } @@ -847,7 +847,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) &hw->cap_act_sta_mfi, sizeof(hfa384x_caplevel_t)); if (result) { - printk(KERN_ERR "Failed to retrieve STA_MFIACTRANGES\n"); + netdev_err(wlandev->netdev, "Failed to retrieve STA_MFIACTRANGES\n"); goto failed; } @@ -873,7 +873,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) pstr, sizeof(pstr)); printk(KERN_INFO "Prism2 card SN: %s\n", pstr); } else { - printk(KERN_ERR "Failed to retrieve Prism2 Card SN\n"); + netdev_err(wlandev->netdev, "Failed to retrieve Prism2 Card SN\n"); goto failed; } @@ -881,7 +881,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, wlandev->netdev->dev_addr, ETH_ALEN); if (result != 0) { - printk(KERN_ERR "Failed to retrieve mac address\n"); + netdev_err(wlandev->netdev, "Failed to retrieve mac address\n"); goto failed; } @@ -909,7 +909,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) goto done; failed: - printk(KERN_ERR "Failed, result=%d\n", result); + netdev_err(wlandev->netdev, "Failed, result=%d\n", result); done: return result; } @@ -1085,7 +1085,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, HFA384x_RID_JOINREQUEST, &joinreq, HFA384x_RID_JOINREQUEST_LEN); if (result) { - printk(KERN_ERR "setconfig(joinreq) failed, result=%d\n", + netdev_err(wlandev->netdev, "setconfig(joinreq) failed, result=%d\n", result); } } @@ -1713,7 +1713,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, if (result) { if (added) hw->authlist.cnt--; - printk(KERN_ERR + netdev_err(wlandev->netdev, "setconfig(authenticatestation) failed, result=%d\n", result); } @@ -1928,7 +1928,7 @@ static wlandevice_t *create_wlan(void) hw = kzalloc(sizeof(hfa384x_t), GFP_KERNEL); if (!wlandev || !hw) { - printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info); + netdev_err(wlandev->netdev, "%s: Memory allocation failure.\n", dev_info); kfree(wlandev); kfree(hw); return NULL; @@ -1980,7 +1980,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) &hw->qual, HFA384x_RID_DBMCOMMSQUALITY_LEN); if (result) { - printk(KERN_ERR "error fetching commsqual\n"); + netdev_err(wlandev->netdev, "error fetching commsqual\n"); return; } -- 2.39.5