From: dwmw2@infradead.org (David Woodhouse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: atmel_nand: fix the warning when CONFIG_OF is not defined
Date: Fri, 30 Aug 2013 21:23:53 +0100 [thread overview]
Message-ID: <1377894233.22372.86.camel@shinybook.infradead.org> (raw)
In-Reply-To: <1375846569-9499-1-git-send-email-josh.wu@atmel.com>
On Wed, 2013-08-07 at 11:36 +0800, Josh Wu wrote:
> This patch fix following warning:
>
> drivers/mtd/nand/atmel_nand.c:2007: warning: 'atmel_nand_nfc_match' defined but not used
>
> This patch add '#if defined(CONFIG_OF)' block to guard around the definition of
> atmel_nand_nfc_match, in order to avoid the warning when kernel is configurated
> as non-dt supported.
Ick. This driver is littered with CONFIG_OF checks. Yet I've just seen a
patch to pxa3xx_nand which *removes* ifdefs, on the basis that all the
of_match_ functions/macros will just 'do the right thing'. Can't we do
that here too? We might just need to add __maybe_unused?
> +#if defined(CONFIG_OF)
> static struct of_device_id atmel_nand_nfc_match[] = {
> { .compatible = "atmel,sama5d3-nfc" },
> { /* sentinel */ }
> };
> +#endif
Also, why doesn't this one appear in a MODULE_DEVICE_TABLE() ?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130830/c9bddb5e/attachment.bin>
next prev parent reply other threads:[~2013-08-30 20:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 3:36 [PATCH] mtd: atmel_nand: fix the warning when CONFIG_OF is not defined Josh Wu
2013-08-07 6:30 ` Artem Bityutskiy
2013-08-30 20:23 ` David Woodhouse [this message]
2013-08-31 17:04 ` Ezequiel Garcia
2013-09-02 7:02 ` Josh Wu
2013-09-02 17:13 ` Ezequiel Garcia
2013-09-03 3:57 ` Josh Wu
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=1377894233.22372.86.camel@shinybook.infradead.org \
--to=dwmw2@infradead.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).