Staging: rt2860: include KERN_* in printk
authorL. Alberto Giménez <agimenez@sysvalve.es>
Tue, 14 Dec 2010 01:01:54 +0000 (02:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Dec 2010 20:17:28 +0000 (12:17 -0800)
Fix checkpatch complains.

Signed-off-by: L. Alberto Giménez <agimenez@sysvalve.es>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt2860/common/ee_efuse.c
drivers/staging/rt2860/pci_main_dev.c
drivers/staging/rt2860/rt_linux.c
drivers/staging/rt2860/rt_main_dev.c
drivers/staging/rt2860/rt_usb.c
drivers/staging/rt2860/usb_main_dev.c

index 03412f5bc990830493a5991cf41f45f40c304afa..fed0ba45227125a360224897138e03a102bb15a6 100644 (file)
@@ -264,7 +264,7 @@ int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *pAd, char *arg)
                if (i == EFUSE_USAGE_MAP_END)
                        efusefreenum = 0;
        }
-       printk("efuseFreeNumber is %d\n", efusefreenum);
+       printk(KERN_DEBUG "efuseFreeNumber is %d\n", efusefreenum);
        return TRUE;
 }
 
@@ -274,16 +274,23 @@ int set_eFusedump_Proc(struct rt_rtmp_adapter *pAd, char *arg)
        int i = 0;
        if (!pAd->bUseEfuse)
                return FALSE;
+
+       printk(KERN_DEBUG "Block 0: ");
+
        for (i = 0; i < EFUSE_USAGE_MAP_END / 2; i++) {
                InBuf[0] = 2 * i;
                InBuf[1] = 2;
                InBuf[2] = 0x0;
 
                eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
-               if (i % 4 == 0)
-                       printk("\nBlock %x:", i / 8);
-               printk("%04x ", InBuf[2]);
+               if (i && i % 4 == 0) {
+                       printk(KERN_CONT "\n");
+                       printk(KERN_DEBUG "Block %x:", i / 8);
+               }
+               printk(KERN_CONT "%04x ", InBuf[2]);
        }
+       printk(KERN_CONT "\n");
+
        return TRUE;
 }
 
index cd028e7a8f910d55359933f74b3a2474cd011360..25fbb1880ff2837d1d1a8d0899aa77a61d7dd577 100644 (file)
@@ -203,7 +203,7 @@ static int rt2860_resume(struct pci_dev *pci_dev)
 
        /* initialize device before it's used by a driver */
        if (pci_enable_device(pci_dev)) {
-               printk("pci enable fail!\n");
+               printk(KERN_ERR "rt2860: pci enable fail!\n");
                return 0;
        }
 
index 0bbd04a71a6a84a82a318940e31b0ceb0055d17b..728864e18a18df8bfd87816387aa9061e3673c24 100644 (file)
@@ -321,7 +321,7 @@ int RTMPCloneNdisPacket(struct rt_rtmp_adapter *pAd,
 
        RTMP_SET_PACKET_SOURCE(OSPKT_TO_RTPKT(pkt), PKTSRC_NDIS);
 
-       printk("###Clone###\n");
+       printk(KERN_DEBUG "###Clone###\n");
 
        return NDIS_STATUS_SUCCESS;
 }
@@ -343,9 +343,8 @@ int RTMPAllocateNdisPacket(struct rt_rtmp_adapter *pAd,
                                           RTMP_PKT_TAIL_PADDING);
        if (pPacket == NULL) {
                *ppPacket = NULL;
-#ifdef DEBUG
-               printk("RTMPAllocateNdisPacket Fail\n");
-#endif
+               pr_devel("RTMPAllocateNdisPacket Fail\n");
+
                return NDIS_STATUS_FAILURE;
        }
        /* 2. clone the frame content */
@@ -601,15 +600,15 @@ void hex_dump(char *str, unsigned char *pSrcBufVA, unsigned int SrcBufLen)
                return;
 
        pt = pSrcBufVA;
-       printk("%s: %p, len = %d\n", str, pSrcBufVA, SrcBufLen);
+       printk(KERN_DEBUG "%s: %p, len = %d\n", str, pSrcBufVA, SrcBufLen);
        for (x = 0; x < SrcBufLen; x++) {
                if (x % 16 == 0)
-                       printk("0x%04x : ", x);
-               printk("%02x ", ((unsigned char)pt[x]));
+                       printk(KERN_DEBUG "0x%04x : ", x);
+               printk(KERN_DEBUG "%02x ", ((unsigned char)pt[x]));
                if (x % 16 == 15)
-                       printk("\n");
+                       printk(KERN_DEBUG "\n");
        }
-       printk("\n");
+       printk(KERN_DEBUG "\n");
 }
 
 /*
@@ -926,7 +925,7 @@ int RtmpOSIRQRequest(struct net_device *pNetDev)
                    request_irq(_pObj->pci_dev->irq, rt2860_interrupt, SA_SHIRQ,
                                (net_dev)->name, (net_dev));
                if (retval != 0)
-                       printk("RT2860: request_irq  ERROR(%d)\n", retval);
+                       printk(KERN_ERR "rt2860: request_irq  ERROR(%d)\n", retval);
        }
 
        return retval;
@@ -1022,7 +1021,7 @@ int RtmpOSTaskKill(struct rt_rtmp_os_task *pTask)
        }
 #else
        CHECK_PID_LEGALITY(pTask->taskPID) {
-               printk("Terminate the task(%s) with pid(%d)!\n",
+               printk(KERN_INFO "Terminate the task(%s) with pid(%d)!\n",
                       pTask->taskName, GET_PID_NUMBER(pTask->taskPID));
                mb();
                pTask->task_killed = 1;
index e8648219e0b5cc67a1746ed07efbccae2b7f2ac6..701561d6b6fdc03a4ecad832ef39940653a023a4 100644 (file)
@@ -421,7 +421,7 @@ int rt28xx_open(struct net_device *dev)
        {
                u32 reg = 0;
                RTMP_IO_READ32(pAd, 0x1300, &reg);      /* clear garbage interrupts */
-               printk("0x1300 = %08x\n", reg);
+               printk(KERN_DEBUG "0x1300 = %08x\n", reg);
        }
 
        {
index 580a20dd6e9dfe1b15be8eb2e348de3683c609d6..eb037d2e04a2435470cdceacd524366ad63baf00 100644 (file)
 
 void dump_urb(struct urb *purb)
 {
-       printk("urb                  :0x%08lx\n", (unsigned long)purb);
-       printk("\tdev                   :0x%08lx\n", (unsigned long)purb->dev);
-       printk("\t\tdev->state          :0x%d\n", purb->dev->state);
-       printk("\tpipe                  :0x%08x\n", purb->pipe);
-       printk("\tstatus                :%d\n", purb->status);
-       printk("\ttransfer_flags        :0x%08x\n", purb->transfer_flags);
-       printk("\ttransfer_buffer       :0x%08lx\n",
+       printk(KERN_DEBUG "urb                  :0x%08lx\n", (unsigned long)purb);
+       printk(KERN_DEBUG "\tdev                   :0x%08lx\n", (unsigned long)purb->dev);
+       printk(KERN_DEBUG "\t\tdev->state          :0x%d\n", purb->dev->state);
+       printk(KERN_DEBUG "\tpipe                  :0x%08x\n", purb->pipe);
+       printk(KERN_DEBUG "\tstatus                :%d\n", purb->status);
+       printk(KERN_DEBUG "\ttransfer_flags        :0x%08x\n", purb->transfer_flags);
+       printk(KERN_DEBUG "\ttransfer_buffer       :0x%08lx\n",
               (unsigned long)purb->transfer_buffer);
-       printk("\ttransfer_buffer_length:%d\n", purb->transfer_buffer_length);
-       printk("\tactual_length         :%d\n", purb->actual_length);
-       printk("\tsetup_packet          :0x%08lx\n",
+       printk(KERN_DEBUG "\ttransfer_buffer_length:%d\n", purb->transfer_buffer_length);
+       printk(KERN_DEBUG "\tactual_length         :%d\n", purb->actual_length);
+       printk(KERN_DEBUG "\tsetup_packet          :0x%08lx\n",
               (unsigned long)purb->setup_packet);
-       printk("\tstart_frame           :%d\n", purb->start_frame);
-       printk("\tnumber_of_packets     :%d\n", purb->number_of_packets);
-       printk("\tinterval              :%d\n", purb->interval);
-       printk("\terror_count           :%d\n", purb->error_count);
-       printk("\tcontext               :0x%08lx\n",
+       printk(KERN_DEBUG "\tstart_frame           :%d\n", purb->start_frame);
+       printk(KERN_DEBUG "\tnumber_of_packets     :%d\n", purb->number_of_packets);
+       printk(KERN_DEBUG "\tinterval              :%d\n", purb->interval);
+       printk(KERN_DEBUG "\terror_count           :%d\n", purb->error_count);
+       printk(KERN_DEBUG "\tcontext               :0x%08lx\n",
               (unsigned long)purb->context);
-       printk("\tcomplete              :0x%08lx\n\n",
+       printk(KERN_DEBUG "\tcomplete              :0x%08lx\n\n",
               (unsigned long)purb->complete);
 }
 
index c8cdbc234eba3010e04c6372f2520696fbf738a2..ee68d51caa4e8e4dbd7a90337570d6815224dc9a 100644 (file)
@@ -233,7 +233,7 @@ BOOLEAN RT28XXChipsetCheck(IN void *_dev_p)
        for (i = 0; i < rtusb_usb_id_len; i++) {
                if (dev_p->descriptor.idVendor == rtusb_usb_id[i].idVendor &&
                    dev_p->descriptor.idProduct == rtusb_usb_id[i].idProduct) {
-                       printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
+                       printk(KERN_INFO "rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
                               dev_p->descriptor.idVendor,
                               dev_p->descriptor.idProduct);
                        break;
@@ -241,7 +241,7 @@ BOOLEAN RT28XXChipsetCheck(IN void *_dev_p)
        }
 
        if (i == rtusb_usb_id_len) {
-               printk("rt2870: Error! Device Descriptor not matching!\n");
+               printk(KERN_ERR "rt2870: Error! Device Descriptor not matching!\n");
                return FALSE;
        }
 
@@ -323,7 +323,7 @@ static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
 
        if (!(pAd->BulkInEpAddr && pAd->BulkOutEpAddr[0])) {
                printk
-                   ("%s: Could not find both bulk-in and bulk-out endpoints\n",
+                   (KERN_ERR "%s: Could not find both bulk-in and bulk-out endpoints\n",
                     __FUNCTION__);
                return FALSE;
        }
@@ -423,7 +423,7 @@ static int rt2870_resume(struct usb_interface *intf)
 /* Init driver module */
 int __init rtusb_init(void)
 {
-       printk("rtusb init --->\n");
+       printk(KERN_DEBUG "rtusb init --->\n");
        return usb_register(&rtusb_driver);
 }
 
@@ -431,7 +431,7 @@ int __init rtusb_init(void)
 void __exit rtusb_exit(void)
 {
        usb_deregister(&rtusb_driver);
-       printk("<--- rtusb exit\n");
+       printk(KERN_DEBUG "<--- rtusb exit\n");
 }
 
 module_init(rtusb_init);
@@ -814,7 +814,7 @@ static void rt2870_disconnect(struct usb_device *dev, struct rt_rtmp_adapter *pA
                  dev->bus->bus_name, dev->devpath));
        if (!pAd) {
                usb_put_dev(dev);
-               printk("rtusb_disconnect: pAd == NULL!\n");
+               printk(KERN_ERR "rtusb_disconnect: pAd == NULL!\n");
                return;
        }
        RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST);