2023-04-19 11:23:54

by Raghu Halharvi

[permalink] [raw]
Subject: [STYLE v1 2/3] cxl/core/port: Use tabs to fix styling errors

Styling errors due to linux of unwanted spaces in the definition,
modified the definition to use tab to fix the styling issue.

Signed-off-by: Raghu H <[email protected]>
---
drivers/cxl/core/port.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 8ee6b6e2e2a4..7c3aaed180ca 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -95,15 +95,15 @@ static ssize_t size_show(struct device *dev, struct device_attribute *attr,
}
static DEVICE_ATTR_RO(size);

-#define CXL_DECODER_FLAG_ATTR(name, flag) \
-static ssize_t name##_show(struct device *dev, \
- struct device_attribute *attr, char *buf) \
-{ \
- struct cxl_decoder *cxld = to_cxl_decoder(dev); \
- \
- return sysfs_emit(buf, "%s\n", \
- (cxld->flags & (flag)) ? "1" : "0"); \
-} \
+#define CXL_DECODER_FLAG_ATTR(name, flag) \
+static ssize_t name##_show(struct device *dev, \
+ struct device_attribute *attr, char *buf) \
+{ \
+ struct cxl_decoder *cxld = to_cxl_decoder(dev); \
+ \
+ return sysfs_emit(buf, "%s\n", \
+ (cxld->flags & (flag)) ? "1" : "0"); \
+} \
static DEVICE_ATTR_RO(name)

CXL_DECODER_FLAG_ATTR(cap_pmem, CXL_DECODER_F_PMEM);
--
2.39.2


2023-04-27 19:07:11

by Ira Weiny

[permalink] [raw]
Subject: Re: [STYLE v1 2/3] cxl/core/port: Use tabs to fix styling errors

Raghu H wrote:
> Styling errors due to linux of unwanted spaces in the definition,
> modified the definition to use tab to fix the styling issue.
>
> Signed-off-by: Raghu H <[email protected]>

NAK

This is unnecessary churn. The formatting of the file is fine and very
readable.

Ira

> ---
> drivers/cxl/core/port.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index 8ee6b6e2e2a4..7c3aaed180ca 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -95,15 +95,15 @@ static ssize_t size_show(struct device *dev, struct device_attribute *attr,
> }
> static DEVICE_ATTR_RO(size);
>
> -#define CXL_DECODER_FLAG_ATTR(name, flag) \
> -static ssize_t name##_show(struct device *dev, \
> - struct device_attribute *attr, char *buf) \
> -{ \
> - struct cxl_decoder *cxld = to_cxl_decoder(dev); \
> - \
> - return sysfs_emit(buf, "%s\n", \
> - (cxld->flags & (flag)) ? "1" : "0"); \
> -} \
> +#define CXL_DECODER_FLAG_ATTR(name, flag) \
> +static ssize_t name##_show(struct device *dev, \
> + struct device_attribute *attr, char *buf) \
> +{ \
> + struct cxl_decoder *cxld = to_cxl_decoder(dev); \
> + \
> + return sysfs_emit(buf, "%s\n", \
> + (cxld->flags & (flag)) ? "1" : "0"); \
> +} \
> static DEVICE_ATTR_RO(name)
>
> CXL_DECODER_FLAG_ATTR(cap_pmem, CXL_DECODER_F_PMEM);
> --
> 2.39.2
>