* [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:54 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 2/7] cxl/region: Fix a checkpatch warning Jeongtae Park
` (5 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
The SPDX license identifier for C header have to be added
in form of a C-like comment.
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/core/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
index a0b5819bc70b..7aee7fb008a5 100644
--- a/drivers/cxl/core/trace.h
+++ b/drivers/cxl/core/trace.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM cxl
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file
2023-09-21 2:51 ` [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file Jeongtae Park
@ 2023-09-21 22:54 ` Dave Jiang
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:54 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> The SPDX license identifier for C header have to be added
> in form of a C-like comment.
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/core/trace.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> index a0b5819bc70b..7aee7fb008a5 100644
> --- a/drivers/cxl/core/trace.h
> +++ b/drivers/cxl/core/trace.h
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +/* SPDX-License-Identifier: GPL-2.0 */
> /* Copyright(c) 2022 Intel Corporation. All rights reserved. */
> #undef TRACE_SYSTEM
> #define TRACE_SYSTEM cxl
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/7] cxl/region: Fix a checkpatch warning
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
2023-09-21 2:51 ` [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:55 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 3/7] cxl/mem: Fix a checkpatch error Jeongtae Park
` (4 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
WARNING: else is not generally useful after a break or return
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/core/region.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index e115ba382e04..1fc9d01c1ac0 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -133,11 +133,10 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
&cxlr->dev,
"Bypassing cpu_cache_invalidate_memregion() for testing!\n");
return 0;
- } else {
- dev_err(&cxlr->dev,
- "Failed to synchronize CPU cache state\n");
- return -ENXIO;
}
+
+ dev_err(&cxlr->dev, "Failed to synchronize CPU cache state\n");
+ return -ENXIO;
}
cpu_cache_invalidate_memregion(IORES_DESC_CXL);
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/7] cxl/region: Fix a checkpatch warning
2023-09-21 2:51 ` [PATCH 2/7] cxl/region: Fix a checkpatch warning Jeongtae Park
@ 2023-09-21 22:55 ` Dave Jiang
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:55 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> WARNING: else is not generally useful after a break or return
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/core/region.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index e115ba382e04..1fc9d01c1ac0 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -133,11 +133,10 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
> &cxlr->dev,
> "Bypassing cpu_cache_invalidate_memregion() for testing!\n");
> return 0;
> - } else {
> - dev_err(&cxlr->dev,
> - "Failed to synchronize CPU cache state\n");
> - return -ENXIO;
> }
> +
> + dev_err(&cxlr->dev, "Failed to synchronize CPU cache state\n");
> + return -ENXIO;
> }
>
> cpu_cache_invalidate_memregion(IORES_DESC_CXL);
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/7] cxl/mem: Fix a checkpatch error
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
2023-09-21 2:51 ` [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file Jeongtae Park
2023-09-21 2:51 ` [PATCH 2/7] cxl/region: Fix a checkpatch warning Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:55 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 4/7] cxl: " Jeongtae Park
` (3 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
ERROR: spaces required around that '=' (ctx:WxV)
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/cxlmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 79e99c873ca2..1ac3eb2be84f 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -183,7 +183,7 @@ struct cxl_mbox_cmd_rc {
};
static const
-struct cxl_mbox_cmd_rc cxl_mbox_cmd_rctable[] ={ CMD_CMD_RC_TABLE };
+struct cxl_mbox_cmd_rc cxl_mbox_cmd_rctable[] = { CMD_CMD_RC_TABLE };
#undef C
static inline const char *cxl_mbox_cmd_rc2str(struct cxl_mbox_cmd *mbox_cmd)
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 3/7] cxl/mem: Fix a checkpatch error
2023-09-21 2:51 ` [PATCH 3/7] cxl/mem: Fix a checkpatch error Jeongtae Park
@ 2023-09-21 22:55 ` Dave Jiang
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:55 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> ERROR: spaces required around that '=' (ctx:WxV)
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/cxlmem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index 79e99c873ca2..1ac3eb2be84f 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -183,7 +183,7 @@ struct cxl_mbox_cmd_rc {
> };
>
> static const
> -struct cxl_mbox_cmd_rc cxl_mbox_cmd_rctable[] ={ CMD_CMD_RC_TABLE };
> +struct cxl_mbox_cmd_rc cxl_mbox_cmd_rctable[] = { CMD_CMD_RC_TABLE };
> #undef C
>
> static inline const char *cxl_mbox_cmd_rc2str(struct cxl_mbox_cmd *mbox_cmd)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 4/7] cxl: Fix a checkpatch error
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
` (2 preceding siblings ...)
2023-09-21 2:51 ` [PATCH 3/7] cxl/mem: Fix a checkpatch error Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:56 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 5/7] cxl: Fix block comment style Jeongtae Park
` (2 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
ERROR: Macros with complex values should be enclosed in parentheses
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/cxl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index 76d92561af29..545381355efb 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -142,7 +142,7 @@ static inline int ways_to_eiw(unsigned int ways, u8 *eiw)
#define CXL_RAS_HEADER_LOG_OFFSET 0x18
#define CXL_RAS_CAPABILITY_LENGTH 0x58
#define CXL_HEADERLOG_SIZE SZ_512
-#define CXL_HEADERLOG_SIZE_U32 SZ_512 / sizeof(u32)
+#define CXL_HEADERLOG_SIZE_U32 (SZ_512 / sizeof(u32))
/* CXL 2.0 8.2.8.1 Device Capabilities Array Register */
#define CXLDEV_CAP_ARRAY_OFFSET 0x0
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 4/7] cxl: Fix a checkpatch error
2023-09-21 2:51 ` [PATCH 4/7] cxl: " Jeongtae Park
@ 2023-09-21 22:56 ` Dave Jiang
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:56 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/cxl.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index 76d92561af29..545381355efb 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -142,7 +142,7 @@ static inline int ways_to_eiw(unsigned int ways, u8 *eiw)
> #define CXL_RAS_HEADER_LOG_OFFSET 0x18
> #define CXL_RAS_CAPABILITY_LENGTH 0x58
> #define CXL_HEADERLOG_SIZE SZ_512
> -#define CXL_HEADERLOG_SIZE_U32 SZ_512 / sizeof(u32)
> +#define CXL_HEADERLOG_SIZE_U32 (SZ_512 / sizeof(u32))
>
> /* CXL 2.0 8.2.8.1 Device Capabilities Array Register */
> #define CXLDEV_CAP_ARRAY_OFFSET 0x0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/7] cxl: Fix block comment style
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
` (3 preceding siblings ...)
2023-09-21 2:51 ` [PATCH 4/7] cxl: " Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:56 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings Jeongtae Park
2023-09-21 2:51 ` [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Jeongtae Park
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
WARNING: Block comments should align the * on each line
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/cxl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index 545381355efb..0bbe0c15bfa9 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -334,7 +334,7 @@ enum cxl_decoder_type {
* @flags: memory type capabilities and locking
* @commit: device/decoder-type specific callback to commit settings to hw
* @reset: device/decoder-type specific callback to reset hw settings
-*/
+ */
struct cxl_decoder {
struct device dev;
int id;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 5/7] cxl: Fix block comment style
2023-09-21 2:51 ` [PATCH 5/7] cxl: Fix block comment style Jeongtae Park
@ 2023-09-21 22:56 ` Dave Jiang
0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:56 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> WARNING: Block comments should align the * on each line
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/cxl.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index 545381355efb..0bbe0c15bfa9 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -334,7 +334,7 @@ enum cxl_decoder_type {
> * @flags: memory type capabilities and locking
> * @commit: device/decoder-type specific callback to commit settings to hw
> * @reset: device/decoder-type specific callback to reset hw settings
> -*/
> + */
> struct cxl_decoder {
> struct device dev;
> int id;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
` (4 preceding siblings ...)
2023-09-21 2:51 ` [PATCH 5/7] cxl: Fix block comment style Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:57 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Jeongtae Park
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/core/memdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
index f99e7ec3cc40..ce67df163452 100644
--- a/drivers/cxl/core/memdev.c
+++ b/drivers/cxl/core/memdev.c
@@ -935,11 +935,11 @@ static void cxl_fw_cancel(struct fw_upload *fwl)
}
static const struct fw_upload_ops cxl_memdev_fw_ops = {
- .prepare = cxl_fw_prepare,
- .write = cxl_fw_write,
- .poll_complete = cxl_fw_poll_complete,
- .cancel = cxl_fw_cancel,
- .cleanup = cxl_fw_cleanup,
+ .prepare = cxl_fw_prepare,
+ .write = cxl_fw_write,
+ .poll_complete = cxl_fw_poll_complete,
+ .cancel = cxl_fw_cancel,
+ .cleanup = cxl_fw_cleanup,
};
static void devm_cxl_remove_fw_upload(void *fwl)
@@ -1010,7 +1010,7 @@ static int cxl_memdev_security_init(struct cxl_memdev *cxlmd)
}
return devm_add_action_or_reset(cxlds->dev, put_sanitize, mds);
- }
+}
struct cxl_memdev *devm_cxl_add_memdev(struct cxl_dev_state *cxlds)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings
2023-09-21 2:51 ` [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings Jeongtae Park
@ 2023-09-21 22:57 ` Dave Jiang
2023-09-22 9:23 ` Jeongtae Park
0 siblings, 1 reply; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:57 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> ERROR: code indent should use tabs where possible
> WARNING: please, no spaces at the start of a line
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
two different issues?
> ---
> drivers/cxl/core/memdev.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
> index f99e7ec3cc40..ce67df163452 100644
> --- a/drivers/cxl/core/memdev.c
> +++ b/drivers/cxl/core/memdev.c
> @@ -935,11 +935,11 @@ static void cxl_fw_cancel(struct fw_upload *fwl)
> }
>
> static const struct fw_upload_ops cxl_memdev_fw_ops = {
> - .prepare = cxl_fw_prepare,
> - .write = cxl_fw_write,
> - .poll_complete = cxl_fw_poll_complete,
> - .cancel = cxl_fw_cancel,
> - .cleanup = cxl_fw_cleanup,
> + .prepare = cxl_fw_prepare,
> + .write = cxl_fw_write,
> + .poll_complete = cxl_fw_poll_complete,
> + .cancel = cxl_fw_cancel,
> + .cleanup = cxl_fw_cleanup,
> };
>
> static void devm_cxl_remove_fw_upload(void *fwl)
> @@ -1010,7 +1010,7 @@ static int cxl_memdev_security_init(struct cxl_memdev *cxlmd)
> }
>
> return devm_add_action_or_reset(cxlds->dev, put_sanitize, mds);
> - }
> +}
>
> struct cxl_memdev *devm_cxl_add_memdev(struct cxl_dev_state *cxlds)
> {
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings
2023-09-21 22:57 ` Dave Jiang
@ 2023-09-22 9:23 ` Jeongtae Park
0 siblings, 0 replies; 17+ messages in thread
From: Jeongtae Park @ 2023-09-22 9:23 UTC (permalink / raw)
To: Dave Jiang
Cc: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Davidlohr Bueso, Fan Ni, linux-cxl,
linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]
On Thu, Sep 21, 2023 at 03:57:25PM -0700, Dave Jiang wrote:
>
>
> On 9/20/23 19:51, Jeongtae Park wrote:
> > ERROR: code indent should use tabs where possible
> > WARNING: please, no spaces at the start of a line
> >
> > Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
>
> two different issues?
>
Yes, they are. I will seperate and resend them.
> > ---
> > drivers/cxl/core/memdev.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
> > index f99e7ec3cc40..ce67df163452 100644
> > --- a/drivers/cxl/core/memdev.c
> > +++ b/drivers/cxl/core/memdev.c
> > @@ -935,11 +935,11 @@ static void cxl_fw_cancel(struct fw_upload *fwl)
> > }
> >
> > static const struct fw_upload_ops cxl_memdev_fw_ops = {
> > - .prepare = cxl_fw_prepare,
> > - .write = cxl_fw_write,
> > - .poll_complete = cxl_fw_poll_complete,
> > - .cancel = cxl_fw_cancel,
> > - .cleanup = cxl_fw_cleanup,
> > + .prepare = cxl_fw_prepare,
> > + .write = cxl_fw_write,
> > + .poll_complete = cxl_fw_poll_complete,
> > + .cancel = cxl_fw_cancel,
> > + .cleanup = cxl_fw_cleanup,
> > };
> >
> > static void devm_cxl_remove_fw_upload(void *fwl)
> > @@ -1010,7 +1010,7 @@ static int cxl_memdev_security_init(struct cxl_memdev *cxlmd)
> > }
> >
> > return devm_add_action_or_reset(cxlds->dev, put_sanitize, mds);
> > - }
> > +}
> >
> > struct cxl_memdev *devm_cxl_add_memdev(struct cxl_dev_state *cxlds)
> > {
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
` (5 preceding siblings ...)
2023-09-21 2:51 ` [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings Jeongtae Park
@ 2023-09-21 2:51 ` Jeongtae Park
2023-09-21 22:58 ` Dave Jiang
6 siblings, 1 reply; 17+ messages in thread
From: Jeongtae Park @ 2023-09-21 2:51 UTC (permalink / raw)
To: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Dave Jiang, Davidlohr Bueso, Fan Ni, linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park, Jeongtae Park
ERROR: Macros with complex values should be enclosed in parentheses
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
drivers/cxl/core/trace.h | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
index 7aee7fb008a5..e2338773dcd6 100644
--- a/drivers/cxl/core/trace.h
+++ b/drivers/cxl/core/trace.h
@@ -199,17 +199,19 @@ TRACE_EVENT(cxl_overflow,
__field(u8, hdr_maint_op_class)
#define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \
- __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
- __assign_str(host, dev_name((cxlmd)->dev.parent)); \
- __entry->log = (l); \
- __entry->serial = (cxlmd)->cxlds->serial; \
- memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
- __entry->hdr_length = (hdr).length; \
- __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
- __entry->hdr_handle = le16_to_cpu((hdr).handle); \
- __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
- __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
- __entry->hdr_maint_op_class = (hdr).maint_op_class
+ do { \
+ __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
+ __assign_str(host, dev_name((cxlmd)->dev.parent)); \
+ __entry->log = (l); \
+ __entry->serial = (cxlmd)->cxlds->serial; \
+ memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
+ __entry->hdr_length = (hdr).length; \
+ __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
+ __entry->hdr_handle = le16_to_cpu((hdr).handle); \
+ __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
+ __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
+ __entry->hdr_maint_op_class = (hdr).maint_op_class; \
+ } while (0)
#define CXL_EVT_TP_printk(fmt, ...) \
TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb " \
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop
2023-09-21 2:51 ` [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Jeongtae Park
@ 2023-09-21 22:58 ` Dave Jiang
2023-09-22 9:26 ` Jeongtae Park
0 siblings, 1 reply; 17+ messages in thread
From: Dave Jiang @ 2023-09-21 22:58 UTC (permalink / raw)
To: Jeongtae Park, Dan Williams, Alison Schofield, Vishal Verma,
Ben Widawsky, Jonathan Cameron, Davidlohr Bueso, Fan Ni,
linux-cxl
Cc: linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
On 9/20/23 19:51, Jeongtae Park wrote:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
I think that goes against typical traceevent macros layout. I would ignore checkpatch warnings on traceevent stuff.
> ---
> drivers/cxl/core/trace.h | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> index 7aee7fb008a5..e2338773dcd6 100644
> --- a/drivers/cxl/core/trace.h
> +++ b/drivers/cxl/core/trace.h
> @@ -199,17 +199,19 @@ TRACE_EVENT(cxl_overflow,
> __field(u8, hdr_maint_op_class)
>
> #define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \
> - __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> - __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> - __entry->log = (l); \
> - __entry->serial = (cxlmd)->cxlds->serial; \
> - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> - __entry->hdr_length = (hdr).length; \
> - __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> - __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> - __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> - __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> - __entry->hdr_maint_op_class = (hdr).maint_op_class
> + do { \
> + __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> + __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> + __entry->log = (l); \
> + __entry->serial = (cxlmd)->cxlds->serial; \
> + memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> + __entry->hdr_length = (hdr).length; \
> + __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> + __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> + __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> + __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> + __entry->hdr_maint_op_class = (hdr).maint_op_class; \
> + } while (0)
>
> #define CXL_EVT_TP_printk(fmt, ...) \
> TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb " \
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop
2023-09-21 22:58 ` Dave Jiang
@ 2023-09-22 9:26 ` Jeongtae Park
0 siblings, 0 replies; 17+ messages in thread
From: Jeongtae Park @ 2023-09-22 9:26 UTC (permalink / raw)
To: Dave Jiang
Cc: Dan Williams, Alison Schofield, Vishal Verma, Ben Widawsky,
Jonathan Cameron, Davidlohr Bueso, Fan Ni, linux-cxl,
linux-kernel, Greg Kroah-Hartman, Kyungsan Kim, Wonjae Lee,
Hojin Nam, Junhyeok Im, Jehoon Park, Jeongtae Park
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
On Thu, Sep 21, 2023 at 03:58:26PM -0700, Dave Jiang wrote:
>
>
> On 9/20/23 19:51, Jeongtae Park wrote:
> > ERROR: Macros with complex values should be enclosed in parentheses
> >
> > Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
>
> I think that goes against typical traceevent macros layout. I would ignore checkpatch warnings on traceevent stuff.
>
>
Ok, I see, I will drop this change.
> > ---
> > drivers/cxl/core/trace.h | 24 +++++++++++++-----------
> > 1 file changed, 13 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> > index 7aee7fb008a5..e2338773dcd6 100644
> > --- a/drivers/cxl/core/trace.h
> > +++ b/drivers/cxl/core/trace.h
> > @@ -199,17 +199,19 @@ TRACE_EVENT(cxl_overflow,
> > __field(u8, hdr_maint_op_class)
> >
> > #define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \
> > - __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> > - __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> > - __entry->log = (l); \
> > - __entry->serial = (cxlmd)->cxlds->serial; \
> > - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> > - __entry->hdr_length = (hdr).length; \
> > - __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> > - __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> > - __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> > - __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> > - __entry->hdr_maint_op_class = (hdr).maint_op_class
> > + do { \
> > + __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> > + __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> > + __entry->log = (l); \
> > + __entry->serial = (cxlmd)->cxlds->serial; \
> > + memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> > + __entry->hdr_length = (hdr).length; \
> > + __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> > + __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> > + __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> > + __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> > + __entry->hdr_maint_op_class = (hdr).maint_op_class; \
> > + } while (0)
> >
> > #define CXL_EVT_TP_printk(fmt, ...) \
> > TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb " \
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread