diff mbox

[OPW,kernel] fix for replacing printk with relevant netdev, dev or pr function Signed-off-by: swetha <swetha.kanagala@gmail.com>

Message ID 1394101848-35215-1-git-send-email-swetha.kanagala@gmail.com
State New, archived
Headers show

Commit Message

swetha.kanagala@gmail.com March 6, 2014, 10:30 a.m. UTC
From: swetha <swetha.kanagala@gmail.com>

---
 drivers/staging/wlan-ng/prism2sta.c |   74 +++++++++++++++--------------------
 1 file changed, 32 insertions(+), 42 deletions(-)

Comments

Julia Lawall March 6, 2014, 4:36 p.m. UTC | #1
On Thu, 6 Mar 2014, swetha.kanagala@gmail.com wrote:

> From: swetha <swetha.kanagala@gmail.com>
>
> ---
>  drivers/staging/wlan-ng/prism2sta.c |   74 +++++++++++++++--------------------
>  1 file changed, 32 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
> index 2199f5a..d1a8a94 100644
> --- a/drivers/staging/wlan-ng/prism2sta.c
> +++ b/drivers/staging/wlan-ng/prism2sta.c
> @@ -49,7 +49,6 @@
>  *
>  * --------------------------------------------------------------------
>  */
> -
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <linux/kernel.h>
> @@ -405,7 +404,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
>  			break;
>  		}
>  	default:
> -		printk(KERN_WARNING "Unknown mgmt request message 0x%08x",
> +		pr_warn("Unknown mgmt request message 0x%08x",

Could netdev functions be used?  Look in wlandeice_t and see if there is a
net_device typed field.

julia

>  		       msg->msgcode);
>  		break;
>  	}
> @@ -454,8 +453,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			 */
>  			result = hfa384x_drvr_start(hw);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "hfa384x_drvr_start() failed,"
> +				pr_err("hfa384x_drvr_start() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				 P80211ENUM_resultcode_implementation_failure;
> @@ -470,8 +468,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			result = P80211ENUM_resultcode_success;
>  			break;
>  		case WLAN_MSD_RUNNING:
> -			printk(KERN_WARNING
> -			       "Cannot enter fwload state from enable state,"
> +			pr_warn("Cannot enter fwload state from enable state,"
>  			       "you must disable first.\n");
>  			result = P80211ENUM_resultcode_invalid_parameters;
>  			break;
> @@ -499,8 +496,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			 */
>  			result = hfa384x_drvr_start(hw);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "hfa384x_drvr_start() failed,"
> +				pr_err("hfa384x_drvr_start() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -510,8 +506,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>
>  			result = prism2sta_getcardinfo(wlandev);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "prism2sta_getcardinfo() failed,"
> +				pr_err("prism2sta_getcardinfo() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -521,8 +516,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			}
>  			result = prism2sta_globalsetup(wlandev);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "prism2sta_globalsetup() failed,"
> +				pr_err("prism2sta_globalsetup() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -623,7 +617,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");
> +		pr_err("Failed to retrieve NICIDENTITY\n");
>  		goto failed;
>  	}
>
> @@ -642,7 +636,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");
> +		pr_err("Failed to retrieve PRIIDENTITY\n");
>  		goto failed;
>  	}
>
> @@ -661,13 +655,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");
> +		pr_err("Failed to retrieve STAIDENTITY\n");
>  		goto failed;
>  	}
>
>  	if (hw->ident_nic.id < 0x8000) {
> -		printk(KERN_ERR
> -		       "FATAL: Card is not an Intersil Prism2/2.5/3\n");
> +		pr_err("FATAL: Card is not an Intersil Prism2/2.5/3\n");
>  		result = -1;
>  		goto failed;
>  	}
> @@ -692,7 +685,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");
> +		pr_err("Unsupported Tertiary AP firmeare loaded!\n");
>  		goto failed;
>  	}
>
> @@ -701,7 +694,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");
> +		pr_err("Failed to retrieve MFISUPRANGE\n");
>  		goto failed;
>  	}
>
> @@ -724,7 +717,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");
> +		pr_err("Failed to retrieve CFISUPRANGE\n");
>  		goto failed;
>  	}
>
> @@ -747,7 +740,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");
> +		pr_err("Failed to retrieve PRISUPRANGE\n");
>  		goto failed;
>  	}
>
> @@ -770,7 +763,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");
> +		pr_err("Failed to retrieve STASUPRANGE\n");
>  		goto failed;
>  	}
>
> @@ -801,7 +794,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");
> +		pr_err("Failed to retrieve PRI_CFIACTRANGES\n");
>  		goto failed;
>  	}
>
> @@ -824,7 +817,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");
> +		pr_err("Failed to retrieve STA_CFIACTRANGES\n");
>  		goto failed;
>  	}
>
> @@ -847,7 +840,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");
> +		pr_err("Failed to retrieve STA_MFIACTRANGES\n");
>  		goto failed;
>  	}
>
> @@ -873,7 +866,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");
> +		pr_err("Failed to retrieve Prism2 Card SN\n");
>  		goto failed;
>  	}
>
> @@ -881,7 +874,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");
> +		pr_err("Failed to retrieve mac address\n");
>  		goto failed;
>  	}
>
> @@ -909,7 +902,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
>
>  	goto done;
>  failed:
> -	printk(KERN_ERR "Failed, result=%d\n", result);
> +	pr_err("Failed, result=%d\n", result);
>  done:
>  	return result;
>  }
> @@ -1085,7 +1078,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",
> +		pr_err("setconfig(joinreq) failed, result=%d\n",
>  		       result);
>  	}
>  }
> @@ -1435,8 +1428,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>
>  	default:
>  		/* This is bad, IO port problems? */
> -		printk(KERN_WARNING
> -		       "unknown linkstatus=0x%02x\n", hw->link_status);
> +		pr_warn("unknown linkstatus=0x%02x\n", hw->link_status);
>  		return;
>  	}
>
> @@ -1517,7 +1509,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>
>  	if (i >= hw->authlist.cnt) {
>  		if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL)
> -			printk(KERN_WARNING
> +			pr_warn(
>  	"assocstatus info frame received for non-authenticated station.\n");
>  	} else {
>  		hw->authlist.assoc[i] =
> @@ -1525,7 +1517,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  		     rec.assocstatus == HFA384x_ASSOCSTATUS_REASSOC);
>
>  		if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL)
> -			printk(KERN_WARNING
> +			pr_warn(
>  "authfail assocstatus info frame received for authenticated station.\n");
>  	}
>  }
> @@ -1713,8 +1705,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
>  	if (result) {
>  		if (added)
>  			hw->authlist.cnt--;
> -		printk(KERN_ERR
> -		       "setconfig(authenticatestation) failed, result=%d\n",
> +		pr_err("setconfig(authenticatestation) failed, result=%d\n",
>  		       result);
>  	}
>  }
> @@ -1795,17 +1786,16 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
>  		prism2sta_inf_psusercnt(wlandev, inf);
>  		break;
>  	case HFA384x_IT_KEYIDCHANGED:
> -		printk(KERN_WARNING "Unhandled IT_KEYIDCHANGED\n");
> +		pr_warn("Unhandled IT_KEYIDCHANGED\n");
>  		break;
>  	case HFA384x_IT_ASSOCREQ:
> -		printk(KERN_WARNING "Unhandled IT_ASSOCREQ\n");
> +		pr_warn("Unhandled IT_ASSOCREQ\n");
>  		break;
>  	case HFA384x_IT_MICFAILURE:
> -		printk(KERN_WARNING "Unhandled IT_MICFAILURE\n");
> +		pr_warn("Unhandled IT_MICFAILURE\n");
>  		break;
>  	default:
> -		printk(KERN_WARNING
> -		       "Unknown info type=0x%02x\n", inf->infotype);
> +		pr_warn("Unknown info type=0x%02x\n", inf->infotype);
>  		break;
>  	}
>  }
> @@ -1928,7 +1918,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);
> +		pr_err("%s: Memory allocation failure.\n", dev_info);
>  		kfree(wlandev);
>  		kfree(hw);
>  		return NULL;
> @@ -1980,7 +1970,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
>  				&hw->qual, HFA384x_RID_DBMCOMMSQUALITY_LEN);
>
>  		if (result) {
> -			printk(KERN_ERR "error fetching commsqual\n");
> +			pr_err("error fetching commsqual\n");
>  			return;
>  		}
>
> --
> 1.7.9.5
>
> --
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
Sarah Sharp March 7, 2014, 12:26 a.m. UTC | #2
When you edit your git commit message, you need a blank line between the
"short description" (what shows up in the subject line), and your patch
body.  You also need a blank line between the patch body and your
Signed-off-by line.

Sarah Sharp

On Thu, Mar 06, 2014 at 04:00:48PM +0530, swetha.kanagala@gmail.com wrote:
> From: swetha <swetha.kanagala@gmail.com>
> 
> ---
>  drivers/staging/wlan-ng/prism2sta.c |   74 +++++++++++++++--------------------
>  1 file changed, 32 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
> index 2199f5a..d1a8a94 100644
> --- a/drivers/staging/wlan-ng/prism2sta.c
> +++ b/drivers/staging/wlan-ng/prism2sta.c
> @@ -49,7 +49,6 @@
>  *
>  * --------------------------------------------------------------------
>  */
> -
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
>  #include <linux/kernel.h>
> @@ -405,7 +404,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
>  			break;
>  		}
>  	default:
> -		printk(KERN_WARNING "Unknown mgmt request message 0x%08x",
> +		pr_warn("Unknown mgmt request message 0x%08x",
>  		       msg->msgcode);
>  		break;
>  	}
> @@ -454,8 +453,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			 */
>  			result = hfa384x_drvr_start(hw);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "hfa384x_drvr_start() failed,"
> +				pr_err("hfa384x_drvr_start() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				 P80211ENUM_resultcode_implementation_failure;
> @@ -470,8 +468,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			result = P80211ENUM_resultcode_success;
>  			break;
>  		case WLAN_MSD_RUNNING:
> -			printk(KERN_WARNING
> -			       "Cannot enter fwload state from enable state,"
> +			pr_warn("Cannot enter fwload state from enable state,"
>  			       "you must disable first.\n");
>  			result = P80211ENUM_resultcode_invalid_parameters;
>  			break;
> @@ -499,8 +496,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			 */
>  			result = hfa384x_drvr_start(hw);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "hfa384x_drvr_start() failed,"
> +				pr_err("hfa384x_drvr_start() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -510,8 +506,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  
>  			result = prism2sta_getcardinfo(wlandev);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "prism2sta_getcardinfo() failed,"
> +				pr_err("prism2sta_getcardinfo() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -521,8 +516,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
>  			}
>  			result = prism2sta_globalsetup(wlandev);
>  			if (result) {
> -				printk(KERN_ERR
> -				       "prism2sta_globalsetup() failed,"
> +				pr_err("prism2sta_globalsetup() failed,"
>  				       "result=%d\n", (int)result);
>  				result =
>  				  P80211ENUM_resultcode_implementation_failure;
> @@ -623,7 +617,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");
> +		pr_err("Failed to retrieve NICIDENTITY\n");
>  		goto failed;
>  	}
>  
> @@ -642,7 +636,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");
> +		pr_err("Failed to retrieve PRIIDENTITY\n");
>  		goto failed;
>  	}
>  
> @@ -661,13 +655,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");
> +		pr_err("Failed to retrieve STAIDENTITY\n");
>  		goto failed;
>  	}
>  
>  	if (hw->ident_nic.id < 0x8000) {
> -		printk(KERN_ERR
> -		       "FATAL: Card is not an Intersil Prism2/2.5/3\n");
> +		pr_err("FATAL: Card is not an Intersil Prism2/2.5/3\n");
>  		result = -1;
>  		goto failed;
>  	}
> @@ -692,7 +685,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");
> +		pr_err("Unsupported Tertiary AP firmeare loaded!\n");
>  		goto failed;
>  	}
>  
> @@ -701,7 +694,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");
> +		pr_err("Failed to retrieve MFISUPRANGE\n");
>  		goto failed;
>  	}
>  
> @@ -724,7 +717,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");
> +		pr_err("Failed to retrieve CFISUPRANGE\n");
>  		goto failed;
>  	}
>  
> @@ -747,7 +740,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");
> +		pr_err("Failed to retrieve PRISUPRANGE\n");
>  		goto failed;
>  	}
>  
> @@ -770,7 +763,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");
> +		pr_err("Failed to retrieve STASUPRANGE\n");
>  		goto failed;
>  	}
>  
> @@ -801,7 +794,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");
> +		pr_err("Failed to retrieve PRI_CFIACTRANGES\n");
>  		goto failed;
>  	}
>  
> @@ -824,7 +817,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");
> +		pr_err("Failed to retrieve STA_CFIACTRANGES\n");
>  		goto failed;
>  	}
>  
> @@ -847,7 +840,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");
> +		pr_err("Failed to retrieve STA_MFIACTRANGES\n");
>  		goto failed;
>  	}
>  
> @@ -873,7 +866,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");
> +		pr_err("Failed to retrieve Prism2 Card SN\n");
>  		goto failed;
>  	}
>  
> @@ -881,7 +874,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");
> +		pr_err("Failed to retrieve mac address\n");
>  		goto failed;
>  	}
>  
> @@ -909,7 +902,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
>  
>  	goto done;
>  failed:
> -	printk(KERN_ERR "Failed, result=%d\n", result);
> +	pr_err("Failed, result=%d\n", result);
>  done:
>  	return result;
>  }
> @@ -1085,7 +1078,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",
> +		pr_err("setconfig(joinreq) failed, result=%d\n",
>  		       result);
>  	}
>  }
> @@ -1435,8 +1428,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  
>  	default:
>  		/* This is bad, IO port problems? */
> -		printk(KERN_WARNING
> -		       "unknown linkstatus=0x%02x\n", hw->link_status);
> +		pr_warn("unknown linkstatus=0x%02x\n", hw->link_status);
>  		return;
>  	}
>  
> @@ -1517,7 +1509,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  
>  	if (i >= hw->authlist.cnt) {
>  		if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL)
> -			printk(KERN_WARNING
> +			pr_warn(
>  	"assocstatus info frame received for non-authenticated station.\n");
>  	} else {
>  		hw->authlist.assoc[i] =
> @@ -1525,7 +1517,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  		     rec.assocstatus == HFA384x_ASSOCSTATUS_REASSOC);
>  
>  		if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL)
> -			printk(KERN_WARNING
> +			pr_warn(
>  "authfail assocstatus info frame received for authenticated station.\n");
>  	}
>  }
> @@ -1713,8 +1705,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
>  	if (result) {
>  		if (added)
>  			hw->authlist.cnt--;
> -		printk(KERN_ERR
> -		       "setconfig(authenticatestation) failed, result=%d\n",
> +		pr_err("setconfig(authenticatestation) failed, result=%d\n",
>  		       result);
>  	}
>  }
> @@ -1795,17 +1786,16 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
>  		prism2sta_inf_psusercnt(wlandev, inf);
>  		break;
>  	case HFA384x_IT_KEYIDCHANGED:
> -		printk(KERN_WARNING "Unhandled IT_KEYIDCHANGED\n");
> +		pr_warn("Unhandled IT_KEYIDCHANGED\n");
>  		break;
>  	case HFA384x_IT_ASSOCREQ:
> -		printk(KERN_WARNING "Unhandled IT_ASSOCREQ\n");
> +		pr_warn("Unhandled IT_ASSOCREQ\n");
>  		break;
>  	case HFA384x_IT_MICFAILURE:
> -		printk(KERN_WARNING "Unhandled IT_MICFAILURE\n");
> +		pr_warn("Unhandled IT_MICFAILURE\n");
>  		break;
>  	default:
> -		printk(KERN_WARNING
> -		       "Unknown info type=0x%02x\n", inf->infotype);
> +		pr_warn("Unknown info type=0x%02x\n", inf->infotype);
>  		break;
>  	}
>  }
> @@ -1928,7 +1918,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);
> +		pr_err("%s: Memory allocation failure.\n", dev_info);
>  		kfree(wlandev);
>  		kfree(hw);
>  		return NULL;
> @@ -1980,7 +1970,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
>  				&hw->qual, HFA384x_RID_DBMCOMMSQUALITY_LEN);
>  
>  		if (result) {
> -			printk(KERN_ERR "error fetching commsqual\n");
> +			pr_err("error fetching commsqual\n");
>  			return;
>  		}
>  
> -- 
> 1.7.9.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 2199f5a..d1a8a94 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -49,7 +49,6 @@ 
 *
 * --------------------------------------------------------------------
 */
-
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
@@ -405,7 +404,7 @@  static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
 			break;
 		}
 	default:
-		printk(KERN_WARNING "Unknown mgmt request message 0x%08x",
+		pr_warn("Unknown mgmt request message 0x%08x",
 		       msg->msgcode);
 		break;
 	}
@@ -454,8 +453,7 @@  u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
 			 */
 			result = hfa384x_drvr_start(hw);
 			if (result) {
-				printk(KERN_ERR
-				       "hfa384x_drvr_start() failed,"
+				pr_err("hfa384x_drvr_start() failed,"
 				       "result=%d\n", (int)result);
 				result =
 				 P80211ENUM_resultcode_implementation_failure;
@@ -470,8 +468,7 @@  u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
 			result = P80211ENUM_resultcode_success;
 			break;
 		case WLAN_MSD_RUNNING:
-			printk(KERN_WARNING
-			       "Cannot enter fwload state from enable state,"
+			pr_warn("Cannot enter fwload state from enable state,"
 			       "you must disable first.\n");
 			result = P80211ENUM_resultcode_invalid_parameters;
 			break;
@@ -499,8 +496,7 @@  u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
 			 */
 			result = hfa384x_drvr_start(hw);
 			if (result) {
-				printk(KERN_ERR
-				       "hfa384x_drvr_start() failed,"
+				pr_err("hfa384x_drvr_start() failed,"
 				       "result=%d\n", (int)result);
 				result =
 				  P80211ENUM_resultcode_implementation_failure;
@@ -510,8 +506,7 @@  u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
 
 			result = prism2sta_getcardinfo(wlandev);
 			if (result) {
-				printk(KERN_ERR
-				       "prism2sta_getcardinfo() failed,"
+				pr_err("prism2sta_getcardinfo() failed,"
 				       "result=%d\n", (int)result);
 				result =
 				  P80211ENUM_resultcode_implementation_failure;
@@ -521,8 +516,7 @@  u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
 			}
 			result = prism2sta_globalsetup(wlandev);
 			if (result) {
-				printk(KERN_ERR
-				       "prism2sta_globalsetup() failed,"
+				pr_err("prism2sta_globalsetup() failed,"
 				       "result=%d\n", (int)result);
 				result =
 				  P80211ENUM_resultcode_implementation_failure;
@@ -623,7 +617,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");
+		pr_err("Failed to retrieve NICIDENTITY\n");
 		goto failed;
 	}
 
@@ -642,7 +636,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");
+		pr_err("Failed to retrieve PRIIDENTITY\n");
 		goto failed;
 	}
 
@@ -661,13 +655,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");
+		pr_err("Failed to retrieve STAIDENTITY\n");
 		goto failed;
 	}
 
 	if (hw->ident_nic.id < 0x8000) {
-		printk(KERN_ERR
-		       "FATAL: Card is not an Intersil Prism2/2.5/3\n");
+		pr_err("FATAL: Card is not an Intersil Prism2/2.5/3\n");
 		result = -1;
 		goto failed;
 	}
@@ -692,7 +685,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");
+		pr_err("Unsupported Tertiary AP firmeare loaded!\n");
 		goto failed;
 	}
 
@@ -701,7 +694,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");
+		pr_err("Failed to retrieve MFISUPRANGE\n");
 		goto failed;
 	}
 
@@ -724,7 +717,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");
+		pr_err("Failed to retrieve CFISUPRANGE\n");
 		goto failed;
 	}
 
@@ -747,7 +740,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");
+		pr_err("Failed to retrieve PRISUPRANGE\n");
 		goto failed;
 	}
 
@@ -770,7 +763,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");
+		pr_err("Failed to retrieve STASUPRANGE\n");
 		goto failed;
 	}
 
@@ -801,7 +794,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");
+		pr_err("Failed to retrieve PRI_CFIACTRANGES\n");
 		goto failed;
 	}
 
@@ -824,7 +817,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");
+		pr_err("Failed to retrieve STA_CFIACTRANGES\n");
 		goto failed;
 	}
 
@@ -847,7 +840,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");
+		pr_err("Failed to retrieve STA_MFIACTRANGES\n");
 		goto failed;
 	}
 
@@ -873,7 +866,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");
+		pr_err("Failed to retrieve Prism2 Card SN\n");
 		goto failed;
 	}
 
@@ -881,7 +874,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");
+		pr_err("Failed to retrieve mac address\n");
 		goto failed;
 	}
 
@@ -909,7 +902,7 @@  static int prism2sta_getcardinfo(wlandevice_t *wlandev)
 
 	goto done;
 failed:
-	printk(KERN_ERR "Failed, result=%d\n", result);
+	pr_err("Failed, result=%d\n", result);
 done:
 	return result;
 }
@@ -1085,7 +1078,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",
+		pr_err("setconfig(joinreq) failed, result=%d\n",
 		       result);
 	}
 }
@@ -1435,8 +1428,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 
 	default:
 		/* This is bad, IO port problems? */
-		printk(KERN_WARNING
-		       "unknown linkstatus=0x%02x\n", hw->link_status);
+		pr_warn("unknown linkstatus=0x%02x\n", hw->link_status);
 		return;
 	}
 
@@ -1517,7 +1509,7 @@  static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
 
 	if (i >= hw->authlist.cnt) {
 		if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL)
-			printk(KERN_WARNING
+			pr_warn(
 	"assocstatus info frame received for non-authenticated station.\n");
 	} else {
 		hw->authlist.assoc[i] =
@@ -1525,7 +1517,7 @@  static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
 		     rec.assocstatus == HFA384x_ASSOCSTATUS_REASSOC);
 
 		if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL)
-			printk(KERN_WARNING
+			pr_warn(
 "authfail assocstatus info frame received for authenticated station.\n");
 	}
 }
@@ -1713,8 +1705,7 @@  static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
 	if (result) {
 		if (added)
 			hw->authlist.cnt--;
-		printk(KERN_ERR
-		       "setconfig(authenticatestation) failed, result=%d\n",
+		pr_err("setconfig(authenticatestation) failed, result=%d\n",
 		       result);
 	}
 }
@@ -1795,17 +1786,16 @@  void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
 		prism2sta_inf_psusercnt(wlandev, inf);
 		break;
 	case HFA384x_IT_KEYIDCHANGED:
-		printk(KERN_WARNING "Unhandled IT_KEYIDCHANGED\n");
+		pr_warn("Unhandled IT_KEYIDCHANGED\n");
 		break;
 	case HFA384x_IT_ASSOCREQ:
-		printk(KERN_WARNING "Unhandled IT_ASSOCREQ\n");
+		pr_warn("Unhandled IT_ASSOCREQ\n");
 		break;
 	case HFA384x_IT_MICFAILURE:
-		printk(KERN_WARNING "Unhandled IT_MICFAILURE\n");
+		pr_warn("Unhandled IT_MICFAILURE\n");
 		break;
 	default:
-		printk(KERN_WARNING
-		       "Unknown info type=0x%02x\n", inf->infotype);
+		pr_warn("Unknown info type=0x%02x\n", inf->infotype);
 		break;
 	}
 }
@@ -1928,7 +1918,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);
+		pr_err("%s: Memory allocation failure.\n", dev_info);
 		kfree(wlandev);
 		kfree(hw);
 		return NULL;
@@ -1980,7 +1970,7 @@  void prism2sta_commsqual_defer(struct work_struct *data)
 				&hw->qual, HFA384x_RID_DBMCOMMSQUALITY_LEN);
 
 		if (result) {
-			printk(KERN_ERR "error fetching commsqual\n");
+			pr_err("error fetching commsqual\n");
 			return;
 		}