All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vt6655: dpc: Removed variables that is never used
@ 2015-01-31 15:16 Rickard Strandqvist
  2015-01-31 22:13 ` Malcolm Priestley
  0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2015-01-31 15:16 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman
  Cc: Rickard Strandqvist, Malcolm Priestley, Guido Martínez,
	Guillaume Clement, Veronika Kabatova, Joe Perches, devel,
	linux-kernel

Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/staging/vt6655/dpc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index 977683c..9e9da3c 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -43,7 +43,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
 	struct ieee80211_rx_status rx_status = { 0 };
 	struct ieee80211_hdr *hdr;
 	__le16 fc;
-	u8 *rsr, *new_rsr, *rssi;
+	u8 *rssi;
 	__le64 *tsf_time;
 	u16 frame_size;
 	int ii, r;
@@ -88,9 +88,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
 
 	tsf_time = (__le64 *)(skb_data + bytes_received - 12);
 	sq = skb_data + bytes_received - 4;
-	new_rsr = skb_data + bytes_received - 3;
 	rssi = skb_data + bytes_received - 2;
-	rsr = skb_data + bytes_received - 1;
 
 	RFvRSSITodBm(priv, *rssi, &rx_dbm);
 
-- 
1.7.10.4


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

* Re: [PATCH] staging: vt6655: dpc: Removed variables that is never used
  2015-01-31 15:16 [PATCH] staging: vt6655: dpc: Removed variables that is never used Rickard Strandqvist
@ 2015-01-31 22:13 ` Malcolm Priestley
  0 siblings, 0 replies; 2+ messages in thread
From: Malcolm Priestley @ 2015-01-31 22:13 UTC (permalink / raw)
  To: Rickard Strandqvist, Forest Bond, Greg Kroah-Hartman
  Cc: Guido Martínez, Guillaume Clement, Veronika Kabatova,
	Joe Perches, devel, linux-kernel



On 31/01/15 15:16, Rickard Strandqvist wrote:
> Variable was assigned a value that was never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>   drivers/staging/vt6655/dpc.c |    4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
> index 977683c..9e9da3c 100644
> --- a/drivers/staging/vt6655/dpc.c
> +++ b/drivers/staging/vt6655/dpc.c
> @@ -43,7 +43,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
>   	struct ieee80211_rx_status rx_status = { 0 };
>   	struct ieee80211_hdr *hdr;
>   	__le16 fc;
> -	u8 *rsr, *new_rsr, *rssi;
> +	u8 *rssi;
I rather this was not removed, these are error reporting.

I have a patch for them that I will send shortly.


Malcolm


>   	__le64 *tsf_time;
>   	u16 frame_size;
>   	int ii, r;
> @@ -88,9 +88,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
>
>   	tsf_time = (__le64 *)(skb_data + bytes_received - 12);
>   	sq = skb_data + bytes_received - 4;
> -	new_rsr = skb_data + bytes_received - 3;
>   	rssi = skb_data + bytes_received - 2;
> -	rsr = skb_data + bytes_received - 1;
>
>   	RFvRSSITodBm(priv, *rssi, &rx_dbm);
>
>

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

end of thread, other threads:[~2015-01-31 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 15:16 [PATCH] staging: vt6655: dpc: Removed variables that is never used Rickard Strandqvist
2015-01-31 22:13 ` Malcolm Priestley

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.