* [PATCH] staging: sm750fb: rearrange line exceeding 80 characters
@ 2020-03-19 14:16 Gokce Kuler
2020-03-19 14:29 ` Greg KH
2020-03-19 15:11 ` [Outreachy kernel] " Julia Lawall
0 siblings, 2 replies; 4+ messages in thread
From: Gokce Kuler @ 2020-03-19 14:16 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Moved to the bottom line after << operator for it exceeds 80 character
Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
---
drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index bbbef27..b67c545 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -116,7 +116,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
opr = mask & color;
/* 2 stands for forecolor and 1 for backcolor */
- data |= ((opr & (0x80 >> j)) ? 2 : 1) << (j * 2);
+ data |= ((opr & (0x80 >> j)) ? 2 : 1) <<
+ (j * 2);
}
}
iowrite16(data, pbuffer);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: sm750fb: rearrange line exceeding 80 characters
2020-03-19 14:16 [PATCH] staging: sm750fb: rearrange line exceeding 80 characters Gokce Kuler
@ 2020-03-19 14:29 ` Greg KH
2020-03-19 15:11 ` [Outreachy kernel] " Julia Lawall
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-03-19 14:29 UTC (permalink / raw)
To: Gokce Kuler; +Cc: outreachy-kernel
On Thu, Mar 19, 2020 at 05:16:12PM +0300, Gokce Kuler wrote:
> Moved to the bottom line after << operator for it exceeds 80 character
>
> Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> index bbbef27..b67c545 100644
> --- a/drivers/staging/sm750fb/sm750_cursor.c
> +++ b/drivers/staging/sm750fb/sm750_cursor.c
> @@ -116,7 +116,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
> opr = mask & color;
>
> /* 2 stands for forecolor and 1 for backcolor */
> - data |= ((opr & (0x80 >> j)) ? 2 : 1) << (j * 2);
> + data |= ((opr & (0x80 >> j)) ? 2 : 1) <<
> + (j * 2);
The original code is much easier to understand and read, please leave it
as-is.
Remember, checkpatch is just a hint, not always a hard-rule.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: rearrange line exceeding 80 characters
2020-03-19 14:16 [PATCH] staging: sm750fb: rearrange line exceeding 80 characters Gokce Kuler
2020-03-19 14:29 ` Greg KH
@ 2020-03-19 15:11 ` Julia Lawall
2020-03-19 15:15 ` Julia Lawall
1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2020-03-19 15:11 UTC (permalink / raw)
To: Gokce Kuler; +Cc: outreachy-kernel, gregkh
On Thu, 19 Mar 2020, Gokce Kuler wrote:
> Moved to the bottom line after << operator for it exceeds 80 character
The log message should be in the imperative. So something like "Move the
right argument of << to a new line to stay within the 80 character limit."
If you found the problem using checkpatch, it is nice to mention that as
well.
julia
>
> Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> ---
> drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> index bbbef27..b67c545 100644
> --- a/drivers/staging/sm750fb/sm750_cursor.c
> +++ b/drivers/staging/sm750fb/sm750_cursor.c
> @@ -116,7 +116,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
> opr = mask & color;
>
> /* 2 stands for forecolor and 1 for backcolor */
> - data |= ((opr & (0x80 >> j)) ? 2 : 1) << (j * 2);
> + data |= ((opr & (0x80 >> j)) ? 2 : 1) <<
> + (j * 2);
> }
> }
> iowrite16(data, pbuffer);
> --
> 2.7.4
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200319141612.GA11981%40siyah2.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: rearrange line exceeding 80 characters
2020-03-19 15:11 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-19 15:15 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2020-03-19 15:15 UTC (permalink / raw)
To: Gokce Kuler; +Cc: outreachy-kernel, gregkh
On Thu, 19 Mar 2020, Julia Lawall wrote:
>
>
> On Thu, 19 Mar 2020, Gokce Kuler wrote:
>
> > Moved to the bottom line after << operator for it exceeds 80 character
>
> The log message should be in the imperative. So something like "Move the
> right argument of << to a new line to stay within the 80 character limit."
>
> If you found the problem using checkpatch, it is nice to mention that as
> well.
Greg thought the code was ok as is, but maybe you can use the comments on
some other patch :)
julia
>
> julia
>
> >
> > Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> > ---
> > drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> > index bbbef27..b67c545 100644
> > --- a/drivers/staging/sm750fb/sm750_cursor.c
> > +++ b/drivers/staging/sm750fb/sm750_cursor.c
> > @@ -116,7 +116,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
> > opr = mask & color;
> >
> > /* 2 stands for forecolor and 1 for backcolor */
> > - data |= ((opr & (0x80 >> j)) ? 2 : 1) << (j * 2);
> > + data |= ((opr & (0x80 >> j)) ? 2 : 1) <<
> > + (j * 2);
> > }
> > }
> > iowrite16(data, pbuffer);
> > --
> > 2.7.4
> >
> > --
> > 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200319141612.GA11981%40siyah2.
> >
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.2003191610430.2312%40hadrien.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-19 15:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:16 [PATCH] staging: sm750fb: rearrange line exceeding 80 characters Gokce Kuler
2020-03-19 14:29 ` Greg KH
2020-03-19 15:11 ` [Outreachy kernel] " Julia Lawall
2020-03-19 15:15 ` 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.