RE: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
This patch removes all of the unnecessary spaces after casts within the virthba.c file. The checkpatch script was run again after these changes, and no remove spaces after casts checks were generated. Signed-off-by: Ken Depro kenneth.de...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 130 +++--- 1 file changed, 65 insertions(+), 65 deletions(-) Please disregard this patch for review. There are multiple checkpatch warnings in virthba.c, and I will send a series of patches fixing these up. Ken ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
This patch removes all of the unnecessary spaces after casts within the virthba.c file. The checkpatch script was run again after these changes, and no remove spaces after casts checks were generated. Signed-off-by: Ken Depro kenneth.de...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 130 +++--- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index d7a629b..758a39e 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -260,7 +260,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new) insert_location = vhbainfo-nextinsert; while (vhbainfo-pending[insert_location].sent != NULL) { insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS; - if (insert_location == (int) vhbainfo-nextinsert) { + if (insert_location == (int)vhbainfo-nextinsert) { LOGERR(Queue should be full. insert_location%d Unable to find open slot for pending commands.\n, insert_location); spin_unlock_irqrestore(vhbainfo-privlock, flags); @@ -289,7 +289,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype, insert_location = add_scsipending_entry(vhbainfo, cmdtype, new); } - return (unsigned int) insert_location; + return (unsigned int)insert_location; } static void * @@ -300,13 +300,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del) if (del = MAX_PENDING_REQUESTS) { LOGERR(Invalid queue position %lu given to delete. MAX_PENDING_REQUESTS %d\n, -(unsigned long) del, MAX_PENDING_REQUESTS); +(unsigned long)del, MAX_PENDING_REQUESTS); } else { spin_lock_irqsave(vhbainfo-privlock, flags); if (vhbainfo-pending[del].sent == NULL) LOGERR(Deleting already cleared queue entry at %lu.\n, -(unsigned long) del); +(unsigned long)del); sent = vhbainfo-pending[del].sent; @@ -418,7 +418,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp) static irqreturn_t virthba_ISR(int irq, void *dev_id) { - struct virthba_info *virthbainfo = (struct virthba_info *) dev_id; + struct virthba_info *virthbainfo = (struct virthba_info *)dev_id; struct channel_header __iomem *pChannelHeader; struct signal_queue_header __iomem *pqhdr; u64 mask; @@ -442,7 +442,7 @@ virthba_ISR(int irq, void *dev_id) return IRQ_NONE; } pqhdr = (struct signal_queue_header __iomem *) - ((char __iomem *) pChannelHeader + + ((char __iomem *)pChannelHeader + readq(pChannelHeader-ch_space_offset)) + IOCHAN_FROM_IOPART; writeq(readq(pqhdr-num_irq_received) + 1, pqhdr-num_irq_received); @@ -501,19 +501,19 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id) * the max-channel value. */ LOGINF(virtpcidev-scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n, -(unsigned) virtpcidev-scsi.max.max_channel - 1, -(unsigned) virtpcidev-scsi.max.max_id, -(unsigned) virtpcidev-scsi.max.max_lun, -(unsigned) virtpcidev-scsi.max.cmd_per_lun, -(unsigned) virtpcidev-scsi.max.max_io_size); - scsihost-max_channel = (unsigned) virtpcidev-scsi.max.max_channel; - scsihost-max_id = (unsigned) virtpcidev-scsi.max.max_id; - scsihost-max_lun = (unsigned) virtpcidev-scsi.max.max_lun; - scsihost-cmd_per_lun = (unsigned) virtpcidev-scsi.max.cmd_per_lun; +(unsigned)virtpcidev-scsi.max.max_channel - 1, +(unsigned)virtpcidev-scsi.max.max_id, +(unsigned)virtpcidev-scsi.max.max_lun, +(unsigned)virtpcidev-scsi.max.cmd_per_lun, +(unsigned)virtpcidev-scsi.max.max_io_size); + scsihost-max_channel = (unsigned)virtpcidev-scsi.max.max_channel; + scsihost-max_id = (unsigned)virtpcidev-scsi.max.max_id; + scsihost-max_lun = (unsigned)virtpcidev-scsi.max.max_lun; + scsihost-cmd_per_lun = (unsigned)virtpcidev-scsi.max.cmd_per_lun; scsihost-max_sectors = - (unsigned short) (virtpcidev-scsi.max.max_io_size 9); + (unsigned short)(virtpcidev-scsi.max.max_io_size 9); scsihost-sg_tablesize = - (unsigned short) (virtpcidev-scsi.max.max_io_size / PAGE_SIZE); + (unsigned short)(virtpcidev-scsi.max.max_io_size / PAGE_SIZE); if (scsihost-sg_tablesize MAX_PHYS_INFO) scsihost-sg_tablesize = MAX_PHYS_INFO;
[PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
From: Ken Depro kenneth.de...@unisys.com This patch removes unneeded spaces after casts within the virthba.c file. The checkpatch script was run after these changes, and no remove spaces after casts checks were generated. Later patches will fix the other checkpatch warnings/checks. Conflicts: drivers/staging/unisys/virthba/virthba.c Signed-off-by: Ken Depro kenneth.de...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 134 +++--- 1 files changed, 67 insertions(+), 67 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index d7a629b..686aa92 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -260,7 +260,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new) insert_location = vhbainfo-nextinsert; while (vhbainfo-pending[insert_location].sent != NULL) { insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS; - if (insert_location == (int) vhbainfo-nextinsert) { + if (insert_location == (int)vhbainfo-nextinsert) { LOGERR(Queue should be full. insert_location%d Unable to find open slot for pending commands.\n, insert_location); spin_unlock_irqrestore(vhbainfo-privlock, flags); @@ -289,7 +289,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype, insert_location = add_scsipending_entry(vhbainfo, cmdtype, new); } - return (unsigned int) insert_location; + return (unsigned int)insert_location; } static void * @@ -300,13 +300,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del) if (del = MAX_PENDING_REQUESTS) { LOGERR(Invalid queue position %lu given to delete. MAX_PENDING_REQUESTS %d\n, -(unsigned long) del, MAX_PENDING_REQUESTS); +(unsigned long)del, MAX_PENDING_REQUESTS); } else { spin_lock_irqsave(vhbainfo-privlock, flags); if (vhbainfo-pending[del].sent == NULL) LOGERR(Deleting already cleared queue entry at %lu.\n, -(unsigned long) del); +(unsigned long)del); sent = vhbainfo-pending[del].sent; @@ -418,7 +418,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp) static irqreturn_t virthba_ISR(int irq, void *dev_id) { - struct virthba_info *virthbainfo = (struct virthba_info *) dev_id; + struct virthba_info *virthbainfo = (struct virthba_info *)dev_id; struct channel_header __iomem *pChannelHeader; struct signal_queue_header __iomem *pqhdr; u64 mask; @@ -442,7 +442,7 @@ virthba_ISR(int irq, void *dev_id) return IRQ_NONE; } pqhdr = (struct signal_queue_header __iomem *) - ((char __iomem *) pChannelHeader + + ((char __iomem *)pChannelHeader + readq(pChannelHeader-ch_space_offset)) + IOCHAN_FROM_IOPART; writeq(readq(pqhdr-num_irq_received) + 1, pqhdr-num_irq_received); @@ -501,19 +501,19 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id) * the max-channel value. */ LOGINF(virtpcidev-scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n, -(unsigned) virtpcidev-scsi.max.max_channel - 1, -(unsigned) virtpcidev-scsi.max.max_id, -(unsigned) virtpcidev-scsi.max.max_lun, -(unsigned) virtpcidev-scsi.max.cmd_per_lun, -(unsigned) virtpcidev-scsi.max.max_io_size); - scsihost-max_channel = (unsigned) virtpcidev-scsi.max.max_channel; - scsihost-max_id = (unsigned) virtpcidev-scsi.max.max_id; - scsihost-max_lun = (unsigned) virtpcidev-scsi.max.max_lun; - scsihost-cmd_per_lun = (unsigned) virtpcidev-scsi.max.cmd_per_lun; +(unsigned)virtpcidev-scsi.max.max_channel - 1, +(unsigned)virtpcidev-scsi.max.max_id, +(unsigned)virtpcidev-scsi.max.max_lun, +(unsigned)virtpcidev-scsi.max.cmd_per_lun, +(unsigned)virtpcidev-scsi.max.max_io_size); + scsihost-max_channel = (unsigned)virtpcidev-scsi.max.max_channel; + scsihost-max_id = (unsigned)virtpcidev-scsi.max.max_id; + scsihost-max_lun = (unsigned)virtpcidev-scsi.max.max_lun; + scsihost-cmd_per_lun = (unsigned)virtpcidev-scsi.max.cmd_per_lun; scsihost-max_sectors = - (unsigned short) (virtpcidev-scsi.max.max_io_size 9); + (unsigned short)(virtpcidev-scsi.max.max_io_size 9); scsihost-sg_tablesize = - (unsigned short) (virtpcidev-scsi.max.max_io_size / PAGE_SIZE); + (unsigned
Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
On Thu, Nov 06, 2014 at 10:33:28AM -0500, Ken Depro wrote: - LOGINF(virtpcidev bus_no%ddevNo%d, virtpcidev-bus_no, -virtpcidev-device_no); - virthbainfo = (struct virthba_info *) scsihost-hostdata; + LOGINF(virtpcidev busNo%ddevNo%d, virtpcidev-busNo, +virtpcidev-deviceNo); That's odd. Some struct members are renamed. Does this introduce a compile problem or does it fix one? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
On Thu, Nov 06, 2014 at 10:33:28AM -0500, Ken Depro wrote: From: Ken Depro kenneth.de...@unisys.com This patch removes unneeded spaces after casts within the virthba.c file. The checkpatch script was run after these changes, and no remove spaces after casts checks were generated. Later patches will fix the other checkpatch warnings/checks. Conflicts: drivers/staging/unisys/virthba/virthba.c How can a single patch conflict with anything else? What is this here from? confused, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
Dan, The CamelCase version is what is currently present in our source. I have not addressed/fixed those checks yet. With the members as busNo and deviceNo, the kernel builds cleanly. I'm not sure why they showed up as non-CamelCase in the diff. Ken -Original Message- From: Dan Carpenter [mailto:dan.carpen...@oracle.com] Sent: Thursday, November 06, 2014 10:55 AM To: Depro, Kenneth J Cc: gre...@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; *S-Par-Maintainer Subject: Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c On Thu, Nov 06, 2014 at 10:33:28AM -0500, Ken Depro wrote: - LOGINF(virtpcidev bus_no%ddevNo%d, virtpcidev-bus_no, -virtpcidev-device_no); - virthbainfo = (struct virthba_info *) scsihost-hostdata; + LOGINF(virtpcidev busNo%ddevNo%d, virtpcidev-busNo, +virtpcidev-deviceNo); That's odd. Some struct members are renamed. Does this introduce a compile problem or does it fix one? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
Greg, When I executed the format-patch command, it added the conflict lines below. There was indeed a conflict in this file from yesterday (I had originally pulled/built from staging-next, but there was another pending patch of mine in staging-testing that was not in -next, which caused the original apply failure). Ken -Original Message- From: Greg KH [mailto:gre...@linuxfoundation.org] Sent: Thursday, November 06, 2014 11:09 AM To: Depro, Kenneth J Cc: j...@redhat.com; driverdev-devel@linuxdriverproject.org; *S-Par-Maintainer Subject: Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c On Thu, Nov 06, 2014 at 10:33:28AM -0500, Ken Depro wrote: From: Ken Depro kenneth.de...@unisys.com This patch removes unneeded spaces after casts within the virthba.c file. The checkpatch script was run after these changes, and no remove spaces after casts checks were generated. Later patches will fix the other checkpatch warnings/checks. Conflicts: drivers/staging/unisys/virthba/virthba.c How can a single patch conflict with anything else? What is this here from? confused, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Thu, Nov 06, 2014 at 10:22:30AM -0600, Depro, Kenneth J wrote: Greg, When I executed the format-patch command, it added the conflict lines below. There was indeed a conflict in this file from yesterday (I had originally pulled/built from staging-next, but there was another pending patch of mine in staging-testing that was not in -next, which caused the original apply failure). Please line-wrap your emails... Anyway, please resend this, with the change that Dan pointed out, and the text removed from the changelog area, as obviously, that doesn't make any sense to have in a patch, right? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
From: Ken Depro kenneth.de...@unisys.com This patch removes unneeded spaces after casts within the virthba.c file. The checkpatch script was run after these changes, and no remove spaces after casts checks were generated. Later patches will fix the other checkpatch warnings/checks. Signed-off-by: Ken Depro kenneth.de...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 130 +++--- 1 files changed, 65 insertions(+), 65 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index ee1be5a..d435734 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -261,7 +261,7 @@ add_scsipending_entry(struct virthba_info *vhbainfo, char cmdtype, void *new) insert_location = vhbainfo-nextinsert; while (vhbainfo-pending[insert_location].sent != NULL) { insert_location = (insert_location + 1) % MAX_PENDING_REQUESTS; - if (insert_location == (int) vhbainfo-nextinsert) { + if (insert_location == (int)vhbainfo-nextinsert) { LOGERR(Queue should be full. insert_location%d Unable to find open slot for pending commands.\n, insert_location); spin_unlock_irqrestore(vhbainfo-privlock, flags); @@ -290,7 +290,7 @@ add_scsipending_entry_with_wait(struct virthba_info *vhbainfo, char cmdtype, insert_location = add_scsipending_entry(vhbainfo, cmdtype, new); } - return (unsigned int) insert_location; + return (unsigned int)insert_location; } static void * @@ -301,13 +301,13 @@ del_scsipending_entry(struct virthba_info *vhbainfo, uintptr_t del) if (del = MAX_PENDING_REQUESTS) { LOGERR(Invalid queue position %lu given to delete. MAX_PENDING_REQUESTS %d\n, -(unsigned long) del, MAX_PENDING_REQUESTS); +(unsigned long)del, MAX_PENDING_REQUESTS); } else { spin_lock_irqsave(vhbainfo-privlock, flags); if (vhbainfo-pending[del].sent == NULL) LOGERR(Deleting already cleared queue entry at %lu.\n, -(unsigned long) del); +(unsigned long)del); sent = vhbainfo-pending[del].sent; @@ -419,7 +419,7 @@ process_disk_notify(struct Scsi_Host *shost, struct uiscmdrsp *cmdrsp) static irqreturn_t virthba_ISR(int irq, void *dev_id) { - struct virthba_info *virthbainfo = (struct virthba_info *) dev_id; + struct virthba_info *virthbainfo = (struct virthba_info *)dev_id; struct channel_header __iomem *pChannelHeader; struct signal_queue_header __iomem *pqhdr; u64 mask; @@ -443,7 +443,7 @@ virthba_ISR(int irq, void *dev_id) return IRQ_NONE; } pqhdr = (struct signal_queue_header __iomem *) - ((char __iomem *) pChannelHeader + + ((char __iomem *)pChannelHeader + readq(pChannelHeader-ch_space_offset)) + IOCHAN_FROM_IOPART; writeq(readq(pqhdr-num_irq_received) + 1, pqhdr-num_irq_received); @@ -502,19 +502,19 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id) * the max-channel value. */ LOGINF(virtpcidev-scsi.max.max_channel=%u, max_id=%u, max_lun=%u, cmd_per_lun=%u, max_io_size=%u\n, -(unsigned) virtpcidev-scsi.max.max_channel - 1, -(unsigned) virtpcidev-scsi.max.max_id, -(unsigned) virtpcidev-scsi.max.max_lun, -(unsigned) virtpcidev-scsi.max.cmd_per_lun, -(unsigned) virtpcidev-scsi.max.max_io_size); - scsihost-max_channel = (unsigned) virtpcidev-scsi.max.max_channel; - scsihost-max_id = (unsigned) virtpcidev-scsi.max.max_id; - scsihost-max_lun = (unsigned) virtpcidev-scsi.max.max_lun; - scsihost-cmd_per_lun = (unsigned) virtpcidev-scsi.max.cmd_per_lun; +(unsigned)virtpcidev-scsi.max.max_channel - 1, +(unsigned)virtpcidev-scsi.max.max_id, +(unsigned)virtpcidev-scsi.max.max_lun, +(unsigned)virtpcidev-scsi.max.cmd_per_lun, +(unsigned)virtpcidev-scsi.max.max_io_size); + scsihost-max_channel = (unsigned)virtpcidev-scsi.max.max_channel; + scsihost-max_id = (unsigned)virtpcidev-scsi.max.max_id; + scsihost-max_lun = (unsigned)virtpcidev-scsi.max.max_lun; + scsihost-cmd_per_lun = (unsigned)virtpcidev-scsi.max.cmd_per_lun; scsihost-max_sectors = - (unsigned short) (virtpcidev-scsi.max.max_io_size 9); + (unsigned short)(virtpcidev-scsi.max.max_io_size 9); scsihost-sg_tablesize = - (unsigned short) (virtpcidev-scsi.max.max_io_size / PAGE_SIZE); + (unsigned short)(virtpcidev-scsi.max.max_io_size / PAGE_SIZE); if
Re: [PATCH] staging: unisys: Remove unnecessary spaces after casts in virthba.c
On Wed, Nov 05, 2014 at 04:04:32PM -0500, Ken Depro wrote: From: Ken Depro kenneth.de...@unisys.com This patch removes unneeded spaces after casts within the virthba.c file. The checkpatch script was run after these changes, and no remove spaces after casts checks were generated. Later patches will fix the other checkpatch warnings/checks. Signed-off-by: Ken Depro kenneth.de...@unisys.com --- drivers/staging/unisys/virthba/virthba.c | 130 +++--- 1 files changed, 65 insertions(+), 65 deletions(-) This doesn't apply to my tree, please always sync up with changes that others on your team have sent in for the same file... ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel