staging: sm750fb: align sm750_hw_cursor_set_size() arguments
PATCH 1/2 staging: sm750fb: align sm750_hw_cursor_set_size() arguments
Align the continued arguments with the opening parenthesis to satisfy CodingStyle and checkpatch.
No functional change intended.
Signed-off-by Cristian Del Gobbo <[email protected]>
--- drivers/staging/sm750fb/sm750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/sm750.c +2 -2
@@ -121,8 +121,8 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)sm750_hw_cursor_disable (cursor);if (fbcursor->set &FB_CUR_SETSIZE )sm750_hw_cursor_set_size (cursor, - fbcursor->image.width, - fbcursor->image.height); + fbcursor->image.width, + fbcursor->image.height);if (fbcursor->set &FB_CUR_SETPOS ) sm750_hw_cursor_set_pos(cursor,
Signature · 1 line
2.34.1
PATCH 2/2 staging: sm750fb: avoid chained assignment in setcolreg()
Replace the chained assignment of red/green/blue with a temporary variable and braces. This keeps behavior identical while improving readability and satisfying checkpatch.
No functional change intended.
Signed-off-by Cristian Del Gobbo <[email protected]>
--- drivers/staging/sm750fb/sm750.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/sm750.c +7 -2
@@ -537,8 +537,13 @@ static int lynxfb_ops_setcolreg(unsigned int regno,return -EINVAL ; } -if (info->var.grayscale) - red = green = blue = (red *77 + green *151 + blue *28 ) >>8 ; +if (info->var.grayscale) { +int lum = (red *77 + green *151 + blue *28 ) >>8 ; + + red = lum; + green = lum; + blue = lum; + }if (var->bits_per_pixel ==8 && info->fix.visual ==FB_VISUAL_PSEUDOCOLOR ) {
Signature · 1 line
2.34.1