From: Joe Perches <joe@perches.com>
To: Jeremy Lacomis <j.lacomis@gmail.com>,
sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
gregkh@linuxfoundation.org
Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: sm750fb: Fix coding style issue in ddk750_sii164.c
Date: Sat, 25 Nov 2017 14:36:27 -0800 [thread overview]
Message-ID: <1511649387.20482.5.camel@perches.com> (raw)
In-Reply-To: <20171125175937.10428-1-j.lacomis@gmail.com>
On Sat, 2017-11-25 at 12:59 -0500, Jeremy Lacomis wrote:
> This is a patch to the ddk750_sii164.c file that fixes line length warnings
> found by the checkpatch.pl script
>
> Signed-off-by: Jeremy Lacomis <j.lacomis@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_sii164.c | 39 +++++++++++++++++++--------------
> 1 file changed, 23 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
> index c787a74c4f9c..d081ecbb3e3d 100644
> --- a/drivers/staging/sm750fb/ddk750_sii164.c
> +++ b/drivers/staging/sm750fb/ddk750_sii164.c
> @@ -39,8 +39,10 @@ unsigned short sii164GetVendorID(void)
> {
> unsigned short vendorID;
>
> - vendorID = ((unsigned short) i2cReadReg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_HIGH) << 8) |
> - (unsigned short) i2cReadReg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_LOW);
> + vendorID = ((unsigned short) i2cReadReg(SII164_I2C_ADDRESS,
> + SII164_VENDOR_ID_HIGH) << 8) |
> + (unsigned short) i2cReadReg(SII164_I2C_ADDRESS,
> + SII164_VENDOR_ID_LOW);
>
> return vendorID;
> }
> @@ -56,15 +58,20 @@ unsigned short sii164GetDeviceID(void)
> {
> unsigned short deviceID;
>
> - deviceID = ((unsigned short) i2cReadReg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_HIGH) << 8) |
> - (unsigned short) i2cReadReg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_LOW);
> + deviceID = ((unsigned short) i2cReadReg(SII164_I2C_ADDRESS,
> + SII164_DEVICE_ID_HIGH) << 8) |
> + (unsigned short) i2cReadReg(SII164_I2C_ADDRESS,
> + SII164_DEVICE_ID_LOW);
>
> return deviceID;
> }
i2cReadReg is always used with SII154_I2C_ADDRESS.
Perhaps it'd be better to redefine i2cReadReg to something else.
i2cReadReg also returns an unsigned char so this cast isn't
particularly sensible.
Perhaps something like:
#define sii164_i2c_read_reg(reg) i2cReadReg(SII164_I2C_ADDRESS, reg)
device_id = sii164_i2c_read_reg(SII164_DEVICE_ID_HIGH) << 8 |
sii164_i2c_read_reg(SII164_DEVICE_ID_LOW);
next prev parent reply other threads:[~2017-11-25 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-25 17:59 Jeremy Lacomis
2017-11-25 22:36 ` Joe Perches [this message]
2017-11-25 22:48 ` [PATCH v2] staging: sm750b: Fix coding style issues in sm750_accel.c Jeremy Lacomis
2017-11-28 13:13 ` Greg Kroah-Hartman
2017-11-28 13:58 ` Jeremy Lacomis
2017-11-26 1:04 ` [PATCH v2] Staging: sm750fb: Fix coding style issue in ddk750_sii164.c Jeremy Lacomis
2017-11-28 13:14 ` Greg Kroah-Hartman
2017-11-28 14:00 ` Jeremy Lacomis
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=1511649387.20482.5.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=j.lacomis@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
Powered by JetHome