This patch fixes the CamelCase checks for methods/variables in
virthba.c found with the checkpatch script.

Signed-off-by: Ken Depro <kenneth.de...@unisys.com>
---
 drivers/staging/unisys/virthba/virthba.c |  122 +++++++++++++++---------------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c 
b/drivers/staging/unisys/virthba/virthba.c
index d7a629b..f537754 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -107,7 +107,7 @@ static void virthba_slave_destroy(struct scsi_device 
*scsidev);
 static int process_incoming_rsps(void *);
 static int virthba_serverup(struct virtpci_dev *virtpcidev);
 static int virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state);
-static void doDiskAddRemove(struct work_struct *work);
+static void do_disk_add_remove(struct work_struct *work);
 static void virthba_serverdown_complete(struct work_struct *work);
 static ssize_t info_debugfs_read(struct file *file, char __user *buf,
                        size_t len, loff_t *offset);
@@ -119,7 +119,7 @@ static ssize_t enable_ints_write(struct file *file,
 /*****************************************************/
 
 static int rsltq_wait_usecs = 4000;    /* Default 4ms */
-static unsigned int MaxBuffLen;
+static unsigned int max_buff_len;
 
 /* Module options */
 static char *virthba_options = "NONE";
@@ -193,7 +193,7 @@ struct virthba_info {
        struct virtdisk_info head;
 };
 
-/* Work Data for DARWorkQ */
+/* Work Data for dar_work_queue */
 struct diskaddremove {
        u8 add;                 /* 0-remove, 1-add */
        struct Scsi_Host *shost; /* Scsi Host for this virthba instance */
@@ -244,7 +244,7 @@ static const struct file_operations 
debugfs_enable_ints_fops = {
 
 #define VIRTHBASOPENMAX 1
 /* array of open devices maintained by open() and close(); */
-static struct virthba_devices_open VirtHbasOpen[VIRTHBASOPENMAX];
+static struct virthba_devices_open virthbas_open[VIRTHBASOPENMAX];
 static struct dentry *virthba_debugfs_dir;
 
 /*****************************************************/
@@ -318,30 +318,30 @@ del_scsipending_entry(struct virthba_info *vhbainfo, 
uintptr_t del)
        return sent;
 }
 
-/* DARWorkQ (Disk Add/Remove) */
-static struct work_struct DARWorkQ;
-static struct diskaddremove *DARWorkQHead;
-static spinlock_t DARWorkQLock;
-static unsigned short DARWorkQSched;
+/* dar_work_q (Disk Add/Remove) */
+static struct work_struct dar_work_queue;
+static struct diskaddremove *dar_work_queue_head;
+static spinlock_t dar_work_queue_lock;
+static unsigned short dar_work_queue_sched;
 #define QUEUE_DISKADDREMOVE(dar) { \
-       spin_lock_irqsave(&DARWorkQLock, flags); \
-       if (!DARWorkQHead) { \
-               DARWorkQHead = dar; \
+       spin_lock_irqsave(&dar_work_queue_lock, flags); \
+       if (!dar_work_queue_head) { \
+               dar_work_queue_head = dar; \
                dar->next = NULL; \
        } \
        else { \
-               dar->next = DARWorkQHead; \
-               DARWorkQHead = dar; \
+               dar->next = dar_work_queue_head; \
+               dar_work_queue_head = dar; \
        } \
-       if (!DARWorkQSched) { \
-               schedule_work(&DARWorkQ); \
-               DARWorkQSched = 1; \
+       if (!dar_work_queue_sched) { \
+               schedule_work(&dar_work_queue); \
+               dar_work_queue_sched = 1; \
        } \
-       spin_unlock_irqrestore(&DARWorkQLock, flags); \
+       spin_unlock_irqrestore(&dar_work_queue_lock, flags); \
 }
 
 static inline void
-SendDiskAddRemove(struct diskaddremove *dar)
+send_disk_add_remove(struct diskaddremove *dar)
 {
        struct scsi_device *sdev;
        int error;
@@ -365,31 +365,31 @@ SendDiskAddRemove(struct diskaddremove *dar)
 }
 
 /*****************************************************/
-/* DARWorkQ Handler Thread                           */
+/* dar_work_queue Handler Thread                     */
 /*****************************************************/
 static void
-doDiskAddRemove(struct work_struct *work)
+do_disk_add_remove(struct work_struct *work)
 {
        struct diskaddremove *dar;
        struct diskaddremove *tmphead;
        int i = 0;
        unsigned long flags;
 
-       spin_lock_irqsave(&DARWorkQLock, flags);
-       tmphead = DARWorkQHead;
-       DARWorkQHead = NULL;
-       DARWorkQSched = 0;
-       spin_unlock_irqrestore(&DARWorkQLock, flags);
+       spin_lock_irqsave(&dar_work_queue_lock, flags);
+       tmphead = dar_work_queue_head;
+       dar_work_queue_head = NULL;
+       dar_work_queue_sched = 0;
+       spin_unlock_irqrestore(&dar_work_queue_lock, flags);
        while (tmphead) {
                dar = tmphead;
                tmphead = dar->next;
-               SendDiskAddRemove(dar);
+               send_disk_add_remove(dar);
                i++;
        }
 }
 
 /*****************************************************/
-/* Routine to add entry to DARWorkQ                  */
+/* Routine to add entry to dar_work_queue            */
 /*****************************************************/
 static void
 process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp)
@@ -419,7 +419,7 @@ static irqreturn_t
 virthba_ISR(int irq, void *dev_id)
 {
        struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
-       struct channel_header __iomem *pChannelHeader;
+       struct channel_header __iomem *pchhdr;
        struct signal_queue_header __iomem *pqhdr;
        u64 mask;
        unsigned long long rc1;
@@ -427,23 +427,23 @@ virthba_ISR(int irq, void *dev_id)
        if (virthbainfo == NULL)
                return IRQ_NONE;
        virthbainfo->interrupts_rcvd++;
-       pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-       if (((readq(&pChannelHeader->features)
+       pchhdr = virthbainfo->chinfo.queueinfo->chan;
+       if (((readq(&pchhdr->features)
              & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-           && ((readq(&pChannelHeader->features) &
+           && ((readq(&pchhdr->features) &
                 ULTRA_IO_DRIVER_DISABLES_INTS) !=
                0)) {
                virthbainfo->interrupts_disabled++;
                mask = ~ULTRA_CHANNEL_ENABLE_INTS;
                rc1 = uisqueue_interlocked_and(virthbainfo->flags_addr, mask);
        }
-       if (spar_signalqueue_empty(pChannelHeader, IOCHAN_FROM_IOPART)) {
+       if (spar_signalqueue_empty(pchhdr, IOCHAN_FROM_IOPART)) {
                virthbainfo->interrupts_notme++;
                return IRQ_NONE;
        }
        pqhdr = (struct signal_queue_header __iomem *)
-               ((char __iomem *) pChannelHeader +
-                readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
+               ((char __iomem *) pchhdr +
+                readq(&pchhdr->ch_space_offset)) + IOCHAN_FROM_IOPART;
        writeq(readq(&pqhdr->num_irq_received) + 1,
               &pqhdr->num_irq_received);
        atomic_set(&virthbainfo->interrupt_rcvd, 1);
@@ -460,7 +460,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct 
pci_device_id *id)
        int rsp;
        int i;
        irq_handler_t handler = virthba_ISR;
-       struct channel_header __iomem *pChannelHeader;
+       struct channel_header __iomem *pchhdr;
        struct signal_queue_header __iomem *pqhdr;
        u64 mask;
 
@@ -547,8 +547,8 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct 
pci_device_id *id)
        virthbainfo = (struct virthba_info *) scsihost->hostdata;
        memset(virthbainfo, 0, sizeof(struct virthba_info));
        for (i = 0; i < VIRTHBASOPENMAX; i++) {
-               if (VirtHbasOpen[i].virthbainfo == NULL) {
-                       VirtHbasOpen[i].virthbainfo = virthbainfo;
+               if (virthbas_open[i].virthbainfo == NULL) {
+                       virthbas_open[i].virthbainfo = virthbainfo;
                        break;
                }
        }
@@ -584,10 +584,10 @@ virthba_probe(struct virtpci_dev *virtpcidev, const 
struct pci_device_id *id)
        DBGINF("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
               virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
 
-       pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
+       pchhdr = virthbainfo->chinfo.queueinfo->chan;
        pqhdr = (struct signal_queue_header __iomem *)
-               ((char __iomem *)pChannelHeader +
-                readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
+               ((char __iomem *)pchhdr +
+                readq(&pchhdr->ch_space_offset)) + IOCHAN_FROM_IOPART;
        virthbainfo->flags_addr = &pqhdr->features;
 
        if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
@@ -620,15 +620,15 @@ virthba_probe(struct virtpci_dev *virtpcidev, const 
struct pci_device_id *id)
                virthbainfo->interrupt_vector = -1;
                POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
        } else {
-               u64 __iomem *Features_addr =
+               u64 __iomem *features_addr =
                    &virthbainfo->chinfo.queueinfo->chan->features;
                LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
                       virthbainfo->interrupt_vector);
                mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
                         ULTRA_IO_DRIVER_DISABLES_INTS);
-               uisqueue_interlocked_and(Features_addr, mask);
+               uisqueue_interlocked_and(features_addr, mask);
                mask = ULTRA_IO_DRIVER_ENABLES_INTS;
-               uisqueue_interlocked_or(Features_addr, mask);
+               uisqueue_interlocked_or(features_addr, mask);
                rsltq_wait_usecs = 4000000;
        }
 
@@ -961,8 +961,8 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
        cmdrsp->scsi.bufflen = scsi_bufflen(scsicmd);
 
        /* keep track of the max buffer length so far. */
-       if (cmdrsp->scsi.bufflen > MaxBuffLen)
-               MaxBuffLen = cmdrsp->scsi.bufflen;
+       if (cmdrsp->scsi.bufflen > max_buff_len)
+               max_buff_len = cmdrsp->scsi.bufflen;
 
        if (scsi_sg_count(scsicmd) > MAX_PHYS_INFO) {
                LOGERR("scsicmd use_sg:%d greater than MAX:%d\n",
@@ -1383,13 +1383,13 @@ static ssize_t info_debugfs_read(struct file *file,
                return -ENOMEM;
 
        for (i = 0; i < VIRTHBASOPENMAX; i++) {
-               if (VirtHbasOpen[i].virthbainfo == NULL)
+               if (virthbas_open[i].virthbainfo == NULL)
                        continue;
 
-               virthbainfo = VirtHbasOpen[i].virthbainfo;
+               virthbainfo = virthbas_open[i].virthbainfo;
 
                str_pos += scnprintf(vbuf + str_pos,
-                               len - str_pos, "MaxBuffLen:%u\n", MaxBuffLen);
+                               len - str_pos, "max_buff_len:%u\n", 
max_buff_len);
 
                str_pos += scnprintf(vbuf + str_pos, len - str_pos,
                                "\nvirthba result queue poll wait:%d usecs.\n",
@@ -1425,7 +1425,7 @@ static ssize_t enable_ints_write(struct file *file,
        int i, new_value;
        struct virthba_info *virthbainfo;
 
-       u64 __iomem *Features_addr;
+       u64 __iomem *features_addr;
        u64 mask;
 
        if (count >= ARRAY_SIZE(buf))
@@ -1448,23 +1448,23 @@ static ssize_t enable_ints_write(struct file *file,
 
        /* set all counts to new_value usually 0 */
        for (i = 0; i < VIRTHBASOPENMAX; i++) {
-               if (VirtHbasOpen[i].virthbainfo != NULL) {
-                       virthbainfo = VirtHbasOpen[i].virthbainfo;
-                       Features_addr =
+               if (virthbas_open[i].virthbainfo != NULL) {
+                       virthbainfo = virthbas_open[i].virthbainfo;
+                       features_addr =
                                &virthbainfo->chinfo.queueinfo->chan->features;
                        if (new_value == 1) {
                                mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
                                         ULTRA_IO_DRIVER_DISABLES_INTS);
-                               uisqueue_interlocked_and(Features_addr, mask);
+                               uisqueue_interlocked_and(features_addr, mask);
                                mask = ULTRA_IO_DRIVER_ENABLES_INTS;
-                               uisqueue_interlocked_or(Features_addr, mask);
+                               uisqueue_interlocked_or(features_addr, mask);
                                rsltq_wait_usecs = 4000000;
                        } else {
                                mask = ~(ULTRA_IO_DRIVER_ENABLES_INTS |
                                         ULTRA_IO_DRIVER_DISABLES_INTS);
-                               uisqueue_interlocked_and(Features_addr, mask);
+                               uisqueue_interlocked_and(features_addr, mask);
                                mask = ULTRA_IO_CHANNEL_IS_POLLING;
-                               uisqueue_interlocked_or(Features_addr, mask);
+                               uisqueue_interlocked_or(features_addr, mask);
                                rsltq_wait_usecs = 4000;
                        }
                }
@@ -1665,13 +1665,13 @@ virthba_mod_init(void)
                debugfs_create_file("enable_ints", S_IWUSR,
                                virthba_debugfs_dir, NULL,
                                &debugfs_enable_ints_fops);
-               /* Initialize DARWorkQ */
-               INIT_WORK(&DARWorkQ, doDiskAddRemove);
-               spin_lock_init(&DARWorkQLock);
+               /* Initialize dar_work_queue */
+               INIT_WORK(&dar_work_queue, do_disk_add_remove);
+               spin_lock_init(&dar_work_queue_lock);
 
                /* clear out array */
                for (i = 0; i < VIRTHBASOPENMAX; i++)
-                       VirtHbasOpen[i].virthbainfo = NULL;
+                       virthbas_open[i].virthbainfo = NULL;
                /* Initialize the serverdown workqueue */
                virthba_serverdown_workqueue =
                    create_singlethread_workqueue("virthba_serverdown");
-- 
1.7.9.5

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to