]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: vt6655: use netdev_* instead of printk
authorTeodora Baluta <teobaluta@gmail.com>
Mon, 11 Nov 2013 17:27:05 +0000 (19:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Nov 2013 23:46:28 +0000 (15:46 -0800)
Checkpatch.pl gave the following warnings

WARNING: printk() should include KERN_ facility level

After fixing these with KERN_INFO facility level, it was suggested to
use netdev_ instead of printk() with KERN_INFO facility.
Used netdev_dbg for the statements inside of PLICE_DEBUG #ifdef, as
debugging shouldn't rely on compile options and netdev_info for one
printk which wasn't inside any #ifdef PLICE_DEBUG.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/bssdb.c

index 5995dc203c79ae29b8416d1668be9c2ad1172550..8214e4ba2b436fe2ef0966dd0c0b50d2707cf2f6 100644 (file)
@@ -846,9 +846,8 @@ BSSvUpdateAPNode(
        pMgmt->sNodeDBTable[0].wTxDataRate = pMgmt->sNodeDBTable[0].wMaxSuppRate;
        pMgmt->sNodeDBTable[0].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(*pwCapInfo);
        pMgmt->sNodeDBTable[0].uRatePollTimeout = FALLBACK_POLL_SECOND;
-#ifdef PLICE_DEBUG
-       printk("BSSvUpdateAPNode:MaxSuppRate is %d\n", pMgmt->sNodeDBTable[0].wMaxSuppRate);
-#endif
+       netdev_dbg(pDevice->dev, "BSSvUpdateAPNode:MaxSuppRate is %d\n",
+                  pMgmt->sNodeDBTable[0].wMaxSuppRate);
        /* auto rate fallback function initiation */
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->sNodeDBTable[0].wTxDataRate = %d \n", pMgmt->sNodeDBTable[0].wTxDataRate);
 };
@@ -889,9 +888,9 @@ BSSvAddMulticastNode(
                          &(pMgmt->sNodeDBTable[0].byTopOFDMBasicRate)
 );
        pMgmt->sNodeDBTable[0].wTxDataRate = pMgmt->sNodeDBTable[0].wMaxBasicRate;
-#ifdef PLICE_DEBUG
-       printk("BSSvAddMultiCastNode:pMgmt->sNodeDBTable[0].wTxDataRate is %d\n", pMgmt->sNodeDBTable[0].wTxDataRate);
-#endif
+       netdev_dbg(pDevice->dev,
+                  "BSSvAddMultiCastNode:pMgmt->sNodeDBTable[0].wTxDataRate is %d\n",
+                  pMgmt->sNodeDBTable[0].wTxDataRate);
        pMgmt->sNodeDBTable[0].uRatePollTimeout = FALLBACK_POLL_SECOND;
 };
 
@@ -990,7 +989,7 @@ BSSvSecondCallBack(
                pDevice->byReAssocCount++;
                /* 10 sec timeout */
                if ((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) {
-                       printk("Re-association timeout!!!\n");
+                       netdev_info(pDevice->dev, "Re-association timeout!!!\n");
                        pDevice->byReAssocCount = 0;
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
                        {
@@ -1054,13 +1053,13 @@ BSSvSecondCallBack(
                                } else {
                                        /* ii = 0 reserved for unicast AP node (Infra STA) */
                                        if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)
-#ifdef PLICE_DEBUG
-                                               printk("SecondCallback:Before:TxDataRate is %d\n", pMgmt->sNodeDBTable[0].wTxDataRate);
-#endif
+                                               netdev_dbg(pDevice->dev,
+                                                          "SecondCallback:Before:TxDataRate is %d\n",
+                                                          pMgmt->sNodeDBTable[0].wTxDataRate);
                                        RATEvTxRateFallBack((void *)pDevice, &(pMgmt->sNodeDBTable[ii]));
-#ifdef PLICE_DEBUG
-                                       printk("SecondCallback:After:TxDataRate is %d\n", pMgmt->sNodeDBTable[0].wTxDataRate);
-#endif
+                                       netdev_dbg(pDevice->dev,
+                                                  "SecondCallback:After:TxDataRate is %d\n",
+                                                  pMgmt->sNodeDBTable[0].wTxDataRate);
 
                                }