From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will@kernel.org>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-sh@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 12/20] sh: dma: Remove unused dmac_search_free_channel()
Date: Wed, 01 May 2024 11:09:43 +0200 [thread overview]
Message-ID: <44019debdd26c1a4c75362b7a1f2bfaf9be2c792.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <82d5efdde44f9489c5a7d11d0a19750445116c95.1709326528.git.geert+renesas@glider.be>
Hi Geert,
On Fri, 2024-03-01 at 22:02 +0100, Geert Uytterhoeven wrote:
> arch/sh/drivers/dma/dma-api.c:164:5: warning: no previous prototype for 'dmac_search_free_channel' [-Wmissing-prototypes]
>
> dmac_search_free_channel() never had a user in upstream, remove it.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> dma_extend(), get_dma_info_by_name(), register_chan_caps(), and
> request_dma_bycap() are also unused, but don't trigger warnings
> ---
I assume the other functions didn't trigger a warning because their symbols
were exported. Correct me if I'm wrong.
Adrian
> arch/sh/drivers/dma/dma-api.c | 27 ---------------------------
> 1 file changed, 27 deletions(-)
>
> diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
> index 89cd4a3b4ccafbe2..f49097fa634c36d4 100644
> --- a/arch/sh/drivers/dma/dma-api.c
> +++ b/arch/sh/drivers/dma/dma-api.c
> @@ -161,33 +161,6 @@ int request_dma_bycap(const char **dmac, const char **caps, const char *dev_id)
> }
> EXPORT_SYMBOL(request_dma_bycap);
>
> -int dmac_search_free_channel(const char *dev_id)
> -{
> - struct dma_channel *channel = { 0 };
> - struct dma_info *info = get_dma_info(0);
> - int i;
> -
> - for (i = 0; i < info->nr_channels; i++) {
> - channel = &info->channels[i];
> - if (unlikely(!channel))
> - return -ENODEV;
> -
> - if (atomic_read(&channel->busy) == 0)
> - break;
> - }
> -
> - if (info->ops->request) {
> - int result = info->ops->request(channel);
> - if (result)
> - return result;
> -
> - atomic_set(&channel->busy, 1);
> - return channel->chan;
> - }
> -
> - return -ENOSYS;
> -}
> -
> int request_dma(unsigned int chan, const char *dev_id)
> {
> struct dma_channel *channel = { 0 };
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
next prev parent reply other threads:[~2024-05-01 9:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 21:02 [PATCH 00/20] sh: Fix missing prototypes Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 01/20] sh: pgtable: " Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 02/20] sh: fpu: Add missing forward declarations Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 03/20] sh: syscall: Add missing forward declaration for sys_cacheflush() Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 04/20] sh: tlb: Add missing forward declaration for handle_tlbmiss() Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 05/20] sh: return_address: Add missing #include <asm/ftrace.h> Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 06/20] sh: traps: Add missing #include <asm/setup.h> Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 07/20] sh: hw_breakpoint: Add missing forward declaration for arch_bp_generic_fields() Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 08/20] sh: boot: Add proper forward declarations Geert Uytterhoeven
2024-03-05 6:56 ` Yoshinori Sato
2024-03-01 21:02 ` [PATCH 09/20] sh: ftrace: Fix missing prototypes Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 10/20] sh: nommu: Add missing #include <asm/cacheflush.h> Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 11/20] sh: math-emu: Add missing #include <asm/fpu.h> Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 12/20] sh: dma: Remove unused dmac_search_free_channel() Geert Uytterhoeven
2024-05-01 9:09 ` John Paul Adrian Glaubitz [this message]
2024-05-02 7:00 ` Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 13/20] sh: sh2a: Add missing #include <asm/processor.h> Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 14/20] sh: sh7786: Remove unused sh7786_usb_use_exclock() Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 15/20] sh: smp: Fix missing prototypes Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 16/20] sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe() Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 17/20] sh: kprobes: Make trampoline_probe_handler() static Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 18/20] sh: kprobes: Remove unneeded kprobe_opcode_t casts Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 19/20] sh: dwarf: Make dwarf_lookup_fde() static Geert Uytterhoeven
2024-03-01 21:02 ` [PATCH 20/20] [RFC] sh: dma: Remove unused functionality Geert Uytterhoeven
2024-05-01 9:12 ` John Paul Adrian Glaubitz
2024-05-01 13:58 ` John Paul Adrian Glaubitz
2024-05-02 7:03 ` Geert Uytterhoeven
2024-05-02 7:08 ` John Paul Adrian Glaubitz
2024-05-01 9:14 ` [PATCH 00/20] sh: Fix missing prototypes John Paul Adrian Glaubitz
2024-05-02 10:26 ` John Paul Adrian Glaubitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44019debdd26c1a4c75362b7a1f2bfaf9be2c792.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert+renesas@glider.be \
--cc=linux-sh@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=will@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).