Skip to content

Commit

Permalink
staging: sm750fb: Rename maxW to max_w in lynx_cursor
Browse files Browse the repository at this point in the history
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 <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/c0c84569b155df7b510a505a86863987836e192d.1627304144.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Benjamin Philip authored and Greg Kroah-Hartman committed Jul 27, 2021
1 parent cfdafb7 commit 39f9137
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/sm750fb/sm750.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/sm750fb/sm750.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/sm750fb/sm750_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 39f9137

Please sign in to comment.