mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>, <corbet@lwn.net>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/3] Docs: usb: update err() to pr_err() and replace __FILE__
Date: Fri, 29 Oct 2021 23:33:17 +0300	[thread overview]
Message-ID: <49a766ec-014e-3667-828c-a4fd19c7c9e3@omp.ru> (raw)
In-Reply-To: <e2f2c5c6995a011494105484849776a856af5bcc.1635533924.git.philipp.g.hortmann@gmail.com>

On 10/29/21 10:39 PM, Philipp Hortmann wrote:

> update err() to pr_err() and replace __FILE__
> 
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
>  Documentation/driver-api/usb/writing_usb_driver.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst
> index 2176297e5765..5c29e5bdbe88 100644
> --- a/Documentation/driver-api/usb/writing_usb_driver.rst
> +++ b/Documentation/driver-api/usb/writing_usb_driver.rst
> @@ -91,8 +91,8 @@ usually in the driver's init function, as shown here::
>  	    /* register this driver with the USB subsystem */
>  	    result = usb_register(&skel_driver);
>  	    if (result < 0) {
> -		    err("usb_register failed for the "__FILE__ "driver."
> -			"Error number %d", result);
> +		    pr_err("usb_register failed for the %s driver. "

   Don't break up the kernel message like this. The current code is a bad example --
high time to fix it. :-)

> +			   "Error number %d", skel_driver.name, result);
>  		    return -1;
>  	    }
>  

MBR, Sergey

  reply	other threads:[~2021-10-29 20:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 19:39 [PATCH 0/3] Docs: usb: Example code updates from usb-skeleton Philipp Hortmann
2021-10-29 19:39 ` [PATCH 1/3] Docs: usb: update err() to pr_err() and replace __FILE__ Philipp Hortmann
2021-10-29 20:33   ` Sergey Shtylyov [this message]
2021-10-30  9:32     ` Sergey Shtylyov
2021-10-29 19:39 ` [PATCH 2/3] Docs: usb: update comment and code near increment usage count Philipp Hortmann
2021-10-29 19:40 ` [PATCH 3/3] Docs: usb: update writesize, copy_from_user, usb_fill_bulk_urb, usb_submit_urb Philipp Hortmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49a766ec-014e-3667-828c-a4fd19c7c9e3@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=philipp.g.hortmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®