Linux USB
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: f_fs: Define pr_fmt
@ 2024-07-29 22:53 Bjorn Andersson
  2024-07-30  5:00 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2024-07-29 22:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-arm-msm, linux-usb, linux-kernel, Bjorn Andersson

The majority of log entries of f_fs are generated with no indication of
their origin. Prefix these, using pr_fmt, to make the kernel log
clearer.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
 drivers/usb/gadget/function/f_fs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index d8b096859337..14ee43cb27b6 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -10,6 +10,7 @@
  * Copyright (C) 2003 Agilent Technologies
  */
 
+#define pr_fmt(fmt) "f_fs: " fmt
 
 /* #define DEBUG */
 /* #define VERBOSE_DEBUG */

---
base-commit: 931a3b3bccc96e7708c82b30b2b5fa82dfd04890
change-id: 20240729-f_fs-pr_fmt-0c610cc10d27

Best regards,
-- 
Bjorn Andersson <quic_bjorande@quicinc.com>


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

* Re: [PATCH] usb: gadget: f_fs: Define pr_fmt
  2024-07-29 22:53 [PATCH] usb: gadget: f_fs: Define pr_fmt Bjorn Andersson
@ 2024-07-30  5:00 ` Greg Kroah-Hartman
  2024-08-09  0:54   ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-07-30  5:00 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, linux-usb, linux-kernel

On Mon, Jul 29, 2024 at 03:53:50PM -0700, Bjorn Andersson wrote:
> The majority of log entries of f_fs are generated with no indication of
> their origin. Prefix these, using pr_fmt, to make the kernel log
> clearer.
> 
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
>  drivers/usb/gadget/function/f_fs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index d8b096859337..14ee43cb27b6 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -10,6 +10,7 @@
>   * Copyright (C) 2003 Agilent Technologies
>   */
>  
> +#define pr_fmt(fmt) "f_fs: " fmt

Why not fix the driver up to use the proper dev_*() printing functions
instead?

Or, use KBUILD_MODNAME?

thanks,

greg k-h

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

* Re: [PATCH] usb: gadget: f_fs: Define pr_fmt
  2024-07-30  5:00 ` Greg Kroah-Hartman
@ 2024-08-09  0:54   ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-08-09  0:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-arm-msm, linux-usb, linux-kernel

On Tue, Jul 30, 2024 at 07:00:32AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 29, 2024 at 03:53:50PM -0700, Bjorn Andersson wrote:
> > The majority of log entries of f_fs are generated with no indication of
> > their origin. Prefix these, using pr_fmt, to make the kernel log
> > clearer.
> > 
> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> > ---
> >  drivers/usb/gadget/function/f_fs.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> > index d8b096859337..14ee43cb27b6 100644
> > --- a/drivers/usb/gadget/function/f_fs.c
> > +++ b/drivers/usb/gadget/function/f_fs.c
> > @@ -10,6 +10,7 @@
> >   * Copyright (C) 2003 Agilent Technologies
> >   */
> >  
> > +#define pr_fmt(fmt) "f_fs: " fmt
> 
> Why not fix the driver up to use the proper dev_*() printing functions
> instead?
> 

I looked for that, but unless I'm completely misunderstanding the code,
there are no struct device involved to print upon. Is there some other
instance information that we'd like to include in these prints?

> Or, use KBUILD_MODNAME?
> 

I can certainly use that instead of the hard coded string, if you
prefer...

Regards,
Bjorn

> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2024-08-09  0:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 22:53 [PATCH] usb: gadget: f_fs: Define pr_fmt Bjorn Andersson
2024-07-30  5:00 ` Greg Kroah-Hartman
2024-08-09  0:54   ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox