diff mbox series

[05/11] pragma once: convert drivers/scsi/qla2xxx/qla_target.h

Message ID YDvMYoYcHN5wVDpo@localhost.localdomain (mailing list archive)
State Changes Requested
Headers show
Series None | expand

Commit Message

Alexey Dobriyan Feb. 28, 2021, 5:01 p.m. UTC
From 1f58b4923ca9bfb8b1e73554d3793ee98ab58a77 Mon Sep 17 00:00:00 2001
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Tue, 9 Feb 2021 17:14:25 +0300
Subject: [PATCH 05/11] pragma once: convert drivers/scsi/qla2xxx/qla_target.h

This file has broken include guard which is not obvious just by looking
at the code. Convert it manually. I think I got #endif right.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
 drivers/scsi/qla2xxx/qla_target.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Bart Van Assche Feb. 28, 2021, 10:07 p.m. UTC | #1
On 2/28/21 9:01 AM, Alexey Dobriyan wrote:
> This file has broken include guard which is not obvious just by looking
> at the code. Convert it manually. I think I got #endif right.

Why do you think that the include guard is broken? Please mention this
in the patch description.

> -
> -#ifndef __QLA_TARGET_H
> -#define __QLA_TARGET_H
> -
> +#pragma once
>  #include "qla_def.h"
>  #include "qla_dsd.h"

Please insert a blank line between #pragma once and the #include directives.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index 10e5e6c8087d..923910dd1809 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -15,10 +15,7 @@ 
  * This is the global def file that is useful for including from the
  * target portion.
  */
-
-#ifndef __QLA_TARGET_H
-#define __QLA_TARGET_H
-
+#pragma once
 #include "qla_def.h"
 #include "qla_dsd.h"
 
@@ -116,7 +113,6 @@ 
 	(min(1270, ((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD_24XX + \
 		QLA_TGT_DATASEGS_PER_CONT_24XX*((ql) - 1)) : 0))
 #endif
-#endif
 
 #define GET_TARGET_ID(ha, iocb) ((HAS_EXTENDED_IDS(ha))			\
 			 ? le16_to_cpu((iocb)->u.isp2x.target.extended)	\
@@ -244,6 +240,7 @@  struct ctio_to_2xxx {
 #ifndef CTIO_RET_TYPE
 #define CTIO_RET_TYPE	0x17		/* CTIO return entry */
 #define ATIO_TYPE7 0x06 /* Accept target I/O entry for 24xx */
+#endif
 
 struct fcp_hdr {
 	uint8_t  r_ctl;
@@ -1082,5 +1079,3 @@  extern void qlt_do_generation_tick(struct scsi_qla_host *, int *);
 
 void qlt_send_resp_ctio(struct qla_qpair *, struct qla_tgt_cmd *, uint8_t,
     uint8_t, uint8_t, uint8_t);
-
-#endif /* __QLA_TARGET_H */