linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit
@ 2021-08-25  6:45 CGEL
  2021-08-25  8:31 ` Heiko Carstens
  0 siblings, 1 reply; 4+ messages in thread
From: CGEL @ 2021-08-25  6:45 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Vasily Gorbik, Christian Borntraeger, Vineeth Vijayan,
	linux-s390, linux-kernel, jing yangyang, Zeal Robot

From: jing yangyang <jing.yangyang@zte.com.cn>

Fix the following coccicheck warning:
./drivers/s390/char/raw3270.c:1066:8-16: WARNING: use scnprintf or sprintf
./drivers/s390/char/raw3270.c:1050:8-16: WARNING:use scnprintf or sprintf
./drivers/s390/char/raw3270.c:1058:8-16: WARNING:use scnprintf or sprintf

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 drivers/s390/char/raw3270.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 646ec79..be8529f 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1047,7 +1047,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->model);
 }
 static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
@@ -1055,7 +1055,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->rows);
 }
 static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
@@ -1063,7 +1063,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->cols);
 }
 static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
-- 
1.8.3.1



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

* Re: [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit
  2021-08-25  6:45 [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit CGEL
@ 2021-08-25  8:31 ` Heiko Carstens
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Carstens @ 2021-08-25  8:31 UTC (permalink / raw)
  To: CGEL
  Cc: Vasily Gorbik, Christian Borntraeger, Vineeth Vijayan,
	linux-s390, linux-kernel, jing yangyang, Zeal Robot

On Tue, Aug 24, 2021 at 11:45:23PM -0700, CGEL wrote:
> From: jing yangyang <jing.yangyang@zte.com.cn>
> 
> Fix the following coccicheck warning:
> ./drivers/s390/char/raw3270.c:1066:8-16: WARNING: use scnprintf or sprintf
> ./drivers/s390/char/raw3270.c:1050:8-16: WARNING:use scnprintf or sprintf
> ./drivers/s390/char/raw3270.c:1058:8-16: WARNING:use scnprintf or sprintf
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
> ---
>  drivers/s390/char/raw3270.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Ignoring comments and resending the same unmodified patch is not helpful.

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

* Re: [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit
  2021-08-21  3:53 CGEL
@ 2021-08-23 17:37 ` Heiko Carstens
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Carstens @ 2021-08-23 17:37 UTC (permalink / raw)
  To: CGEL
  Cc: Vasily Gorbik, Christian Borntraeger, Vineeth Vijayan,
	linux-s390, linux-kernel, jing yangyang, Zeal Robot

On Fri, Aug 20, 2021 at 08:53:58PM -0700, CGEL wrote:
> From: jing yangyang <jing.yangyang@zte.com.cn>
> 
> Fix the following coccicheck warning:
> ./drivers/s390/char/raw3270.c:1066:8-16: WARNING: use scnprintf or sprintf
> ./drivers/s390/char/raw3270.c:1050:8-16: WARNING:use scnprintf or sprintf
> ./drivers/s390/char/raw3270.c:1058:8-16: WARNING:use scnprintf or sprintf
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
...
>  static ssize_t
>  raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
>  {
> -	return snprintf(buf, PAGE_SIZE, "%i\n",
> +	return sysfs_emit(buf, "%i\n",
>  			((struct raw3270 *) dev_get_drvdata(dev))->model);

Identation of the line following the patched line is now incorrect.
Also the sign-off chain is not correct - I also doubt that "CGEL" is a
person, but what do I know.

Not applied.

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

* [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit
@ 2021-08-21  3:53 CGEL
  2021-08-23 17:37 ` Heiko Carstens
  0 siblings, 1 reply; 4+ messages in thread
From: CGEL @ 2021-08-21  3:53 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Vasily Gorbik, Christian Borntraeger, Vineeth Vijayan,
	linux-s390, linux-kernel, jing yangyang, Zeal Robot

From: jing yangyang <jing.yangyang@zte.com.cn>

Fix the following coccicheck warning:
./drivers/s390/char/raw3270.c:1066:8-16: WARNING: use scnprintf or sprintf
./drivers/s390/char/raw3270.c:1050:8-16: WARNING:use scnprintf or sprintf
./drivers/s390/char/raw3270.c:1058:8-16: WARNING:use scnprintf or sprintf

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 drivers/s390/char/raw3270.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 646ec79..be8529f 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1047,7 +1047,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->model);
 }
 static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL);
@@ -1055,7 +1055,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->rows);
 }
 static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL);
@@ -1063,7 +1063,7 @@ struct raw3270_view *
 static ssize_t
 raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%i\n",
+	return sysfs_emit(buf, "%i\n",
 			((struct raw3270 *) dev_get_drvdata(dev))->cols);
 }
 static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL);
-- 
1.8.3.1



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

end of thread, other threads:[~2021-08-25  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  6:45 [PATCH linux-next] s390:raw3270: Convert sysfs sprintf/snprintf family to sysfs_emit CGEL
2021-08-25  8:31 ` Heiko Carstens
  -- strict thread matches above, loose matches on Subject: below --
2021-08-21  3:53 CGEL
2021-08-23 17:37 ` Heiko Carstens

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).