From: Greg KH <gregkh@linuxfoundation.org>
To: Dalvin-Ehinoma Noah Aiguobas <pharcodra@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: sm750fb: fix camelCase names
Date: Sun, 28 May 2023 10:09:52 +0100 [thread overview]
Message-ID: <2023052806-goldfish-snare-07a1@gregkh> (raw)
In-Reply-To: <20230514120040.GA10240@koolguy>
On Sun, May 14, 2023 at 02:00:40PM +0200, Dalvin-Ehinoma Noah Aiguobas wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> Avoid CamelCase:
> Rename variables and functions in ddk750_sii164.c which cause styleproblem.
>
> Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <pharcodra@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_sii164.c | 104 ++++++++++++------------
> 1 file changed, 52 insertions(+), 52 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
> index 3da1796cd7aa..4b8f9e617a91 100644
> --- a/drivers/staging/sm750fb/ddk750_sii164.c
> +++ b/drivers/staging/sm750fb/ddk750_sii164.c
> @@ -12,11 +12,11 @@
> #define USE_HW_I2C
>
> #ifdef USE_HW_I2C
> - #define i2cWriteReg sm750_hw_i2c_write_reg
> - #define i2cReadReg sm750_hw_i2c_read_reg
> + #define i2c_write_reg sm750_hw_i2c_write_reg
> + #define i2c_read_reg sm750_hw_i2c_read_reg
> #else
> - #define i2cWriteReg sm750_sw_i2c_write_reg
> - #define i2cReadReg sm750_sw_i2c_read_reg
> + #define i2c_write_reg sm750_sw_i2c_write_reg
> + #define i2c_read_reg sm750_sw_i2c_read_reg
> #endif
Why are these needed at all? The above #define is always set, so just
unwind these to use the real function calls insteadd.
>
> /* SII164 Vendor and Device ID */
> @@ -25,7 +25,7 @@
>
> #ifdef SII164_FULL_FUNCTIONS
> /* Name of the DVI Controller chip */
> -static char *gDviCtrlChipName = "Silicon Image SiI 164";
> +static char *g_dvi_ctrl_chip_name = "Silicon Image SiI 164";
Why did you keep the "g_" here? That is keeping an odd identifier name
for no reason.
> #endif
>
> /*
> @@ -37,14 +37,14 @@ static char *gDviCtrlChipName = "Silicon Image SiI 164";
> */
> unsigned short sii164_get_vendor_id(void)
> {
> - unsigned short vendorID;
> + unsigned short vendor_ID;
Isn't the original the term used by the i2c specification? If so,
please don't change it.
>
> - vendorID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
> + vendor_ID = ((unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
> SII164_VENDOR_ID_HIGH) << 8) |
> - (unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
> + (unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
> SII164_VENDOR_ID_LOW);
You didn't fix up the indentation here either :(
I stopped reviewing here, sorry.
greg k-h
prev parent reply other threads:[~2023-05-28 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-14 12:00 [PATCH] staging: sm750fb: fix camelCase names Dalvin-Ehinoma Noah Aiguobas
2023-05-28 9:09 ` Greg KH [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=2023052806-goldfish-snare-07a1@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=pharcodra@gmail.com \
--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