From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [v2] s3mci: mark debug_regs[] as static
Date: Thu, 4 Jan 2018 12:45:13 +0100 [thread overview]
Message-ID: <CAPDyKFrDx3++vX_5--kVZcM2RN07cf5MDZnO3NzmgzOtErqW6Q@mail.gmail.com> (raw)
In-Reply-To: <20180103224939.4104207-1-arnd@arndb.de>
On 3 January 2018 at 23:49, Arnd Bergmann <arnd@arndb.de> wrote:
> The global array clashes with a newly added symbol of the same name:
>
> drivers/staging/ccree/cc_debugfs.o:(.data+0x0): multiple definition of `debug_regs'
> drivers/mmc/host/s3cmci.o:(.data+0x70): first defined here
>
> We should fix both, this one addresses the s3cmci driver by removing
> the symbol from the global namespace. While at it, this separates
> the declaration from the type definition and makes the variable const.
>
> Fixes: 9bdd203b4dc8 ("s3cmci: add debugfs support for examining driver and hardware state")
> Fixes: b3ec9a6736f2 ("staging: ccree: staging: ccree: replace sysfs by debugfs interface")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied for fixes!
Kind regards
Uffe
> ---
> drivers/mmc/host/s3cmci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
> index 36daee1e6588..f77493604312 100644
> --- a/drivers/mmc/host/s3cmci.c
> +++ b/drivers/mmc/host/s3cmci.c
> @@ -1424,7 +1424,9 @@ static const struct file_operations s3cmci_fops_state = {
> struct s3cmci_reg {
> unsigned short addr;
> unsigned char *name;
> -} debug_regs[] = {
> +};
> +
> +static const struct s3cmci_reg debug_regs[] = {
> DBG_REG(CON),
> DBG_REG(PRE),
> DBG_REG(CMDARG),
> @@ -1446,7 +1448,7 @@ struct s3cmci_reg {
> static int s3cmci_regs_show(struct seq_file *seq, void *v)
> {
> struct s3cmci_host *host = seq->private;
> - struct s3cmci_reg *rptr = debug_regs;
> + const struct s3cmci_reg *rptr = debug_regs;
>
> for (; rptr->name; rptr++)
> seq_printf(seq, "SDI%s\t=0x%08x\n", rptr->name,
> --
> 2.9.0
>
prev parent reply other threads:[~2018-01-04 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 22:49 [PATCH] [v2] s3mci: mark debug_regs[] as static Arnd Bergmann
2018-01-04 11:45 ` Ulf Hansson [this message]
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=CAPDyKFrDx3++vX_5--kVZcM2RN07cf5MDZnO3NzmgzOtErqW6Q@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).