* [PATCH] staging: sm750fb: Avoid multiple assignments @ 2019-03-04 18:31 Nishka Dasgupta 2019-03-04 20:54 ` [Outreachy kernel] " Julia Lawall 2019-03-05 7:51 ` Greg KH 0 siblings, 2 replies; 7+ messages in thread From: Nishka Dasgupta @ 2019-03-04 18:31 UTC (permalink / raw) To: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel; +Cc: Nishka Dasgupta Avoid multiple assignments in the same line. Issue found with Checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> --- drivers/staging/sm750fb/sm750.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index e9f10c2669ea..739841c3b5d6 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) 0x800f0 + (int)crtc->channel * 0x140; pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); - crtc->cursor.maxH = crtc->cursor.maxW = 64; + crtc->cursor.maxW = 64; + crtc->cursor.maxH = crtc->cursor.maxW; crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; -- 2.19.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-04 18:31 [PATCH] staging: sm750fb: Avoid multiple assignments Nishka Dasgupta @ 2019-03-04 20:54 ` Julia Lawall 2019-03-05 7:10 ` Nishka Dasgupta 2019-03-05 7:51 ` Greg KH 1 sibling, 1 reply; 7+ messages in thread From: Julia Lawall @ 2019-03-04 20:54 UTC (permalink / raw) To: Nishka Dasgupta; +Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel On Tue, 5 Mar 2019, 'Nishka Dasgupta' via outreachy-kernel wrote: Something is going wrong in how you are sending your mail. This message was put in the group's spam folder. Maybe you are subscribed with a different address? julia > Avoid multiple assignments in the same line. Issue found with > Checkpatch. > > Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> > --- > drivers/staging/sm750fb/sm750.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index e9f10c2669ea..739841c3b5d6 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) > 0x800f0 + (int)crtc->channel * 0x140; > > pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); > - crtc->cursor.maxH = crtc->cursor.maxW = 64; > + crtc->cursor.maxW = 64; > + crtc->cursor.maxH = crtc->cursor.maxW; Maybe it would be simpler to say = 64 both times? julia > crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; > crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; > > -- > 2.19.1 > > -- > 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/20190304183110.3702-1-nishka.dasgupta%40yahoo.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-04 20:54 ` [Outreachy kernel] " Julia Lawall @ 2019-03-05 7:10 ` Nishka Dasgupta 0 siblings, 0 replies; 7+ messages in thread From: Nishka Dasgupta @ 2019-03-05 7:10 UTC (permalink / raw) To: Julia Lawall Cc: Nishka Dasgupta, Sudip Mukherjee, teddy.wang, Greg KH, outreachy-kernel On Tue, Mar 5, 2019 at 2:24 AM Julia Lawall <julia.lawall@lip6.fr> wrote: > > > > On Tue, 5 Mar 2019, 'Nishka Dasgupta' via outreachy-kernel wrote: > > Something is going wrong in how you are sending your mail. This message > was put in the group's spam folder. Maybe you are subscribed with a > different address? > Yes, I am subscribed with nishka.dasgupta_ug18@ashoka.edu.in but I am sending patches from nishka.dasgupta@yahoo.com. I tried to join the kernel google group with my Yahoo address but it wouldn't let me; what should I do? > julia > > > > > Avoid multiple assignments in the same line. Issue found with > > Checkpatch. > > > > Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> > > --- > > drivers/staging/sm750fb/sm750.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > > index e9f10c2669ea..739841c3b5d6 100644 > > --- a/drivers/staging/sm750fb/sm750.c > > +++ b/drivers/staging/sm750fb/sm750.c > > @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) > > 0x800f0 + (int)crtc->channel * 0x140; > > > > pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); > > - crtc->cursor.maxH = crtc->cursor.maxW = 64; > > + crtc->cursor.maxW = 64; > > + crtc->cursor.maxH = crtc->cursor.maxW; > > Maybe it would be simpler to say = 64 both times? Yes, it would, but I wasn't sure if it was important for maxH and maxW to always have the same value; if so, then setting one to 64 and the other to always have the same value as the first seemed safer. If they don't have to be the same, I can change accordingly. > julia > > > crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; > > crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; > > > > -- > > 2.19.1 > > > > -- > > 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/20190304183110.3702-1-nishka.dasgupta%40yahoo.com. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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/alpine.DEB.2.21.1903042153230.2591%40hadrien. > For more options, visit https://groups.google.com/d/optout. - Nishka ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-04 18:31 [PATCH] staging: sm750fb: Avoid multiple assignments Nishka Dasgupta 2019-03-04 20:54 ` [Outreachy kernel] " Julia Lawall @ 2019-03-05 7:51 ` Greg KH 2019-03-05 17:12 ` Nishka Dasgupta 1 sibling, 1 reply; 7+ messages in thread From: Greg KH @ 2019-03-05 7:51 UTC (permalink / raw) To: Nishka Dasgupta; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel On Tue, Mar 05, 2019 at 12:01:10AM +0530, Nishka Dasgupta wrote: > Avoid multiple assignments in the same line. Issue found with > Checkpatch. > > Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> > --- > drivers/staging/sm750fb/sm750.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index e9f10c2669ea..739841c3b5d6 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) > 0x800f0 + (int)crtc->channel * 0x140; > > pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); > - crtc->cursor.maxH = crtc->cursor.maxW = 64; > + crtc->cursor.maxW = 64; > + crtc->cursor.maxH = crtc->cursor.maxW; The original code is fine here. I would just ignore this checkpatch.pl message for this line. thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-05 7:51 ` Greg KH @ 2019-03-05 17:12 ` Nishka Dasgupta 2019-03-05 17:17 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Nishka Dasgupta @ 2019-03-05 17:12 UTC (permalink / raw) To: Greg KH; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel On 05/03/19 1:21 PM, Greg KH wrote: > On Tue, Mar 05, 2019 at 12:01:10AM +0530, Nishka Dasgupta wrote: >> Avoid multiple assignments in the same line. Issue found with >> Checkpatch. >> >> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> >> --- >> drivers/staging/sm750fb/sm750.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c >> index e9f10c2669ea..739841c3b5d6 100644 >> --- a/drivers/staging/sm750fb/sm750.c >> +++ b/drivers/staging/sm750fb/sm750.c >> @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) >> 0x800f0 + (int)crtc->channel * 0x140; >> >> pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); >> - crtc->cursor.maxH = crtc->cursor.maxW = 64; >> + crtc->cursor.maxW = 64; >> + crtc->cursor.maxH = crtc->cursor.maxW; > > The original code is fine here. I would just ignore this checkpatch.pl > message for this line. Okay, will do. What should I do for similar Checkpatch warnings in future? Do I just ignore them? > thanks, > > greg k-h > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-05 17:12 ` Nishka Dasgupta @ 2019-03-05 17:17 ` Greg KH 2019-03-05 17:28 ` Nishka Dasgupta 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2019-03-05 17:17 UTC (permalink / raw) To: Nishka Dasgupta; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel On Tue, Mar 05, 2019 at 10:42:08PM +0530, Nishka Dasgupta wrote: > > > On 05/03/19 1:21 PM, Greg KH wrote: > > On Tue, Mar 05, 2019 at 12:01:10AM +0530, Nishka Dasgupta wrote: > > > Avoid multiple assignments in the same line. Issue found with > > > Checkpatch. > > > > > > Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> > > > --- > > > drivers/staging/sm750fb/sm750.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > > > index e9f10c2669ea..739841c3b5d6 100644 > > > --- a/drivers/staging/sm750fb/sm750.c > > > +++ b/drivers/staging/sm750fb/sm750.c > > > @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) > > > 0x800f0 + (int)crtc->channel * 0x140; > > > pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); > > > - crtc->cursor.maxH = crtc->cursor.maxW = 64; > > > + crtc->cursor.maxW = 64; > > > + crtc->cursor.maxH = crtc->cursor.maxW; > > > > The original code is fine here. I would just ignore this checkpatch.pl > > message for this line. > Okay, will do. What should I do for similar Checkpatch warnings in future? > Do I just ignore them? It all depends on what they look like. This one is setting a width and height to the exact same value, making it pretty obvious what is going on here. If other code is doing other things (like just zeroing out stuff, or using temp variables), maybe it should be fixed up. Again, checkpatch is just a hint, you still need to use your brain to see if what it says makes sense :) thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: sm750fb: Avoid multiple assignments 2019-03-05 17:17 ` Greg KH @ 2019-03-05 17:28 ` Nishka Dasgupta 0 siblings, 0 replies; 7+ messages in thread From: Nishka Dasgupta @ 2019-03-05 17:28 UTC (permalink / raw) To: Greg KH; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel On 05/03/19 10:47 PM, Greg KH wrote: > On Tue, Mar 05, 2019 at 10:42:08PM +0530, Nishka Dasgupta wrote: >> >> >> On 05/03/19 1:21 PM, Greg KH wrote: >>> On Tue, Mar 05, 2019 at 12:01:10AM +0530, Nishka Dasgupta wrote: >>>> Avoid multiple assignments in the same line. Issue found with >>>> Checkpatch. >>>> >>>> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> >>>> --- >>>> drivers/staging/sm750fb/sm750.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c >>>> index e9f10c2669ea..739841c3b5d6 100644 >>>> --- a/drivers/staging/sm750fb/sm750.c >>>> +++ b/drivers/staging/sm750fb/sm750.c >>>> @@ -782,7 +782,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) >>>> 0x800f0 + (int)crtc->channel * 0x140; >>>> pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); >>>> - crtc->cursor.maxH = crtc->cursor.maxW = 64; >>>> + crtc->cursor.maxW = 64; >>>> + crtc->cursor.maxH = crtc->cursor.maxW; >>> >>> The original code is fine here. I would just ignore this checkpatch.pl >>> message for this line. >> Okay, will do. What should I do for similar Checkpatch warnings in future? >> Do I just ignore them? > > It all depends on what they look like. This one is setting a width and > height to the exact same value, making it pretty obvious what is going > on here. If other code is doing other things (like just zeroing out > stuff, or using temp variables), maybe it should be fixed up. > Again, checkpatch is just a hint, you still need to use your brain to > see if what it says makes sense :) Yes, of course. I'll take it on a case-by-case basis then, as you've suggested. Thank you! -Nishka > thanks, > > greg k-h > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-03-05 17:28 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-03-04 18:31 [PATCH] staging: sm750fb: Avoid multiple assignments Nishka Dasgupta 2019-03-04 20:54 ` [Outreachy kernel] " Julia Lawall 2019-03-05 7:10 ` Nishka Dasgupta 2019-03-05 7:51 ` Greg KH 2019-03-05 17:12 ` Nishka Dasgupta 2019-03-05 17:17 ` Greg KH 2019-03-05 17:28 ` Nishka Dasgupta
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.