From: Jingoo Han <jg1.han@samsung.com>
To: "'Pascal COMBES'" <pascom@orange.fr>,
"'Paul Bolle'" <pebolle@tiscali.nl>
Cc: "'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
"'Peter P Waskiewicz Jr'" <peter.p.waskiewicz.jr@intel.com>,
"'Jarod Wilson'" <jarod@wilsonet.com>,
"'Valentina Manea'" <valentina.manea.m@gmail.com>,
linux-kernel@vger.kernel.org,
"'Naren Sankar'" <nsankar@broadcom.com>,
"'Monam Agarwal'" <monamagarwal123@gmail.com>,
"'Scott Davilla'" <davilla@4pi.com>,
"'Amarjargal Gundjalam'" <amarjargal16@gmail.com>,
"'Dan Carpenter'" <dan.carpenter@oracle.com>,
"'Robert Foss'" <dev@robertfoss.se>,
"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c
Date: Tue, 15 Apr 2014 09:44:17 +0900 [thread overview]
Message-ID: <008401cf5843$d4ce80b0$7e6b8210$%han@samsung.com> (raw)
In-Reply-To: <534C0EE3.6080308@orange.fr>
On Tuesday, April 15, 2014 1:38 AM, Pascal COMBES wrote:
>
> Le 13/04/2014 23:36, Paul Bolle a écrit :
> > On Sun, 2014-04-13 at 21:13 +0200, Pascal COMBES wrote:
> >> From: Pascal COMBES <pascom@orange.fr>
> >>
> >> Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
> >> No space needed before a cast.
> >>
> >> Signed-off-by: Pascal COMBES <pascom@orange.fr>
> >> ---
> >> diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
> >> index fd7f08a..15e8f02 100644
> >> --- a/drivers/staging/crystalhd/crystalhd_lnx.c
> >> +++ b/drivers/staging/crystalhd/crystalhd_lnx.c
> >> @@ -28,7 +28,7 @@ static struct crystalhd_adp *g_adp_info;
> >>
> >> static irqreturn_t chd_dec_isr(int irq, void *arg)
> >> {
> >> - struct crystalhd_adp *adp = (struct crystalhd_adp *) arg;
> >> + struct crystalhd_adp *adp = (struct crystalhd_adp *)arg;
> >
> > Shouldn't this cast just be dropped instead?
>
> I think as you and was wondering why it was there but I didn't dare
> removing it. I considered it was not really coding style.
> But after second thought, I will remove it when I resend tomrorrow.
Please, remove unnecessary void cast as below.
- struct crystalhd_adp *adp = (struct crystalhd_adp *) arg;
+ struct crystalhd_adp *adp = arg;
This is because the conversion from void pointer to any other
pointer type is guaranteed by the C programming language.
So, void cast is unnecessary.
Best regards,
Jingoo Han
> Regards,
> Pascal COMBES.
> >
> >> int rc = 0;
> >> if (adp)
> >> rc = crystalhd_cmd_interrupt(&adp->cmds);
> >>
> >
> >
> > Paul Bolle
> >
> >
next prev parent reply other threads:[~2014-04-15 0:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-13 15:35 [PATCH] Fix coding style " Pascal COMBES
2014-04-13 15:48 ` Greg Kroah-Hartman
2014-04-13 19:09 ` [PATCH v2 1/3] Fix alignement problems " Pascal COMBES
2014-04-13 21:02 ` Dan Carpenter
2014-04-13 21:26 ` Paul Bolle
2014-04-13 22:07 ` Dan Carpenter
2014-04-13 22:13 ` Paul Bolle
2014-04-13 22:45 ` Dan Carpenter
2014-04-13 19:13 ` [PATCH v2 2/3] Fix coding style problem (cast with space) " Pascal COMBES
2014-04-13 21:36 ` Paul Bolle
2014-04-14 16:37 ` Pascal COMBES
2014-04-15 0:44 ` Jingoo Han [this message]
2014-04-13 19:13 ` [PATCH v2 3/3] Fix coding style problem (sizeof with type) " Pascal COMBES
2014-04-15 19:21 ` [PATCH v3 1/3] Staging: crystalhd: Fix alignement in crystalhd_lnx.c Pascal COMBES
2014-04-15 19:32 ` Dan Carpenter
2014-04-15 19:21 ` [PATCH v3 2/3] Staging: crystalhd: Removed cast " Pascal COMBES
2014-04-15 19:21 ` [PATCH v3 3/3] Staging: crystalhd: Improve kzalloc calls " Pascal COMBES
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='008401cf5843$d4ce80b0$7e6b8210$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=amarjargal16@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=davilla@4pi.com \
--cc=dev@robertfoss.se \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jarod@wilsonet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=monamagarwal123@gmail.com \
--cc=nsankar@broadcom.com \
--cc=pascom@orange.fr \
--cc=pebolle@tiscali.nl \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=valentina.manea.m@gmail.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
all inboxes | Powered by JetHome®