lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 10 Jun 2022 16:40:47 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Xuezhi Zhang <zhangxuezhi1@...lpad.com>
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: core: sysfs: convert sysfs snprintf to sysfs_emit

On Fri, Jun 10, 2022 at 10:03:45PM +0800, Xuezhi Zhang wrote:
> Fix the following coccicheck warnings:
> drivers/usb/core/sysfs.c:921:8-16:
> WARNING: use scnprintf or sprintf
> drivers/usb/core/sysfs.c:730:8-16:
> WARNING: use scnprintf or sprintf
> 
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
> ---
>  drivers/usb/core/sysfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
> index fa2e49d432ff..6387c0dfe30e 100644
> --- a/drivers/usb/core/sysfs.c
> +++ b/drivers/usb/core/sysfs.c
> @@ -727,7 +727,7 @@ static ssize_t authorized_show(struct device *dev,
>  			       struct device_attribute *attr, char *buf)
>  {
>  	struct usb_device *usb_dev = to_usb_device(dev);
> -	return snprintf(buf, PAGE_SIZE, "%u\n", usb_dev->authorized);
> +	return sysfs_emit(buf, "%u\n", usb_dev->authorized);
>  }
>  
>  /*
> @@ -918,7 +918,7 @@ static ssize_t authorized_default_show(struct device *dev,
>  	struct usb_hcd *hcd;
>  
>  	hcd = bus_to_hcd(usb_bus);
> -	return snprintf(buf, PAGE_SIZE, "%u\n", hcd->dev_policy);
> +	return sysfs_emit(buf, "%u\n", hcd->dev_policy);
>  }
>  
>  static ssize_t authorized_default_store(struct device *dev,
> -- 
> 2.25.1
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

Powered by blists - more mailing lists