Skip to contentSkip to conversation

Staging: sm7xxfb: fixed line break coding style issues

PATCH Superseded Martin Berglund 3 participants 5 messages Sep 27, 2013 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: sm7xxfb: fixed line break coding style issues

Fixed coding style issues.

---
 drivers/staging/sm7xxfb/sm7xxfb.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/staging/sm7xxfb/sm7xxfb.c +4 -7
index 8add64b..57d8145 100644
@@ -259,8 +259,7 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 			if (sfb->fb.var.bits_per_pixel == 16) {
 				u32 *pal = sfb->fb.pseudo_palette;
 				val = chan_to_field(red, &sfb->fb.var.red);
-				val |= chan_to_field(green, \
-						&sfb->fb.var.green);
+				val |= chan_to_field(green, &sfb->fb.var.green);
 				val |= chan_to_field(blue, &sfb->fb.var.blue);
 #ifdef __BIG_ENDIAN
 				pal[regno] =
@@ -274,8 +273,7 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 			} else {
 				u32 *pal = sfb->fb.pseudo_palette;
 				val = chan_to_field(red, &sfb->fb.var.red);
-				val |= chan_to_field(green, \
-						&sfb->fb.var.green);
+				val |= chan_to_field(green, &sfb->fb.var.green);
 				val |= chan_to_field(blue, &sfb->fb.var.blue);
 #ifdef __BIG_ENDIAN
 				val =
@@ -508,9 +506,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if (((i + 0x30) != 0x62) && ((i + 0x30) != 0x6a)
+							&& ((i + 0x30) != 0x6b))
 					smtc_seqw(i + 0x30,
 						VGAMode[j].Init_SR30_SR75[i]);
 
Signature · 1 line
1.8.4
#1 lore raw

drivers/staging/sm7xxfb/sm7xxfb.c static void sm7xx_set_timing(struct smtcfb_info *sfb) · line 510

Quoted 9 lines · Martin Berglund
drivers/staging/sm7xxfb/sm7xxfb.c +2 -3
@@ -508,9 +506,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if (((i + 0x30) != 0x62) && ((i + 0x30) != 0x6a)
+							&& ((i + 0x30) != 0x6b))

The prefered way would be to align this like this:

				if ((i + 0x30) != 0x62 &&
				    (i + 0x30) != 0x6a &&
				    (i + 0x30) != 0x6b)

regards,
dan carpenter

#2 lore raw
Quoted 13 lines · Dan Carpenter

Review static void sm7xx_set_timing(struct smtcfb_info *sfb) · line 510

Quoted 9 lines · Martin Berglund
(quoted diff) +2 -3
@@ -508,9 +506,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if (((i + 0x30) != 0x62) && ((i + 0x30) != 0x6a)
+							&& ((i + 0x30) != 0x6b))

The prefered way would be to align this like this:

Quoted 7 lines
				if ((i + 0x30) != 0x62 &&
				    (i + 0x30) != 0x6a &&
				    (i + 0x30) != 0x6b)

regards,
dan carpenter

New patch.

---
 drivers/staging/sm7xxfb/sm7xxfb.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/sm7xxfb/sm7xxfb.c +5 -7
index 8add64b..8ba0097 100644
@@ -259,8 +259,7 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 			if (sfb->fb.var.bits_per_pixel == 16) {
 				u32 *pal = sfb->fb.pseudo_palette;
 				val = chan_to_field(red, &sfb->fb.var.red);
-				val |= chan_to_field(green, \
-						&sfb->fb.var.green);
+				val |= chan_to_field(green, &sfb->fb.var.green);
 				val |= chan_to_field(blue, &sfb->fb.var.blue);
 #ifdef __BIG_ENDIAN
 				pal[regno] =
@@ -274,8 +273,7 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 			} else {
 				u32 *pal = sfb->fb.pseudo_palette;
 				val = chan_to_field(red, &sfb->fb.var.red);
-				val |= chan_to_field(green, \
-						&sfb->fb.var.green);
+				val |= chan_to_field(green, &sfb->fb.var.green);
 				val |= chan_to_field(blue, &sfb->fb.var.blue);
 #ifdef __BIG_ENDIAN
 				val =
@@ -508,9 +506,9 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if ((i + 0x30) != 0x62 &&
+				    (i + 0x30) != 0x6a &&
+				    (i + 0x30) != 0x6b)
 					smtc_seqw(i + 0x30,
 						VGAMode[j].Init_SR30_SR75[i]);
 
Signature · 1 line
1.8.4
maintainer
#3 lore raw
Quoted 18 lines · Martin Berglund
Quoted 17 lines · Dan Carpenter

drivers/staging/sm7xxfb/sm7xxfb.c static void sm7xx_set_timing(struct smtcfb_info *sfb) · line 510

Quoted 9 lines · Martin Berglund
drivers/staging/sm7xxfb/sm7xxfb.c +2 -3
@@ -508,9 +506,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if (((i + 0x30) != 0x62) && ((i + 0x30) != 0x6a)
+							&& ((i + 0x30) != 0x6b))

The prefered way would be to align this like this:

				if ((i + 0x30) != 0x62 &&
				    (i + 0x30) != 0x6a &&
				    (i + 0x30) != 0x6b)
Quoted 7 lines
Quoted 3 lines

regards,
dan carpenter

New patch.

Can you please resend this in a format I can apply it in, without needing to edit the patch body by hand? I deal with thousands of patches every month, and if I have to edit them all, that cuts down my ability to apply them greatly.

thanks,

greg k-h

#4 lore raw
In reply to Martin Berglund
Quoted 18 lines · Martin Berglund
Quoted 17 lines · Dan Carpenter

drivers/staging/sm7xxfb/sm7xxfb.c static void sm7xx_set_timing(struct smtcfb_info *sfb) · line 510

Quoted 9 lines · Martin Berglund
drivers/staging/sm7xxfb/sm7xxfb.c +2 -3
@@ -508,9 +506,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
 
 			/* init SEQ register SR30 - SR75 */
 			for (i = 0; i < SIZE_SR30_SR75; i++)
-				if (((i + 0x30) != 0x62) \
-					&& ((i + 0x30) != 0x6a) \
-					&& ((i + 0x30) != 0x6b))
+				if (((i + 0x30) != 0x62) && ((i + 0x30) != 0x6a)
+							&& ((i + 0x30) != 0x6b))

The prefered way would be to align this like this:

				if ((i + 0x30) != 0x62 &&
				    (i + 0x30) != 0x6a &&
				    (i + 0x30) != 0x6b)
Quoted 5 lines
Quoted 3 lines

regards,
dan carpenter

New patch.

Looks nice, but could you resend it in a way that can be a applied?

Take your original patch and change the subject to:
[PATCH v2] Staging: sm7xxfb: fixed line break coding style issues

Add "v2: minor style change" under the --- line.

regards,
dan carpenter