From: Benjamin Philip <benjamin.philip495@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Teddy Wang <teddy.wang@siliconmotion.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Benjamin Philip <benjamin.philip495@gmail.com>
Subject: [PATCH 2/2] staging: sm750fb: Rename maxW to max_w in lynx_cursor
Date: Mon, 26 Jul 2021 18:45:02 +0530 [thread overview]
Message-ID: <c0c84569b155df7b510a505a86863987836e192d.1627304144.git.benjamin.philip495@gmail.com> (raw)
In-Reply-To: <cover.1627304144.git.benjamin.philip495@gmail.com>
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>
---
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(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index ee9ee2857f00..4f5f68e6aa60 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -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);
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 5556208f7178..8271cf7c89f3 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -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;
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index bbbef27cb329..43e6f52c2551 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -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;
--
2.31.1
prev parent reply other threads:[~2021-07-26 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 13:15 [PATCH 0/2] *** staging: sm750fb: Rename maxH and maxW to max_h and max_w *** Benjamin Philip
2021-07-26 13:15 ` [PATCH 1/2] staging: sm750fb: Rename maxH to max_h in lynx_cursor Benjamin Philip
2021-07-26 13:15 ` Benjamin Philip [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0c84569b155df7b510a505a86863987836e192d.1627304144.git.benjamin.philip495@gmail.com \
--to=benjamin.philip495@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).