* [PATCH] misc: mic: dead code removal and minor cleanup
@ 2013-11-09 4:13 Michael Opdenacker
2013-11-09 5:06 ` Dixit, Ashutosh
0 siblings, 1 reply; 3+ messages in thread
From: Michael Opdenacker @ 2013-11-09 4:13 UTC (permalink / raw)
To: harshavardhan.r.kharche, ashutosh.dixit, gregkh, nikhil.rao,
sudeep.dutt
Cc: linux-kernel, Michael Opdenacker
This removes the below test in drivers/misc/mic/card/mic_virtio.c:
if (!retry) {
...
}
This is dead code because the "retry" variable was set to 100
earlier in the same function.
This also removes dev_dbg statements to print the value of this variable.
That's not interesting to print the value of a variable which value is
always the same.
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
---
drivers/misc/mic/card/mic_virtio.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c
index 914cc9b2caad..0f387504b3fa 100644
--- a/drivers/misc/mic/card/mic_virtio.c
+++ b/drivers/misc/mic/card/mic_virtio.c
@@ -167,8 +167,6 @@ static void mic_reset_inform_host(struct virtio_device *vdev)
msleep(100);
};
- dev_dbg(mic_dev(mvdev), "%s: retry: %d\n", __func__, retry);
-
/* Reset status to 0 in case we timed out */
iowrite8(0, &mvdev->desc->status);
}
@@ -337,12 +335,6 @@ static int mic_find_vqs(struct virtio_device *vdev, unsigned nvqs,
msleep(100);
};
- dev_dbg(mic_dev(mvdev), "%s: retry: %d\n", __func__, retry);
- if (!retry) {
- err = -ENODEV;
- goto error;
- }
-
return 0;
error:
mic_del_vqs(vdev);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] misc: mic: dead code removal and minor cleanup
2013-11-09 4:13 [PATCH] misc: mic: dead code removal and minor cleanup Michael Opdenacker
@ 2013-11-09 5:06 ` Dixit, Ashutosh
2013-11-09 5:35 ` Michael Opdenacker
0 siblings, 1 reply; 3+ messages in thread
From: Dixit, Ashutosh @ 2013-11-09 5:06 UTC (permalink / raw)
To: Michael Opdenacker, Kharche, Harshavardhan R,
gregkh@linuxfoundation.org, Rao, Nikhil, Dutt, Sudeep
Cc: linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Michael Opdenacker [mailto:michael.opdenacker@free-electrons.com]
> Sent: Friday, November 08, 2013 8:14 PM
> Subject: [PATCH] misc: mic: dead code removal and minor cleanup
>
> This removes the below test in drivers/misc/mic/card/mic_virtio.c:
>
> if (!retry) {
> ...
> }
>
> This is dead code because the "retry" variable was set to 100
> earlier in the same function.
>
> This also removes dev_dbg statements to print the value of this variable.
> That's not interesting to print the value of a variable which value is
> always the same.
Hi Michael,
Thanks for your mail. However, the dead code has resulted from
another bug in the code, we should be decrementing retry instead
of i. The same bug occurs in several other places in the code too.
So I would say don't apply this patch. We are planning a series of
patches to fix other issues in the code when the 3.13 merge window
closes and will include this fix too and include you in "Reported-by".
Thanks,
Ashutosh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] misc: mic: dead code removal and minor cleanup
2013-11-09 5:06 ` Dixit, Ashutosh
@ 2013-11-09 5:35 ` Michael Opdenacker
0 siblings, 0 replies; 3+ messages in thread
From: Michael Opdenacker @ 2013-11-09 5:35 UTC (permalink / raw)
To: Dixit, Ashutosh, Kharche, Harshavardhan R,
gregkh@linuxfoundation.org, Rao, Nikhil, Dutt, Sudeep
Cc: linux-kernel@vger.kernel.org
Hi Ashutosh,
Thanks for your review!
On 11/09/2013 06:06 AM, Dixit, Ashutosh wrote:
> Hi Michael
>
> Thanks for your mail. However, the dead code has resulted from
> another bug in the code, we should be decrementing retry instead
> of i. The same bug occurs in several other places in the code too.
>
> So I would say don't apply this patch. We are planning a series of
> patches to fix other issues in the code when the 3.13 merge window
> closes and will include this fix too and include you in "Reported-by".
That's fine for me. Good to know that this issue is being taken care of.
Thanks for yor work!
Michael.
--
Michael Opdenacker, CEO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
+33 484 258 098
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-09 5:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-09 4:13 [PATCH] misc: mic: dead code removal and minor cleanup Michael Opdenacker
2013-11-09 5:06 ` Dixit, Ashutosh
2013-11-09 5:35 ` Michael Opdenacker
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.