Skip to contentSkip to conversation

staging: sm750fb: rearrange line exceeding 80 characters

PATCH In review Gokce Kuler 3 participants 4 messages Mar 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: rearrange line exceeding 80 characters

Moved to the bottom line after << operator for it exceeds 80 character

---
 drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/sm750fb/sm750_cursor.c +2 -1
index bbbef27..b67c545 100644
@@ -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);
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 12 lines · Gokce Kuler

Moved to the bottom line after << operator for it exceeds 80 character

---
 drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/sm750fb/sm750_cursor.c +0 -0
index bbbef27..b67c545 100644

drivers/staging/sm750fb/sm750_cursor.c void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, · line 120

Quoted 6 lines
drivers/staging/sm750fb/sm750_cursor.c +2 -1
@@ -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

#2 lore raw
In reply to Gokce Kuler
Quoted 1 line · Gokce Kuler

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

Quoted 28 lines
---
 drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/sm750fb/sm750_cursor.c +2 -2
index bbbef27..b67c545 100644
@@ -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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200319141612.GA11981%40siyah2.

#3 lore raw
Quoted 11 lines · Julia Lawall
Quoted 1 line · Gokce Kuler

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

Quoted 37 lines

julia

Quoted 23 lines
---
 drivers/staging/sm750fb/sm750_cursor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/sm750fb/sm750_cursor.c +2 -2
index bbbef27..b67c545 100644
@@ -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

Quoted 5 lines

--
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 [email protected]. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.2003191610430.2312%40hadrien.