All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: Remove initialisation
@ 2019-05-24  5:52 Nishka Dasgupta
  2019-05-24  7:04 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Nishka Dasgupta @ 2019-05-24  5:52 UTC (permalink / raw)
  To: gregkh, colin.king, herbert, qader.aymen, sergio.paracuellos,
	bhanusreemahesh, mattmccoy110, devel, linux-kernel
  Cc: Nishka Dasgupta

The initial value of return variable ret is never used, so it can be
removed.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index e089366ed02a..3775fd4b89ae 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1067,7 +1067,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	unsigned int length = 0;
 	struct hostif_data_request *pp;
 	unsigned char *p;
-	int result = 0;
+	int result;
 	unsigned short eth_proto;
 	struct ether_hdr *eth_hdr;
 	unsigned short keyinfo = 0;
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: ks7010: Remove initialisation
  2019-05-24  5:52 [PATCH] staging: ks7010: Remove initialisation Nishka Dasgupta
@ 2019-05-24  7:04 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2019-05-24  7:04 UTC (permalink / raw)
  To: Nishka Dasgupta
  Cc: gregkh, colin.king, herbert, qader.aymen, sergio.paracuellos,
	bhanusreemahesh, mattmccoy110, devel, linux-kernel

On Fri, May 24, 2019 at 11:22:38AM +0530, Nishka Dasgupta wrote:
> The initial value of return variable ret is never used, so it can be
> removed.
> Issue found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> ---
>  drivers/staging/ks7010/ks_hostif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index e089366ed02a..3775fd4b89ae 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -1067,7 +1067,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
>  	unsigned int length = 0;
>  	struct hostif_data_request *pp;
>  	unsigned char *p;
> -	int result = 0;
> +	int result;

You should get rid of the result variable completely and just use "ret"
instead.  No need for two variables.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: ks7010: Remove initialisation
  2019-05-24  7:01   ` Nishka Dasgupta
@ 2019-05-24  7:42     ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2019-05-24  7:42 UTC (permalink / raw)
  To: Nishka Dasgupta; +Cc: devel, linux-kernel

On Fri, May 24, 2019 at 12:31:19PM +0530, Nishka Dasgupta wrote:
> On 24/05/19 12:22 PM, Greg KH wrote:
> > On Fri, May 24, 2019 at 11:26:02AM +0530, Nishka Dasgupta wrote:
> > > As the initial value of the return variable result is never used, it can
> > > be removed.
> > > Issue found with Coccinelle.
> > > 
> > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> > > ---
> > >   drivers/staging/ks7010/ks7010_sdio.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Didn't you already send this?
> 
> I sent two patches about removing initialisation in ks7010 today, but I
> couldn't make it a patch series because the different files had different
> maintainers. I don't think I've sent this patch before, but it's possible I
> made a mistake because my local tree has not been the best organised lately.
> I apologise for the confusion.
> 

I saw two patches with the same subject line, if I messed up, please
resend.

> > And please run a spell-checker on your subject line when you resend
> > this :)
> 
> Is this about "initialise" (and now also "organised", "apologise", etc)? As
> far as I'm aware whether the word ends in "-ise"/"-ize" depends on local
> varieties of English, so I went with the variety I'm more used to. Should I
> stick with American/Canadian spelling variants (including "-or" over "-our"
> etc) from now on?

Ah, didn't realize that was a valid spelling, sorry.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: ks7010: Remove initialisation
  2019-05-24  6:52 ` Greg KH
@ 2019-05-24  7:01   ` Nishka Dasgupta
  2019-05-24  7:42     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Nishka Dasgupta @ 2019-05-24  7:01 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, linux-kernel

On 24/05/19 12:22 PM, Greg KH wrote:
> On Fri, May 24, 2019 at 11:26:02AM +0530, Nishka Dasgupta wrote:
>> As the initial value of the return variable result is never used, it can
>> be removed.
>> Issue found with Coccinelle.
>>
>> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
>> ---
>>   drivers/staging/ks7010/ks7010_sdio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Didn't you already send this?

I sent two patches about removing initialisation in ks7010 today, but I 
couldn't make it a patch series because the different files had 
different maintainers. I don't think I've sent this patch before, but 
it's possible I made a mistake because my local tree has not been the 
best organised lately. I apologise for the confusion.

> And please run a spell-checker on your subject line when you resend
> this :)

Is this about "initialise" (and now also "organised", "apologise", etc)? 
As far as I'm aware whether the word ends in "-ise"/"-ize" depends on 
local varieties of English, so I went with the variety I'm more used to. 
Should I stick with American/Canadian spelling variants (including "-or" 
over "-our" etc) from now on?

Nishka
> 
> thanks,
> 
> greg k-h
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: ks7010: Remove initialisation
  2019-05-24  5:56 Nishka Dasgupta
@ 2019-05-24  6:52 ` Greg KH
  2019-05-24  7:01   ` Nishka Dasgupta
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2019-05-24  6:52 UTC (permalink / raw)
  To: Nishka Dasgupta; +Cc: devel, linux-kernel

On Fri, May 24, 2019 at 11:26:02AM +0530, Nishka Dasgupta wrote:
> As the initial value of the return variable result is never used, it can
> be removed.
> Issue found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
> ---
>  drivers/staging/ks7010/ks7010_sdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Didn't you already send this?

And please run a spell-checker on your subject line when you resend
this :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] staging: ks7010: Remove initialisation
@ 2019-05-24  5:56 Nishka Dasgupta
  2019-05-24  6:52 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Nishka Dasgupta @ 2019-05-24  5:56 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: Nishka Dasgupta

As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 74551eb717fc..4b379542ecd5 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -380,7 +380,7 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
 					   struct sk_buff *skb),
 		  struct sk_buff *skb)
 {
-	int result = 0;
+	int result;
 	struct hostif_hdr *hdr;
 
 	hdr = (struct hostif_hdr *)p;
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-24  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  5:52 [PATCH] staging: ks7010: Remove initialisation Nishka Dasgupta
2019-05-24  7:04 ` Dan Carpenter
2019-05-24  5:56 Nishka Dasgupta
2019-05-24  6:52 ` Greg KH
2019-05-24  7:01   ` Nishka Dasgupta
2019-05-24  7:42     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.