diff mbox series

hostap: remove set but not used variable 'copied' in prism2_io_debug_proc_read

Message ID 1567497430-22539-1-git-send-email-zhongjiang@huawei.com (mailing list archive)
State Accepted
Commit 64827a6ac04993c42aae7c3fed4c3b74c14da693
Delegated to: Kalle Valo
Headers show
Series hostap: remove set but not used variable 'copied' in prism2_io_debug_proc_read | expand

Commit Message

zhong jiang Sept. 3, 2019, 7:57 a.m. UTC
Obviously, variable 'copied' is initialized to zero. But it is not used.
hence just remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/net/wireless/intersil/hostap/hostap_proc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

zhong jiang Sept. 3, 2019, 8:01 a.m. UTC | #1
Please ignore the patch.  Because  the hostap_proc.c is marked as 'obsolete'.

Thanks,
zhong jiang
On 2019/9/3 15:57, zhong jiang wrote:
> Obviously, variable 'copied' is initialized to zero. But it is not used.
> hence just remove it.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  drivers/net/wireless/intersil/hostap/hostap_proc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/intersil/hostap/hostap_proc.c b/drivers/net/wireless/intersil/hostap/hostap_proc.c
> index 703d74c..6151d8d 100644
> --- a/drivers/net/wireless/intersil/hostap/hostap_proc.c
> +++ b/drivers/net/wireless/intersil/hostap/hostap_proc.c
> @@ -234,7 +234,7 @@ static int prism2_io_debug_proc_read(char *page, char **start, off_t off,
>  {
>  	local_info_t *local = (local_info_t *) data;
>  	int head = local->io_debug_head;
> -	int start_bytes, left, copy, copied;
> +	int start_bytes, left, copy;
>  
>  	if (off + count > PRISM2_IO_DEBUG_SIZE * 4) {
>  		*eof = 1;
> @@ -243,7 +243,6 @@ static int prism2_io_debug_proc_read(char *page, char **start, off_t off,
>  		count = PRISM2_IO_DEBUG_SIZE * 4 - off;
>  	}
>  
> -	copied = 0;
>  	start_bytes = (PRISM2_IO_DEBUG_SIZE - head) * 4;
>  	left = count;
>
Kalle Valo Sept. 5, 2019, 1:45 p.m. UTC | #2
zhong jiang <zhongjiang@huawei.com> writes:

> Please ignore the patch.  Because  the hostap_proc.c is marked as 'obsolete'.

You mean marked in the MAINTAINERS file? I don't see that as a problem,
I can (and should) still apply any patches submitted to hostap driver.
zhong jiang Sept. 5, 2019, 2:10 p.m. UTC | #3
On 2019/9/5 21:45, Kalle Valo wrote:
> zhong jiang <zhongjiang@huawei.com> writes:
>
>> Please ignore the patch.  Because  the hostap_proc.c is marked as 'obsolete'.
> You mean marked in the MAINTAINERS file? I don't see that as a problem,
> I can (and should) still apply any patches submitted to hostap driver.
>
I  hit the following issue when checking the patch by checkpatch.pl

WARNING: drivers/net/wireless/intersil/hostap/hostap_proc.c is marked as 'obsolete' in the MAINTAINERS hierarchy.
No unnecessary modifications please.

I certainly hope it can be appiled to upstream if the above check doesn't matter.

Thanks,
zhong jiang
Kalle Valo Sept. 5, 2019, 2:19 p.m. UTC | #4
zhong jiang <zhongjiang@huawei.com> writes:

> On 2019/9/5 21:45, Kalle Valo wrote:
>> zhong jiang <zhongjiang@huawei.com> writes:
>>
>>> Please ignore the patch.  Because  the hostap_proc.c is marked as 'obsolete'.
>> You mean marked in the MAINTAINERS file? I don't see that as a problem,
>> I can (and should) still apply any patches submitted to hostap driver.
>>
> I  hit the following issue when checking the patch by checkpatch.pl
>
> WARNING: drivers/net/wireless/intersil/hostap/hostap_proc.c is marked
> as 'obsolete' in the MAINTAINERS hierarchy.
> No unnecessary modifications please.
>
> I certainly hope it can be appiled to upstream if the above check doesn't matter.

I have no idea why checkpatch says like that and I'm going to just
ignore that warning. As long as the driver is in the tree I think it
should be improved.
Kalle Valo Sept. 6, 2019, 2:10 p.m. UTC | #5
zhong jiang <zhongjiang@huawei.com> wrote:

> Obviously, variable 'copied' is initialized to zero. But it is not used.
> hence just remove it.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

64827a6ac049 hostap: remove set but not used variable 'copied' in prism2_io_debug_proc_read
diff mbox series

Patch

diff --git a/drivers/net/wireless/intersil/hostap/hostap_proc.c b/drivers/net/wireless/intersil/hostap/hostap_proc.c
index 703d74c..6151d8d 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_proc.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_proc.c
@@ -234,7 +234,7 @@  static int prism2_io_debug_proc_read(char *page, char **start, off_t off,
 {
 	local_info_t *local = (local_info_t *) data;
 	int head = local->io_debug_head;
-	int start_bytes, left, copy, copied;
+	int start_bytes, left, copy;
 
 	if (off + count > PRISM2_IO_DEBUG_SIZE * 4) {
 		*eof = 1;
@@ -243,7 +243,6 @@  static int prism2_io_debug_proc_read(char *page, char **start, off_t off,
 		count = PRISM2_IO_DEBUG_SIZE * 4 - off;
 	}
 
-	copied = 0;
 	start_bytes = (PRISM2_IO_DEBUG_SIZE - head) * 4;
 	left = count;