Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-14 Thread Jingoo Han
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 
> >>
> >> Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
> >> No space needed before a cast.
> >>
> >> Signed-off-by: Pascal COMBES 
> >> ---
> >> 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(>cmds);
> >>
> >
> >
> > Paul Bolle
> >
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-14 Thread Pascal COMBES
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 
>>
>> Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
>> No space needed before a cast.
>>
>> Signed-off-by: Pascal COMBES 
>> ---
>> 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.
Regards,
Pascal COMBES.
> 
>>  int rc = 0;
>>  if (adp)
>>  rc = crystalhd_cmd_interrupt(>cmds);
>>
> 
> 
> Paul Bolle
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-14 Thread Jingoo Han
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 pas...@orange.fr
 
  Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
  No space needed before a cast.
 
  Signed-off-by: Pascal COMBES pas...@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
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-14 Thread Pascal COMBES
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 pas...@orange.fr

 Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
 No space needed before a cast.

 Signed-off-by: Pascal COMBES pas...@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.
Regards,
Pascal COMBES.
 
  int rc = 0;
  if (adp)
  rc = crystalhd_cmd_interrupt(adp-cmds);

 
 
 Paul Bolle
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-13 Thread Paul Bolle
On Sun, 2014-04-13 at 21:13 +0200, Pascal COMBES wrote:
> From: Pascal COMBES 
> 
> Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
> No space needed before a cast.
> 
> Signed-off-by: Pascal COMBES 
> ---
> 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?

>   int rc = 0;
>   if (adp)
>   rc = crystalhd_cmd_interrupt(>cmds);
> 


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-13 Thread Pascal COMBES
From: Pascal COMBES 

Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
No space needed before a cast.

Signed-off-by: Pascal COMBES 
---
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;
int rc = 0;
if (adp)
rc = crystalhd_cmd_interrupt(>cmds);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-13 Thread Pascal COMBES
From: Pascal COMBES pas...@orange.fr

Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
No space needed before a cast.

Signed-off-by: Pascal COMBES pas...@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;
int rc = 0;
if (adp)
rc = crystalhd_cmd_interrupt(adp-cmds);

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 2/3] Fix coding style problem (cast with space) in drivers/staging/crystalhd/crystalhd_lnx.c

2014-04-13 Thread Paul Bolle
On Sun, 2014-04-13 at 21:13 +0200, Pascal COMBES wrote:
 From: Pascal COMBES pas...@orange.fr
 
 Fix coding style problem in drivers/staging/crystalhd/crystalhd_lnx.c:
 No space needed before a cast.
 
 Signed-off-by: Pascal COMBES pas...@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?

   int rc = 0;
   if (adp)
   rc = crystalhd_cmd_interrupt(adp-cmds);
 


Paul Bolle

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/