*** staging: sm750fb: Rename maxH and maxW to max_h and max_w ***
cover *** staging: sm750fb: Rename maxH and maxW to max_h and max_w ***
This patchset (as the subject implies) renames some struct members to follow the snake_case naming convention from CamelCase. By doing so, it also fixes 2 checkpatch CHECKs.
To test it, I have only checked if the module builds, which it does.
Note: I am very new to the Linux Kernel. This is my first patch. I have done my best to ensure that my patch is upto the expected standard and to research on what it is expected by maintainers. Please forgive me if I have done something wrong.
Thanks,
Benjamin Philip
Benjamin Philip (2):
staging: sm750fb: Rename maxH to max_h in lynx_cursor
staging: sm750fb: Rename maxW to max_w in lynx_cursor
drivers/staging/sm750fb/sm750.c | 8 ++++---- drivers/staging/sm750fb/sm750.h | 4 ++-- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 staging: sm750fb: Rename maxH to max_h in lynx_cursor
The struct lynx_cursor has a member named maxH. This name is CamelCase and is frowned upon. This commit renames it to max_h and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECK:
CHECK: Avoid CamelCase: <maxH>
116: FILE: drivers/staging/sm750fb/sm750.c:116:
+ fbcursor->image.height > cursor->maxH ||
--- drivers/staging/sm750fb/sm750.c | 6 +++--- drivers/staging/sm750fb/sm750.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.c +3 -3
@@ -113,7 +113,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) cursor = &crtc->cursor;if (fbcursor->image.width > cursor->maxW || - fbcursor->image.height > cursor->maxH || + fbcursor->image.height > cursor->max_h || fbcursor->image.depth >1 ) {return -ENXIO ; }
@@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)0x800f0 + (int )crtc->channel *0x140 ;pr_info ("crtc->cursor.mmio = %p\n" , crtc->cursor.mmio); - crtc->cursor.maxH = crtc->cursor.maxW =64 ; - crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW *2 /8 ; + crtc->cursor.max_h = crtc->cursor.maxW =64 ; + crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW *2 /8 ; crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;memset_io (crtc->cursor.vstart,0 , crtc->cursor.size);
drivers/staging/sm750fb/sm750.h +1 -1
@@ -123,7 +123,7 @@ struct lynx_cursor {int size;/* hardware limitation */ int maxW; -int maxH; +int max_h;/* base virtual address and offset of cursor image */ char __iomem *vstart;int offset;
Signature · 1 line
2.31.1
PATCH 2/2 staging: sm750fb: Rename maxW to max_w in lynx_cursor
In reply to Benjamin PhilipThe struct lynx_cursor has a member named maxW. This name is CamelCase and is frowned upon. This commit renames it to max_w and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECK:
CHECK: Avoid CamelCase: <maxW>
115: FILE: drivers/staging/sm750fb/sm750.c:115:
+ if (fbcursor->image.width > cursor->maxW ||
--- drivers/staging/sm750fb/sm750.c | 6 +++--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/sm750fb/sm750.c +3 -3
@@ -112,7 +112,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) crtc = &par->crtc; cursor = &crtc->cursor; -if (fbcursor->image.width > cursor->maxW || +if (fbcursor->image.width > cursor->max_w || fbcursor->image.height > cursor->max_h || fbcursor->image.depth >1 ) {return -ENXIO ;
@@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)0x800f0 + (int )crtc->channel *0x140 ;pr_info ("crtc->cursor.mmio = %p\n" , crtc->cursor.mmio); - crtc->cursor.max_h = crtc->cursor.maxW =64 ; - crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW *2 /8 ; + crtc->cursor.max_h = crtc->cursor.max_w =64 ; + crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w *2 /8 ; crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;memset_io (crtc->cursor.vstart,0 , crtc->cursor.size);
drivers/staging/sm750fb/sm750.h +1 -1
@@ -122,7 +122,7 @@ struct lynx_cursor {int h;int size;/* hardware limitation */ -int maxW; +int max_w;int max_h;/* base virtual address and offset of cursor image */ char __iomem *vstart;
drivers/staging/sm750fb/sm750_cursor.c +2 -2
@@ -97,7 +97,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
@@ -147,7 +147,7 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
Signature · 1 line
2.31.1