* [PATCH 0/3] staging: Fix multiple issues
@ 2015-10-18 15:54 Amitoj Kaur Chawla
2015-10-18 15:57 ` [PATCH 1/3] staging: sm750fb: Replace uint32_t with u32 Amitoj Kaur Chawla
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-18 15:54 UTC (permalink / raw)
To: outreachy-kernel
This patchset fixes multiple issues found using checkpatch.pl
Amitoj Kaur Chawla (3):
staging: sm750fb: Replace uint32_t with u32
staging: sm750fb: Remove volatile modifier
staging: lustre: ptlrpc: Replace seq_printf() with seq_puts()
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +-
drivers/staging/sm750fb/ddk750_power.c | 8 ++++----
drivers/staging/sm750fb/sm750.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/3] staging: sm750fb: Replace uint32_t with u32 2015-10-18 15:54 [PATCH 0/3] staging: Fix multiple issues Amitoj Kaur Chawla @ 2015-10-18 15:57 ` Amitoj Kaur Chawla 2015-10-18 16:00 ` [PATCH 2/3] staging: sm750fb: Remove volatile modifier Amitoj Kaur Chawla 2015-10-18 16:03 ` [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() Amitoj Kaur Chawla 2 siblings, 0 replies; 10+ messages in thread From: Amitoj Kaur Chawla @ 2015-10-18 15:57 UTC (permalink / raw) To: outreachy-kernel Replace uint32_t with u32 consistent with Linux kernel coding practice. Problem found using checkpatch.pl Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> --- drivers/staging/sm750fb/ddk750_power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index 198ff81..667e4f8 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -108,7 +108,7 @@ void setCurrentGate(unsigned int gate) */ void enable2DEngine(unsigned int enable) { - uint32_t gate; + u32 gate; gate = PEEK32(CURRENT_GATE); if (enable) { @@ -124,7 +124,7 @@ void enable2DEngine(unsigned int enable) void enableDMA(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable DMA Gate */ gate = PEEK32(CURRENT_GATE); @@ -141,7 +141,7 @@ void enableDMA(unsigned int enable) */ void enableGPIO(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable GPIO Gate */ gate = PEEK32(CURRENT_GATE); @@ -158,7 +158,7 @@ void enableGPIO(unsigned int enable) */ void enableI2C(unsigned int enable) { - uint32_t gate; + u32 gate; /* Enable I2C Gate */ gate = PEEK32(CURRENT_GATE); -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] staging: sm750fb: Remove volatile modifier 2015-10-18 15:54 [PATCH 0/3] staging: Fix multiple issues Amitoj Kaur Chawla 2015-10-18 15:57 ` [PATCH 1/3] staging: sm750fb: Replace uint32_t with u32 Amitoj Kaur Chawla @ 2015-10-18 16:00 ` Amitoj Kaur Chawla 2015-10-25 2:02 ` [Outreachy kernel] " Greg KH 2015-10-18 16:03 ` [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() Amitoj Kaur Chawla 2 siblings, 1 reply; 10+ messages in thread From: Amitoj Kaur Chawla @ 2015-10-18 16:00 UTC (permalink / raw) To: outreachy-kernel 'volatile' is not needed for regular variable. Problem found using checkpatch.pl WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered -harmful.txt Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> --- drivers/staging/sm750fb/sm750.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 52fe945..68eef34 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -15,9 +15,9 @@ extern int smi_indent; struct lynx_accel { /* base virtual address of DPR registers */ - volatile unsigned char __iomem *dprBase; + unsigned char __iomem *dprBase; /* base virtual address of de data port */ - volatile unsigned char __iomem *dpPortBase; + unsigned char __iomem *dpPortBase; /* function fointers */ void (*de_init)(struct lynx_accel *); @@ -79,7 +79,7 @@ struct lynx_cursor { char __iomem *vstart; int offset; /* mmio addr of hw cursor */ - volatile char __iomem *mmio; + char __iomem *mmio; /* the lynx_share of this adaptor */ struct lynx_share *share; /* proc_routines */ -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/3] staging: sm750fb: Remove volatile modifier 2015-10-18 16:00 ` [PATCH 2/3] staging: sm750fb: Remove volatile modifier Amitoj Kaur Chawla @ 2015-10-25 2:02 ` Greg KH 0 siblings, 0 replies; 10+ messages in thread From: Greg KH @ 2015-10-25 2:02 UTC (permalink / raw) To: Amitoj Kaur Chawla; +Cc: outreachy-kernel On Sun, Oct 18, 2015 at 09:30:13PM +0530, Amitoj Kaur Chawla wrote: > 'volatile' is not needed for regular variable. Problem found using checkpatch.pl > WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered -harmful.txt > > Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> > --- > drivers/staging/sm750fb/sm750.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h > index 52fe945..68eef34 100644 > --- a/drivers/staging/sm750fb/sm750.h > +++ b/drivers/staging/sm750fb/sm750.h > @@ -15,9 +15,9 @@ extern int smi_indent; > > struct lynx_accel { > /* base virtual address of DPR registers */ > - volatile unsigned char __iomem *dprBase; > + unsigned char __iomem *dprBase; > /* base virtual address of de data port */ > - volatile unsigned char __iomem *dpPortBase; > + unsigned char __iomem *dpPortBase; > > /* function fointers */ > void (*de_init)(struct lynx_accel *); > @@ -79,7 +79,7 @@ struct lynx_cursor { > char __iomem *vstart; > int offset; > /* mmio addr of hw cursor */ > - volatile char __iomem *mmio; > + char __iomem *mmio; Have you verified that the code is still working properly? Sometimes this isn't as simple as just deleting the modifier :( thanks, greg k-h ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-18 15:54 [PATCH 0/3] staging: Fix multiple issues Amitoj Kaur Chawla 2015-10-18 15:57 ` [PATCH 1/3] staging: sm750fb: Replace uint32_t with u32 Amitoj Kaur Chawla 2015-10-18 16:00 ` [PATCH 2/3] staging: sm750fb: Remove volatile modifier Amitoj Kaur Chawla @ 2015-10-18 16:03 ` Amitoj Kaur Chawla 2015-10-25 1:38 ` [Outreachy kernel] " Greg KH 2 siblings, 1 reply; 10+ messages in thread From: Amitoj Kaur Chawla @ 2015-10-18 16:03 UTC (permalink / raw) To: outreachy-kernel Replace seq_printf() with seq_puts() since it is more expensive than seq_puts(). Problem found using checkpatch.pl WARNING: Prefer seq_puts to seq_printf Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> --- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 6cf9b92..23f1e26 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) (long)(req->rq_sent - req->rq_arrival_time.tv_sec), (long)(req->rq_sent - req->rq_deadline)); if (svc->srv_ops.so_req_printer == NULL) - seq_printf(s, "\n"); + seq_puts(s, "\n"); else svc->srv_ops.so_req_printer(s, srhi->srhi_req); } -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-18 16:03 ` [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() Amitoj Kaur Chawla @ 2015-10-25 1:38 ` Greg KH 2015-10-25 14:30 ` Amitoj Kaur Chawla 0 siblings, 1 reply; 10+ messages in thread From: Greg KH @ 2015-10-25 1:38 UTC (permalink / raw) To: Amitoj Kaur Chawla; +Cc: outreachy-kernel On Sun, Oct 18, 2015 at 09:33:37PM +0530, Amitoj Kaur Chawla wrote: > Replace seq_printf() with seq_puts() since it is more expensive than > seq_puts(). Problem found using checkpatch.pl > WARNING: Prefer seq_puts to seq_printf > > Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> > --- > drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > index 6cf9b92..23f1e26 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) > (long)(req->rq_sent - req->rq_arrival_time.tv_sec), > (long)(req->rq_sent - req->rq_deadline)); > if (svc->srv_ops.so_req_printer == NULL) > - seq_printf(s, "\n"); > + seq_puts(s, "\n"); Shouldn't this really be seq_putc() instead? thanks, greg k-h ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-25 1:38 ` [Outreachy kernel] " Greg KH @ 2015-10-25 14:30 ` Amitoj Kaur Chawla 2015-10-25 14:31 ` Julia Lawall 0 siblings, 1 reply; 10+ messages in thread From: Amitoj Kaur Chawla @ 2015-10-25 14:30 UTC (permalink / raw) To: Greg KH; +Cc: outreachy-kernel On Sun, Oct 25, 2015 at 7:08 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > On Sun, Oct 18, 2015 at 09:33:37PM +0530, Amitoj Kaur Chawla wrote: >> Replace seq_printf() with seq_puts() since it is more expensive than >> seq_puts(). Problem found using checkpatch.pl >> WARNING: Prefer seq_puts to seq_printf >> >> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> >> --- >> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> index 6cf9b92..23f1e26 100644 >> --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) >> (long)(req->rq_sent - req->rq_arrival_time.tv_sec), >> (long)(req->rq_sent - req->rq_deadline)); >> if (svc->srv_ops.so_req_printer == NULL) >> - seq_printf(s, "\n"); >> + seq_puts(s, "\n"); > > Shouldn't this really be seq_putc() instead? > > thanks, > > greg k-h 's' is not of char type but char * I build tested this and sent. After your question I had doubts again so I tried seq_putc() but it breaks the build. -- Amitoj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-25 14:30 ` Amitoj Kaur Chawla @ 2015-10-25 14:31 ` Julia Lawall 2015-10-26 16:40 ` Amitoj Kaur Chawla 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2015-10-25 14:31 UTC (permalink / raw) To: Amitoj Kaur Chawla; +Cc: Greg KH, outreachy-kernel On Sun, 25 Oct 2015, Amitoj Kaur Chawla wrote: > On Sun, Oct 25, 2015 at 7:08 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > > On Sun, Oct 18, 2015 at 09:33:37PM +0530, Amitoj Kaur Chawla wrote: > >> Replace seq_printf() with seq_puts() since it is more expensive than > >> seq_puts(). Problem found using checkpatch.pl > >> WARNING: Prefer seq_puts to seq_printf > >> > >> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> > >> --- > >> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> index 6cf9b92..23f1e26 100644 > >> --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) > >> (long)(req->rq_sent - req->rq_arrival_time.tv_sec), > >> (long)(req->rq_sent - req->rq_deadline)); > >> if (svc->srv_ops.so_req_printer == NULL) > >> - seq_printf(s, "\n"); > >> + seq_puts(s, "\n"); > > > > Shouldn't this really be seq_putc() instead? > > > > thanks, > > > > greg k-h > > 's' is not of char type but char * > I build tested this and sent. After your question I had doubts again > so I tried seq_putc() but it breaks the build. "\n" could be '\n'. julia > > -- > Amitoj > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CA%2B5yK5E%3D0Ed0HUtJoxx6VGKr6EuBGfdgnR8%3DJa_wEUTxk7whMw%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-25 14:31 ` Julia Lawall @ 2015-10-26 16:40 ` Amitoj Kaur Chawla 2015-10-26 16:47 ` Julia Lawall 0 siblings, 1 reply; 10+ messages in thread From: Amitoj Kaur Chawla @ 2015-10-26 16:40 UTC (permalink / raw) To: Julia Lawall; +Cc: Greg KH, outreachy-kernel On Sun, Oct 25, 2015 at 8:01 PM, Julia Lawall <julia.lawall@lip6.fr> wrote: > On Sun, 25 Oct 2015, Amitoj Kaur Chawla wrote: > >> On Sun, Oct 25, 2015 at 7:08 AM, Greg KH <gregkh@linuxfoundation.org> wrote: >> > On Sun, Oct 18, 2015 at 09:33:37PM +0530, Amitoj Kaur Chawla wrote: >> >> Replace seq_printf() with seq_puts() since it is more expensive than >> >> seq_puts(). Problem found using checkpatch.pl >> >> WARNING: Prefer seq_puts to seq_printf >> >> >> >> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> >> >> --- >> >> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- >> >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> >> >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> >> index 6cf9b92..23f1e26 100644 >> >> --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> >> +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c >> >> @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) >> >> (long)(req->rq_sent - req->rq_arrival_time.tv_sec), >> >> (long)(req->rq_sent - req->rq_deadline)); >> >> if (svc->srv_ops.so_req_printer == NULL) >> >> - seq_printf(s, "\n"); >> >> + seq_puts(s, "\n"); >> > >> > Shouldn't this really be seq_putc() instead? >> > >> > thanks, >> > >> > greg k-h >> >> 's' is not of char type but char * >> I build tested this and sent. After your question I had doubts again >> so I tried seq_putc() but it breaks the build. > > "\n" could be '\n'. > > julia > So I should write it as seq_puts(s, '\n');? Should I resend this? -- Amitoj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() 2015-10-26 16:40 ` Amitoj Kaur Chawla @ 2015-10-26 16:47 ` Julia Lawall 0 siblings, 0 replies; 10+ messages in thread From: Julia Lawall @ 2015-10-26 16:47 UTC (permalink / raw) To: Amitoj Kaur Chawla; +Cc: Greg KH, outreachy-kernel On Mon, 26 Oct 2015, Amitoj Kaur Chawla wrote: > On Sun, Oct 25, 2015 at 8:01 PM, Julia Lawall <julia.lawall@lip6.fr> wrote: > > On Sun, 25 Oct 2015, Amitoj Kaur Chawla wrote: > > > >> On Sun, Oct 25, 2015 at 7:08 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > >> > On Sun, Oct 18, 2015 at 09:33:37PM +0530, Amitoj Kaur Chawla wrote: > >> >> Replace seq_printf() with seq_puts() since it is more expensive than > >> >> seq_puts(). Problem found using checkpatch.pl > >> >> WARNING: Prefer seq_puts to seq_printf > >> >> > >> >> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> > >> >> --- > >> >> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- > >> >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> >> > >> >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> >> index 6cf9b92..23f1e26 100644 > >> >> --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> >> +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c > >> >> @@ -923,7 +923,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) > >> >> (long)(req->rq_sent - req->rq_arrival_time.tv_sec), > >> >> (long)(req->rq_sent - req->rq_deadline)); > >> >> if (svc->srv_ops.so_req_printer == NULL) > >> >> - seq_printf(s, "\n"); > >> >> + seq_puts(s, "\n"); > >> > > >> > Shouldn't this really be seq_putc() instead? > >> > > >> > thanks, > >> > > >> > greg k-h > >> > >> 's' is not of char type but char * > >> I build tested this and sent. After your question I had doubts again > >> so I tried seq_putc() but it breaks the build. > > > > "\n" could be '\n'. > > > > julia > > > > So I should write it as seq_puts(s, '\n');? You should use seq_putc. > Should I resend this? Yes. julia ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-10-26 16:47 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-18 15:54 [PATCH 0/3] staging: Fix multiple issues Amitoj Kaur Chawla 2015-10-18 15:57 ` [PATCH 1/3] staging: sm750fb: Replace uint32_t with u32 Amitoj Kaur Chawla 2015-10-18 16:00 ` [PATCH 2/3] staging: sm750fb: Remove volatile modifier Amitoj Kaur Chawla 2015-10-25 2:02 ` [Outreachy kernel] " Greg KH 2015-10-18 16:03 ` [PATCH 3/3] staging: lustre: ptlrpc: Replace seq_printf() with seq_puts() Amitoj Kaur Chawla 2015-10-25 1:38 ` [Outreachy kernel] " Greg KH 2015-10-25 14:30 ` Amitoj Kaur Chawla 2015-10-25 14:31 ` Julia Lawall 2015-10-26 16:40 ` Amitoj Kaur Chawla 2015-10-26 16:47 ` Julia Lawall
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.