Skip to contentSkip to conversation

drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit

PATCH In review Carlis 2 participants 4 messages Apr 8, 2021 – Apr 9, 2021

Subsystems (3)
lore
Share & tools
lore

Carlis

author
#0 lore raw

PATCH v2 1/1 drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit

From: Xuezhi Zhang <[email protected]>

Fix the following coccicheck warning:
drivers/gpu/drm//panel/panel-dsi-cm.c:271:8-16:
WARNING: use scnprintf or sprintf
drivers/gpu/drm//panel/panel-dsi-cm.c:251:8-16:
WARNING: use scnprintf or sprintf

---
v2: change snprint to snprintf in subject.

---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-dsi-cm.c +2 -2
index 5fbfb71ca3d9..a8efb06cca64 100644
@@ -248,7 +248,7 @@ static ssize_t num_dsi_errors_show(struct device *dev,
 	if (r)
 		return r;
 
-	return snprintf(buf, PAGE_SIZE, "%d\n", errors);
+	return sysfs_emit(buf, "%d\n", errors);
 }
 
 static ssize_t hw_revision_show(struct device *dev,
@@ -268,7 +268,7 @@ static ssize_t hw_revision_show(struct device *dev,
 	if (r)
 		return r;
 
-	return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x\n", id1, id2, id3);
+	return sysfs_emit(buf, "%02x.%02x.%02x\n", id1, id2, id3);
 }
 
 static DEVICE_ATTR_RO(num_dsi_errors);
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Carlis

From: Xuezhi Zhang <[email protected]>

Fix the following coccicheck warning:
drivers/gpu/drm//panel/panel-dsi-cm.c:271:8-16:
WARNING: use scnprintf or sprintf
drivers/gpu/drm//panel/panel-dsi-cm.c:251:8-16:
WARNING: use scnprintf or sprintf

Quoted 6 lines

---
v2: change snprint to snprintf in subject.

---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Nit: I suspect you might've just resent this from some private email address, but it's kind of hard to tell because you haven't been using at least the same name in both email addresses.

However, if you're forwarding this patch on behalf of somebody else you need to add your own Signed-off-by: line.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 16 lines · On Thu, 8 Apr 2021 15:14:04 +0200 Thierry Reding <[email protected]>…
Quoted 8 lines · Carlis

From: Xuezhi Zhang <[email protected]>

Fix the following coccicheck warning:
drivers/gpu/drm//panel/panel-dsi-cm.c:271:8-16:
WARNING: use scnprintf or sprintf
drivers/gpu/drm//panel/panel-dsi-cm.c:251:8-16:
WARNING: use scnprintf or sprintf

Quoted 6 lines

---
v2: change snprint to snprintf in subject.

---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)  
Quoted 8 lines

Nit: I suspect you might've just resent this from some private email address, but it's kind of hard to tell because you haven't been using at least the same name in both email addresses.

However, if you're forwarding this patch on behalf of somebody else you need to add your own Signed-off-by: line.

Hi,
the email address of [email protected] is my private email address, and [email protected] is my company email address, and Carlis is my English name ,Xuezhi Zhang is my Chinese name, i will use the Chinese name to send the emails and patchs in the future.

thanks,

Xuezhi Zhang

#3 lore raw
Quoted 28 lines · Xuezhi zhang
Quoted 16 lines · On Thu, 8 Apr 2021 15:14:04 +0200 Thierry Reding <[email protected]>…
Quoted 8 lines · Carlis

From: Xuezhi Zhang <[email protected]>

Fix the following coccicheck warning:
drivers/gpu/drm//panel/panel-dsi-cm.c:271:8-16:
WARNING: use scnprintf or sprintf
drivers/gpu/drm//panel/panel-dsi-cm.c:251:8-16:
WARNING: use scnprintf or sprintf

Quoted 6 lines

---
v2: change snprint to snprintf in subject.

---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)  
Quoted 8 lines

Nit: I suspect you might've just resent this from some private email address, but it's kind of hard to tell because you haven't been using at least the same name in both email addresses.

However, if you're forwarding this patch on behalf of somebody else you need to add your own Signed-off-by: line.

Quoted 7 lines

Hi,
the email address of [email protected] is my private email address, and [email protected] is my company email address, and Carlis is my English name ,Xuezhi Zhang is my Chinese name, i will use the Chinese name to send the emails and patchs in the future.

thanks,

It's not a big deal, I'm just mentioning it because it can confuse people. Yes, using the same name in either case is usually a good way to make people realize what's going on.

Thierry