* [PATCH] staging: sm750fb: add spaces around operators
@ 2017-02-20 5:14 Katie Dunne
2017-02-20 6:46 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Katie Dunne @ 2017-02-20 5:14 UTC (permalink / raw)
To: outreachy-kernel; +Cc: greg, sudipm.mukherjee, teddy.wang, sudip
Add spaces around operators -, *, ?:, >>, << to conform to kernel style.
These instances were found with checkpatch.pl
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
---
drivers/staging/sm750fb/sm750_cursor.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index b1651b0..dbc8bb1 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -111,14 +111,14 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor,
data = 0;
for (j = 0; j < 8; j++) {
- if (mask & (0x80>>j)) {
+ if (mask & (0x80 >> j)) {
if (rop == ROP_XOR)
opr = mask ^ color;
else
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);
@@ -165,13 +165,13 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor,
data = 0;
for (j = 0; j < 8; j++) {
- if (mask & (1<<j))
- data |= ((color & (1<<j))?1:2)<<(j*2);
+ if (mask & (1 << j))
+ data |= ((color & (1 << j)) ? 1 : 2) << (j * 2);
}
iowrite16(data, pbuffer);
/* assume pitch is 1,2,4,8,...*/
- if (!(i&(pitch-1))) {
+ if (!(i & (pitch - 1))) {
/* need a return */
pstart += offset;
pbuffer = pstart;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: add spaces around operators
2017-02-20 5:14 [PATCH] staging: sm750fb: add spaces around operators Katie Dunne
@ 2017-02-20 6:46 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-02-20 6:46 UTC (permalink / raw)
To: Katie Dunne; +Cc: outreachy-kernel, greg, sudipm.mukherjee, teddy.wang, sudip
On Sun, 19 Feb 2017, Katie Dunne wrote:
> Add spaces around operators -, *, ?:, >>, << to conform to kernel style.
> These instances were found with checkpatch.pl
>
> Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> drivers/staging/sm750fb/sm750_cursor.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> index b1651b0..dbc8bb1 100644
> --- a/drivers/staging/sm750fb/sm750_cursor.c
> +++ b/drivers/staging/sm750fb/sm750_cursor.c
> @@ -111,14 +111,14 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor,
> data = 0;
>
> for (j = 0; j < 8; j++) {
> - if (mask & (0x80>>j)) {
> + if (mask & (0x80 >> j)) {
> if (rop == ROP_XOR)
> opr = mask ^ color;
> else
> 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);
> @@ -165,13 +165,13 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor,
> data = 0;
>
> for (j = 0; j < 8; j++) {
> - if (mask & (1<<j))
> - data |= ((color & (1<<j))?1:2)<<(j*2);
> + if (mask & (1 << j))
> + data |= ((color & (1 << j)) ? 1 : 2) << (j * 2);
> }
> iowrite16(data, pbuffer);
>
> /* assume pitch is 1,2,4,8,...*/
> - if (!(i&(pitch-1))) {
> + if (!(i & (pitch - 1))) {
> /* need a return */
> pstart += offset;
> pbuffer = pstart;
> --
> 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 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/20170220051429.GA3847%40katie-Inspiron-5748.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-20 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20 5:14 [PATCH] staging: sm750fb: add spaces around operators Katie Dunne
2017-02-20 6:46 ` [Outreachy kernel] " 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.