* [PATCH] firewire: ohci: Remove unused function
@ 2015-01-02 21:02 Rickard Strandqvist
2015-01-22 10:16 ` Stefan Richter
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2015-01-02 21:02 UTC (permalink / raw)
To: Stefan Richter, linux1394-devel; +Cc: Rickard Strandqvist, linux-kernel
Remove the function ar_prev_buffer_index() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/firewire/ohci.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index a66a321..9662daa 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -719,11 +719,6 @@ static inline unsigned int ar_next_buffer_index(unsigned int index)
return (index + 1) % AR_BUFFERS;
}
-static inline unsigned int ar_prev_buffer_index(unsigned int index)
-{
- return (index - 1 + AR_BUFFERS) % AR_BUFFERS;
-}
-
static inline unsigned int ar_first_buffer_index(struct ar_context *ctx)
{
return ar_next_buffer_index(ctx->last_buffer_index);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] firewire: ohci: Remove unused function
2015-01-02 21:02 [PATCH] firewire: ohci: Remove unused function Rickard Strandqvist
@ 2015-01-22 10:16 ` Stefan Richter
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Richter @ 2015-01-22 10:16 UTC (permalink / raw)
To: Rickard Strandqvist; +Cc: linux1394-devel, linux-kernel
On Jan 02 Rickard Strandqvist wrote:
> Remove the function ar_prev_buffer_index() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Committed to linux1394.git, thanks. (The function was used in an earlier
version of patch "firewire: ohci: AR rewrite" which later became commit
7a39d8b82165. In a revision of the patch, the use but not the definition
of this function was removed.)
> ---
> drivers/firewire/ohci.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
> index a66a321..9662daa 100644
> --- a/drivers/firewire/ohci.c
> +++ b/drivers/firewire/ohci.c
> @@ -719,11 +719,6 @@ static inline unsigned int ar_next_buffer_index(unsigned int index)
> return (index + 1) % AR_BUFFERS;
> }
>
> -static inline unsigned int ar_prev_buffer_index(unsigned int index)
> -{
> - return (index - 1 + AR_BUFFERS) % AR_BUFFERS;
> -}
> -
> static inline unsigned int ar_first_buffer_index(struct ar_context *ctx)
> {
> return ar_next_buffer_index(ctx->last_buffer_index);
--
Stefan Richter
-=====-===== ---= =-==-
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-22 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-02 21:02 [PATCH] firewire: ohci: Remove unused function Rickard Strandqvist
2015-01-22 10:16 ` Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox