Skip to content

Commit 39f9137

Browse files
Benjamin-Philipgregkh
authored andcommitted
staging: sm750fb: Rename maxW to max_w in lynx_cursor
The 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 || Signed-off-by: Benjamin Philip <[email protected]> Link: https://lore.kernel.org/r/c0c84569b155df7b510a505a86863987836e192d.1627304144.git.benjamin.philip495@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cfdafb7 commit 39f9137

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/staging/sm750fb/sm750.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
112112
crtc = &par->crtc;
113113
cursor = &crtc->cursor;
114114

115-
if (fbcursor->image.width > cursor->maxW ||
115+
if (fbcursor->image.width > cursor->max_w ||
116116
fbcursor->image.height > cursor->max_h ||
117117
fbcursor->image.depth > 1) {
118118
return -ENXIO;
@@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
723723
0x800f0 + (int)crtc->channel * 0x140;
724724

725725
pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
726-
crtc->cursor.max_h = crtc->cursor.maxW = 64;
727-
crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW * 2 / 8;
726+
crtc->cursor.max_h = crtc->cursor.max_w = 64;
727+
crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
728728
crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
729729

730730
memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);

drivers/staging/sm750fb/sm750.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ struct lynx_cursor {
122122
int h;
123123
int size;
124124
/* hardware limitation */
125-
int maxW;
125+
int max_w;
126126
int max_h;
127127
/* base virtual address and offset of cursor image */
128128
char __iomem *vstart;

drivers/staging/sm750fb/sm750_cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
9797
count = pitch * cursor->h;
9898

9999
/* in byte */
100-
offset = cursor->maxW * 2 / 8;
100+
offset = cursor->max_w * 2 / 8;
101101

102102
data = 0;
103103
pstart = cursor->vstart;
@@ -147,7 +147,7 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop,
147147
count = pitch * cursor->h;
148148

149149
/* in byte */
150-
offset = cursor->maxW * 2 / 8;
150+
offset = cursor->max_w * 2 / 8;
151151

152152
data = 0;
153153
pstart = cursor->vstart;

0 commit comments

Comments
 (0)