From: "Tobin C. Harding" <me@tobin.cc> To: Don Brace <don.brace@microsemi.com> Cc: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, "Tobin C. Harding" <me@tobin.cc> Subject: [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Date: Wed, 22 Feb 2017 06:12:37 +0000 [thread overview] Message-ID: <1487743958-4208-3-git-send-email-me@tobin.cc> (raw) In-Reply-To: <1487743958-4208-1-git-send-email-me@tobin.cc> Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding <me@tobin.cc> --- drivers/block/cciss_scsi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 2b8cfd4..f5c21f3 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -699,10 +699,8 @@ static void complete_scsi_command(CommandList_struct *c, int timeout, ei->SenseLen); scsi_set_resid(cmd, ei->ResidualCnt); - if(ei->CommandStatus != 0) - { /* an error has occurred */ - switch(ei->CommandStatus) - { + if (ei->CommandStatus != 0) { /* an error has occurred */ + switch (ei->CommandStatus) { case CMD_TARGET_STATUS: /* Pass it up to the upper layers... */ if (!ei->ScsiStatus) { @@ -902,8 +900,7 @@ cciss_scsi_interpret_error(ctlr_info_t *h, CommandList_struct *c) ErrorInfo_struct *ei; ei = c->err_info; - switch(ei->CommandStatus) - { + switch (ei->CommandStatus) { case CMD_TARGET_STATUS: dev_warn(&h->pdev->dev, "cmd %p has completed with errors\n", c); @@ -1182,8 +1179,7 @@ cciss_update_non_disk_devices(ctlr_info_t *h, int hostno) cciss_scsi_get_device_id(h, scsi3addr, this_device->device_id, sizeof(this_device->device_id)); - switch (this_device->devtype) - { + switch (this_device->devtype) { case 0x05: /* CD-ROM */ { /* We don't *really* support actual CD-ROM devices, @@ -1414,8 +1410,7 @@ cciss_scsi_queue_command_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn memcpy(c->Request.CDB, cmd->cmnd, cmd->cmd_len); c->Request.Type.Type = TYPE_CMD; c->Request.Type.Attribute = ATTR_SIMPLE; - switch(cmd->sc_data_direction) - { + switch (cmd->sc_data_direction) { case DMA_TO_DEVICE: c->Request.Type.Direction = XFER_WRITE; break; -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: "Tobin C. Harding" <me@tobin.cc> To: Don Brace <don.brace@microsemi.com> Cc: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, "Tobin C. Harding" <me@tobin.cc> Subject: [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Date: Wed, 22 Feb 2017 17:12:37 +1100 [thread overview] Message-ID: <1487743958-4208-3-git-send-email-me@tobin.cc> (raw) In-Reply-To: <1487743958-4208-1-git-send-email-me@tobin.cc> Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding <me@tobin.cc> --- drivers/block/cciss_scsi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 2b8cfd4..f5c21f3 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -699,10 +699,8 @@ static void complete_scsi_command(CommandList_struct *c, int timeout, ei->SenseLen); scsi_set_resid(cmd, ei->ResidualCnt); - if(ei->CommandStatus != 0) - { /* an error has occurred */ - switch(ei->CommandStatus) - { + if (ei->CommandStatus != 0) { /* an error has occurred */ + switch (ei->CommandStatus) { case CMD_TARGET_STATUS: /* Pass it up to the upper layers... */ if (!ei->ScsiStatus) { @@ -902,8 +900,7 @@ cciss_scsi_interpret_error(ctlr_info_t *h, CommandList_struct *c) ErrorInfo_struct *ei; ei = c->err_info; - switch(ei->CommandStatus) - { + switch (ei->CommandStatus) { case CMD_TARGET_STATUS: dev_warn(&h->pdev->dev, "cmd %p has completed with errors\n", c); @@ -1182,8 +1179,7 @@ cciss_update_non_disk_devices(ctlr_info_t *h, int hostno) cciss_scsi_get_device_id(h, scsi3addr, this_device->device_id, sizeof(this_device->device_id)); - switch (this_device->devtype) - { + switch (this_device->devtype) { case 0x05: /* CD-ROM */ { /* We don't *really* support actual CD-ROM devices, @@ -1414,8 +1410,7 @@ cciss_scsi_queue_command_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn memcpy(c->Request.CDB, cmd->cmnd, cmd->cmd_len); c->Request.Type.Type = TYPE_CMD; c->Request.Type.Attribute = ATTR_SIMPLE; - switch(cmd->sc_data_direction) - { + switch (cmd->sc_data_direction) { case DMA_TO_DEVICE: c->Request.Type.Direction = XFER_WRITE; break; -- 2.7.4
next prev parent reply other threads:[~2017-02-22 6:12 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-02-22 5:49 [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Tobin C. Harding 2017-02-22 5:49 ` Tobin C. Harding 2017-02-22 5:49 ` [PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE Tobin C. Harding 2017-02-22 5:49 ` Tobin C. Harding 2017-02-22 5:49 ` [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Tobin C. Harding 2017-02-22 5:49 ` Tobin C. Harding 2017-02-22 5:49 ` [PATCH 3/3] cciss: Remove kmalloc cast Tobin C. Harding 2017-02-22 5:49 ` Tobin C. Harding 2017-02-22 6:12 ` [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Tobin C. Harding 2017-02-22 6:12 ` Tobin C. Harding 2017-02-22 6:12 ` [PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE Tobin C. Harding 2017-02-22 6:12 ` Tobin C. Harding 2017-02-22 15:20 ` Don Brace 2017-02-22 6:12 ` Tobin C. Harding [this message] 2017-02-22 6:12 ` [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE Tobin C. Harding 2017-02-22 15:17 ` Don Brace 2017-02-22 6:12 ` [PATCH 3/3] cciss: Remove kmalloc cast Tobin C. Harding 2017-02-22 6:12 ` Tobin C. Harding 2017-02-22 15:16 ` Don Brace 2017-02-22 15:34 ` [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings Jens Axboe 2017-02-22 15:34 ` Jens Axboe
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1487743958-4208-3-git-send-email-me@tobin.cc \ --to=me@tobin.cc \ --cc=don.brace@microsemi.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-scsi@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.