[OPW,kernel] Staging: keucr: replacing seq_printf with seq_puts
diff mbox

Message ID 20131015143023.GA13626@Ashvini
State Rejected
Headers show

Commit Message

Ashvini Varatharaj Oct. 15, 2013, 2:30 p.m. UTC
Fix checkpatch warning: WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
---
 drivers/staging/keucr/scsiglue.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Kroah-Hartman Oct. 15, 2013, 4:20 p.m. UTC | #1
On Tue, Oct 15, 2013 at 08:00:23PM +0530, Ashvini Varatharaj wrote:
> Fix checkpatch warning: WARNING: Prefer seq_puts to seq_printf
> 
> Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> ---
>  drivers/staging/keucr/scsiglue.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
> index ac3d34d..35bd099 100644
> --- a/drivers/staging/keucr/scsiglue.c
> +++ b/drivers/staging/keucr/scsiglue.c
> @@ -230,7 +230,7 @@ void usb_stor_report_bus_reset(struct us_data *us)
>  
>  /* we use this macro to help us write into the buffer */
>  #undef SPRINTF
> -#define SPRINTF(args...) seq_printf(m, ##args)
> +#define SPRINTF(args...) seq_puts(m, ##args)

Did you build this change?  I haven't yet, and I really don't think it
will work...

But let me go check for sure...

greg k-h
Greg Kroah-Hartman Oct. 15, 2013, 4:21 p.m. UTC | #2
On Tue, Oct 15, 2013 at 09:20:59AM -0700, Greg KH wrote:
> On Tue, Oct 15, 2013 at 08:00:23PM +0530, Ashvini Varatharaj wrote:
> > Fix checkpatch warning: WARNING: Prefer seq_puts to seq_printf
> > 
> > Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> > ---
> >  drivers/staging/keucr/scsiglue.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
> > index ac3d34d..35bd099 100644
> > --- a/drivers/staging/keucr/scsiglue.c
> > +++ b/drivers/staging/keucr/scsiglue.c
> > @@ -230,7 +230,7 @@ void usb_stor_report_bus_reset(struct us_data *us)
> >  
> >  /* we use this macro to help us write into the buffer */
> >  #undef SPRINTF
> > -#define SPRINTF(args...) seq_printf(m, ##args)
> > +#define SPRINTF(args...) seq_puts(m, ##args)
> 
> Did you build this change?  I haven't yet, and I really don't think it
> will work...
> 
> But let me go check for sure...

Nope, totally broke the build.

PLEASE ALWAYS TEST BUILD YOUR PATCHES.
Ashvini Varatharaj Oct. 15, 2013, 4:22 p.m. UTC | #3
It worked I think I ran checkpatch on this. Did you mean that?


*Ashvini Varatharaj *



On Tue, Oct 15, 2013 at 9:50 PM, Greg KH <gregkh@linuxfoundation.org> wrote:

> On Tue, Oct 15, 2013 at 08:00:23PM +0530, Ashvini Varatharaj wrote:
> > Fix checkpatch warning: WARNING: Prefer seq_puts to seq_printf
> >
> > Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
> > ---
> >  drivers/staging/keucr/scsiglue.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/keucr/scsiglue.c
> b/drivers/staging/keucr/scsiglue.c
> > index ac3d34d..35bd099 100644
> > --- a/drivers/staging/keucr/scsiglue.c
> > +++ b/drivers/staging/keucr/scsiglue.c
> > @@ -230,7 +230,7 @@ void usb_stor_report_bus_reset(struct us_data *us)
> >
> >  /* we use this macro to help us write into the buffer */
> >  #undef SPRINTF
> > -#define SPRINTF(args...) seq_printf(m, ##args)
> > +#define SPRINTF(args...) seq_puts(m, ##args)
>
> Did you build this change?  I haven't yet, and I really don't think it
> will work...
>
> But let me go check for sure...
>
> greg k-h
>
Greg Kroah-Hartman Oct. 15, 2013, 4:25 p.m. UTC | #4
A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Tue, Oct 15, 2013 at 09:52:11PM +0530, Ashvini Varatharaj wrote:
> It worked I think I ran checkpatch on this. Did you mean that?

No, you need to build the driver that you change to ensure that you did
it correctly.  Ideally you would also be able to test the change on the
hardware, but that's usually hard for most staging drivers.

Remember, you CAN NOT break the kernel build with any patch, it's not
acceptable, and usually a sign that the change you make is incorrect.

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
index ac3d34d..35bd099 100644
--- a/drivers/staging/keucr/scsiglue.c
+++ b/drivers/staging/keucr/scsiglue.c
@@ -230,7 +230,7 @@  void usb_stor_report_bus_reset(struct us_data *us)
 
 /* we use this macro to help us write into the buffer */
 #undef SPRINTF
-#define SPRINTF(args...) seq_printf(m, ##args)
+#define SPRINTF(args...) seq_puts(m, ##args)
 
 static int write_info(struct Scsi_Host *host, char *buffer, int length)
 {