linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: 3w-sas: Clean up errors in 3w-sas.h
@ 2023-09-27  8:49 chenguohua
  2023-09-27 14:01 ` Bart Van Assche
  0 siblings, 1 reply; 2+ messages in thread
From: chenguohua @ 2023-09-27  8:49 UTC (permalink / raw)
  To: aradford, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required after that ',' (ctx:VxV)
ERROR: open brace '{' following struct go on the same line

Signed-off-by: GuoHua Cheng <chenguohua@jari.cn>
---
 drivers/scsi/3w-sas.h | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/3w-sas.h b/drivers/scsi/3w-sas.h
index 096dec29e2ac..3443ccbf73e1 100644
--- a/drivers/scsi/3w-sas.h
+++ b/drivers/scsi/3w-sas.h
@@ -46,8 +46,7 @@
 #define _3W_SAS_H
 
 /* AEN severity table */
-static char *twl_aen_severity_table[] =
-{
+static char *twl_aen_severity_table[] = {
 	"None", "ERROR", "WARNING", "INFO", "DEBUG", NULL
 };
 
@@ -152,11 +151,11 @@ static char *twl_aen_severity_table[] =
 /* Bitmask macros to eliminate bitfields */
 
 /* opcode: 5, reserved: 3 */
-#define TW_OPRES_IN(x,y) ((x << 5) | (y & 0x1f))
+#define TW_OPRES_IN(x, y) ((x << 5) | (y & 0x1f))
 #define TW_OP_OUT(x) (x & 0x1f)
 
 /* opcode: 5, sgloffset: 3 */
-#define TW_OPSGL_IN(x,y) ((x << 5) | (y & 0x1f))
+#define TW_OPSGL_IN(x, y) ((x << 5) | (y & 0x1f))
 #define TW_SGL_OUT(x) ((x >> 5) & 0x7)
 
 /* severity: 3, reserved: 5 */
@@ -204,11 +203,11 @@ static char *twl_aen_severity_table[] =
 	(writel(TWL_ISSUE_SOFT_RESET, TWL_HIBDB_REG_ADDR(tw_dev)))
 
 /* Macros */
-#define TW_PRINTK(h,a,b,c) { \
+#define TW_PRINTK(h, a, b, c) { \
 if (h) \
-printk(KERN_WARNING "3w-sas: scsi%d: ERROR: (0x%02X:0x%04X): %s.\n",h->host_no,a,b,c); \
+printk(KERN_WARNING "3w-sas: scsi%d: ERROR: (0x%02X:0x%04X): %s.\n", h->host_no, a, b, c); \
 else \
-printk(KERN_WARNING "3w-sas: ERROR: (0x%02X:0x%04X): %s.\n",a,b,c); \
+printk(KERN_WARNING "3w-sas: ERROR: (0x%02X:0x%04X): %s.\n", a, b, c); \
 }
 #define TW_MAX_LUNS 16
 #define TW_COMMAND_SIZE (sizeof(dma_addr_t) > 4 ? 6 : 4)
@@ -310,8 +309,7 @@ typedef struct TAG_TW_Initconnect {
 } TW_Initconnect;
 
 /* Event info structure */
-typedef struct TAG_TW_Event
-{
+typedef struct TAG_TW_Event {
 	unsigned int sequence_id;
 	unsigned int time_stamp_sec;
 	unsigned short aen_code;
@@ -348,8 +346,7 @@ typedef struct {
 } TW_Param_Apache;
 
 /* Compatibility information structure */
-typedef struct TAG_TW_Compatibility_Info
-{
+typedef struct TAG_TW_Compatibility_Info {
 	char driver_version[32];
 	unsigned short working_srl;
 	unsigned short working_branch;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: 3w-sas: Clean up errors in 3w-sas.h
  2023-09-27  8:49 [PATCH] scsi: 3w-sas: Clean up errors in 3w-sas.h chenguohua
@ 2023-09-27 14:01 ` Bart Van Assche
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2023-09-27 14:01 UTC (permalink / raw)
  To: chenguohua, aradford, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

On 9/27/23 01:49, chenguohua@jari.cn wrote:
> Fix the following errors reported by checkpatch:

checkpatch is a tool that should only be used to verify new patches
before posting these on a Linux kernel related mailing list. It should
not be used to "fix" old code.

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-27 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27  8:49 [PATCH] scsi: 3w-sas: Clean up errors in 3w-sas.h chenguohua
2023-09-27 14:01 ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).