From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
Stephen Rothwell <sfr@rothwell.id.au>,
linux-mips@vger.kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] mips: cm: Add __mips_cm_l2sync_phys_base prototype declaration
Date: Tue, 12 Mar 2024 00:26:18 +0200 [thread overview]
Message-ID: <Ze-FCrkZuRiHIItp@surfacebook.localdomain> (raw)
In-Reply-To: <20240215171740.14550-2-fancer.lancer@gmail.com>
Thu, Feb 15, 2024 at 08:17:26PM +0300, Serge Semin kirjoitti:
> The __mips_cm_l2sync_phys_base() and mips_cm_l2sync_phys_base() couple was
> introduced in commit 9f98f3dd0c51 ("MIPS: Add generic CM probe & access
> code") where the former method was a weak implementation of the later
> function. Such design pattern permitted to re-define the original method
> and use the weak implementation in the new function. A similar approach
> was introduced in the framework of another arch-specific programmable
> interface: mips_cm_phys_base() and __mips_cm_phys_base(). The only
> difference is that the underscored method of the later couple was declared
> in the "asm/mips-cm.h" header file, but it wasn't done for the CM L2-sync
> methods in the subject. Due to the missing the global function declaration
> the "missing prototype" warning was spotted in the framework of the commit
> 9a2036724cd6 ("mips: mark local function static if possible") and fixed
> just be re-qualifying the weak method as static. Doing that broke what was
> originally implied by having the weak implementation globally defined. Fix
> that by dropping the static qualifier and adding the
> __mips_cm_l2sync_phys_base() prototype declared in the "asm/mips-cm.h"
> header file.
...
> +/**
> + * __mips_cm_l2sync_phys_base - retrieve the physical base address of the CM
> + * L2-sync region
> + *
> + * This function returns the physical base address of the Coherence Manager
> + * L2-cache only region. It provides a default implementation which reads the
> + * CMGCRL2OnlySyncBase register where available or returns a 4K region just
> + * behind the CM GCR base address. It may be overridden by platforms which
> + * determine this address in a different way by defining a function with the
> + * same prototype except for the name mips_cm_l2sync_phys_base (without
> + * underscores).
> + */
> +extern phys_addr_t __mips_cm_l2sync_phys_base(void);
I'm wondering if you run
scripts/kernel-doc -v -none -Wall ...
against this file. I believe it will complain that you missed Return section.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-03-11 22:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 17:17 [PATCH 0/4] MIPS: Fix missing proto and passing arg warnings Serge Semin
2024-02-15 17:17 ` [PATCH 1/4] mips: cm: Add __mips_cm_l2sync_phys_base prototype declaration Serge Semin
2024-03-11 22:26 ` Andy Shevchenko [this message]
2024-02-15 17:17 ` [PATCH 2/4] mips: cm: Add CM GCR and L2-sync base address getters declarations Serge Semin
2024-02-20 17:24 ` Thomas Bogendoerfer
2024-02-21 18:39 ` Serge Semin
2024-02-23 9:06 ` Thomas Bogendoerfer
2024-02-23 10:38 ` Serge Semin
2024-02-15 17:17 ` [PATCH 3/4] mips: zboot: Fix "no previous prototype" build warning Serge Semin
2024-02-23 9:18 ` Thomas Bogendoerfer
2024-02-15 17:17 ` [PATCH 4/4] tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning Serge Semin
2024-02-16 5:51 ` Jiri Slaby
2024-02-16 14:12 ` Serge Semin
2024-02-23 9:18 ` Thomas Bogendoerfer
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=Ze-FCrkZuRiHIItp@surfacebook.localdomain \
--to=andy.shevchenko@gmail.com \
--cc=Alexey.Malahov@baikalelectronics.ru \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=fancer.lancer@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiaxun.yang@flygoat.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sfr@rothwell.id.au \
--cc=tsbogend@alpha.franken.de \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).