From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: H Hartley Sweeten
<hartleys-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
Cc: "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org"
<ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Subject: Re: [PATCH] i2c-dev.c: remove unnecessary casts
Date: Wed, 10 Mar 2010 08:56:21 +0100 [thread overview]
Message-ID: <20100310085621.3a9a4407@hyperion.delvare> (raw)
In-Reply-To: <0D753D10438DA54287A00B027084269763682CE02B-gaq956PjLg32KbjnnMDalRurcAul1UnsRrxOEX5GOmysTnJN9+BGXg@public.gmane.org>
On Tue, 9 Mar 2010 17:45:57 -0600, H Hartley Sweeten wrote:
> The private_data member of struct file is a void *, there is no need
> to cast it.
>
> Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
>
> ---
>
> diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
> index f4110aa..c507204 100644
> --- a/drivers/i2c/i2c-dev.c
> +++ b/drivers/i2c/i2c-dev.c
> @@ -138,7 +138,7 @@ static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count,
> char *tmp;
> int ret;
>
> - struct i2c_client *client = (struct i2c_client *)file->private_data;
> + struct i2c_client *client = file->private_data;
>
> if (count > 8192)
> count = 8192;
> @@ -162,7 +162,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
> {
> int ret;
> char *tmp;
> - struct i2c_client *client = (struct i2c_client *)file->private_data;
> + struct i2c_client *client = file->private_data;
>
> if (count > 8192)
> count = 8192;
> @@ -369,7 +369,7 @@ static noinline int i2cdev_ioctl_smbus(struct i2c_client *client,
>
> static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct i2c_client *client = (struct i2c_client *)file->private_data;
> + struct i2c_client *client = file->private_data;
> unsigned long funcs;
>
> dev_dbg(&client->adapter->dev, "ioctl, cmd=0x%02x, arg=0x%02lx\n",
Applied, thanks.
--
Jean Delvare
prev parent reply other threads:[~2010-03-10 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 23:45 [PATCH] i2c-dev.c: remove unnecessary casts H Hartley Sweeten
[not found] ` <0D753D10438DA54287A00B027084269763682CE02B-gaq956PjLg32KbjnnMDalRurcAul1UnsRrxOEX5GOmysTnJN9+BGXg@public.gmane.org>
2010-03-10 7:56 ` Jean Delvare [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=20100310085621.3a9a4407@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=hartleys-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).