All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
@ 2021-04-08  8:52 ` Carlis
  0 siblings, 0 replies; 6+ messages in thread
From: Carlis @ 2021-04-08  8:52 UTC (permalink / raw)
  To: thierry.reding, sam, airlied, daniel
  Cc: dri-devel, linux-kernel, Xuezhi Zhang

From: Xuezhi Zhang <zhangxuezhi1@yulong.com>

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

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
---
v2: change snprint to snprintf in subject.
---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
index 5fbfb71ca3d9..a8efb06cca64 100644
--- a/drivers/gpu/drm/panel/panel-dsi-cm.c
+++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
@@ -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);
-- 
2.25.1


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

* [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
@ 2021-04-08  8:52 ` Carlis
  0 siblings, 0 replies; 6+ messages in thread
From: Carlis @ 2021-04-08  8:52 UTC (permalink / raw)
  To: thierry.reding, sam, airlied, daniel
  Cc: Xuezhi Zhang, linux-kernel, dri-devel

From: Xuezhi Zhang <zhangxuezhi1@yulong.com>

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

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
---
v2: change snprint to snprintf in subject.
---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
index 5fbfb71ca3d9..a8efb06cca64 100644
--- a/drivers/gpu/drm/panel/panel-dsi-cm.c
+++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
@@ -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);
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
  2021-04-08  8:52 ` Carlis
@ 2021-04-08 13:14   ` Thierry Reding
  -1 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2021-04-08 13:14 UTC (permalink / raw)
  To: Carlis; +Cc: sam, airlied, daniel, Xuezhi Zhang, linux-kernel, dri-devel

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

On Thu, Apr 08, 2021 at 08:52:57AM +0000, Carlis wrote:
> From: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> 
> 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
> 
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> ---
> 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.

Reviewed-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
@ 2021-04-08 13:14   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2021-04-08 13:14 UTC (permalink / raw)
  To: Carlis; +Cc: airlied, linux-kernel, dri-devel, Xuezhi Zhang, sam


[-- Attachment #1.1: Type: text/plain, Size: 913 bytes --]

On Thu, Apr 08, 2021 at 08:52:57AM +0000, Carlis wrote:
> From: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> 
> 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
> 
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> ---
> 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.

Reviewed-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
  2021-04-08 13:14   ` Thierry Reding
  (?)
@ 2021-04-08 15:08   ` Xuezhi zhang
  2021-04-09 11:36     ` Thierry Reding
  -1 siblings, 1 reply; 6+ messages in thread
From: Xuezhi zhang @ 2021-04-08 15:08 UTC (permalink / raw)
  To: Thierry Reding; +Cc: sam, airlied, daniel, Xuezhi Zhang, linux-kernel

On Thu, 8 Apr 2021 15:14:04 +0200
Thierry Reding <thierry.reding@gmail.com> wrote:

> On Thu, Apr 08, 2021 at 08:52:57AM +0000, Carlis wrote:
> > From: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> > 
> > 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
> > 
> > Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> > ---
> > 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.
> 
> Reviewed-by: Thierry Reding <treding@nvidia.com>

Hi,
   the email address of llyz108@163.com is my private email address,
   and zhangxuezhi@yulng.com 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


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

* Re: [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit
  2021-04-08 15:08   ` Xuezhi zhang
@ 2021-04-09 11:36     ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2021-04-09 11:36 UTC (permalink / raw)
  To: Xuezhi zhang; +Cc: sam, airlied, daniel, Xuezhi Zhang, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

On Thu, Apr 08, 2021 at 11:08:49PM +0800, Xuezhi zhang wrote:
> On Thu, 8 Apr 2021 15:14:04 +0200
> Thierry Reding <thierry.reding@gmail.com> wrote:
> 
> > On Thu, Apr 08, 2021 at 08:52:57AM +0000, Carlis wrote:
> > > From: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> > > 
> > > 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
> > > 
> > > Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
> > > ---
> > > 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.
> > 
> > Reviewed-by: Thierry Reding <treding@nvidia.com>
> 
> Hi,
>    the email address of llyz108@163.com is my private email address,
>    and zhangxuezhi@yulng.com 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-04-09 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  8:52 [PATCH v2] drm/panel: panel-dsi-cm: convert sysfs snprintf to sysfs_emit Carlis
2021-04-08  8:52 ` Carlis
2021-04-08 13:14 ` Thierry Reding
2021-04-08 13:14   ` Thierry Reding
2021-04-08 15:08   ` Xuezhi zhang
2021-04-09 11:36     ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.