linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Rich Felker <dalias@libc.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Arnd Bergmann <arnd@arndb.de>,
	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 08/20] sh: boot: Add proper forward declarations
Date: Tue, 05 Mar 2024 15:56:26 +0900	[thread overview]
Message-ID: <87bk7tjhet.wl-ysato@users.sourceforge.jp> (raw)
In-Reply-To: <2614d991c816ece903ef47c715bcc53881d34f3f.1709326528.git.geert+renesas@glider.be>

On Sat, 02 Mar 2024 06:02:22 +0900,
Geert Uytterhoeven wrote:
> 
> arch/sh/boot/compressed/cache.c:2:5: warning: no previous prototype for ‘cache_control’ [-Wmissing-prototypes]
> arch/sh/boot/compressed/misc.c:115:6: warning: no previous prototype for ‘ftrace_stub’ [-Wmissing-prototypes]
> arch/sh/boot/compressed/misc.c:118:6: warning: no previous prototype for ‘arch_ftrace_ops_list_func’ [-Wmissing-prototypes]
> arch/sh/boot/compressed/misc.c:128:6: warning: no previous prototype for ‘decompress_kernel’ [-Wmissing-prototypes]
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/sh/boot/compressed/cache.c |  3 +++
>  arch/sh/boot/compressed/cache.h | 10 ++++++++++
>  arch/sh/boot/compressed/misc.c  |  8 +++-----
>  arch/sh/boot/compressed/misc.h  |  9 +++++++++
>  4 files changed, 25 insertions(+), 5 deletions(-)
>  create mode 100644 arch/sh/boot/compressed/cache.h
>  create mode 100644 arch/sh/boot/compressed/misc.h
> 
> diff --git a/arch/sh/boot/compressed/cache.c b/arch/sh/boot/compressed/cache.c
> index 31e04ff4841ed084..95c1e73ccbb7e011 100644
> --- a/arch/sh/boot/compressed/cache.c
> +++ b/arch/sh/boot/compressed/cache.c
> @@ -1,4 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0
> +
> +#include "cache.h"
> +
>  int cache_control(unsigned int command)
>  {
>  	volatile unsigned int *p = (volatile unsigned int *) 0x80000000;
> diff --git a/arch/sh/boot/compressed/cache.h b/arch/sh/boot/compressed/cache.h
> new file mode 100644
> index 0000000000000000..b622b68c87f59b97
> --- /dev/null
> +++ b/arch/sh/boot/compressed/cache.h
> @@ -0,0 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef CACHE_H
> +#define CACHE_H
> +
> +#define CACHE_ENABLE	0
> +#define CACHE_DISABLE	1
> +
> +int cache_control(unsigned int command);
> +
> +#endif /* CACHE_H */
> diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
> index ca05c99a3d5b488d..5178150ca6650dcf 100644
> --- a/arch/sh/boot/compressed/misc.c
> +++ b/arch/sh/boot/compressed/misc.c
> @@ -16,6 +16,9 @@
>  #include <asm/addrspace.h>
>  #include <asm/page.h>
>  
> +#include "cache.h"
> +#include "misc.h"
> +
>  /*
>   * gzip declarations
>   */
> @@ -26,11 +29,6 @@
>  #undef memcpy
>  #define memzero(s, n)     memset ((s), 0, (n))
>  
> -/* cache.c */
> -#define CACHE_ENABLE      0
> -#define CACHE_DISABLE     1
> -int cache_control(unsigned int command);
> -
>  extern char input_data[];
>  extern int input_len;
>  static unsigned char *output;
> diff --git a/arch/sh/boot/compressed/misc.h b/arch/sh/boot/compressed/misc.h
> new file mode 100644
> index 0000000000000000..2b4534faa3052857
> --- /dev/null
> +++ b/arch/sh/boot/compressed/misc.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef MISC_H
> +#define MISC_H
> +
> +void arch_ftrace_ops_list_func(void);
> +void decompress_kernel(void);
> +void ftrace_stub(void);
> +
> +#endif /* MISC_H */
> -- 
> 2.34.1
> 
> 

This cache control is from SH5, so it is no longer needed.
I think it's better to simply delete chace.c and cache_control.

-- 
Yosinori Sato

  reply	other threads:[~2024-03-05  7:05 UTC|newest]

Thread overview: 31+ 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 [this message]
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
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-04-24 12:05 ` [PATCH 00/20] sh: Fix missing prototypes Geert Uytterhoeven
2024-05-01  9:14 ` 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=87bk7tjhet.wl-ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --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=glaubitz@physik.fu-berlin.de \
    --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 \
    /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).