From: Andrew Morton <akpm@linux-foundation.org>
To: Jean Delvare <khali@linux-fr.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] check_signature depends on CONFIG_CHECK_SIGNATURE
Date: Fri, 20 May 2011 15:11:13 -0700 [thread overview]
Message-ID: <20110520151113.645dbbe7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110520161448.375eb634@endymion.delvare>
On Fri, 20 May 2011 16:14:48 +0200
Jean Delvare <khali@linux-fr.org> wrote:
> check_signature() is only available if CONFIG_CHECK_SIGNATURE has been
> selected. Don't declare the function if it won't be available at link
> time. That way, any failure to select CONFIG_CHECK_SIGNATURE as needed
> will show up immediately at build time.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
> include/linux/io.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- linux-2.6.40-rc0.orig/include/linux/io.h 2011-05-20 10:41:02.000000000 +0200
> +++ linux-2.6.40-rc0/include/linux/io.h 2011-05-20 16:00:31.000000000 +0200
> @@ -63,8 +63,11 @@ void __iomem *devm_ioremap(struct device
> void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
> unsigned long size);
> void devm_iounmap(struct device *dev, void __iomem *addr);
> +void devm_ioremap_release(struct device *dev, void *res);
> +
> +#ifdef CONFIG_CHECK_SIGNATURE
> int check_signature(const volatile void __iomem *io_addr,
> const unsigned char *signature, int length);
> -void devm_ioremap_release(struct device *dev, void *res);
> +#endif
We usually avoid doing this. Detecting the error at link time is
sufficient.
Yes, that will very occasionally cost a small number of people a little
additional time. But we must balance that against permanently messing
up the header files.
next prev parent reply other threads:[~2011-05-20 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 14:14 [PATCH] check_signature depends on CONFIG_CHECK_SIGNATURE Jean Delvare
2011-05-20 22:11 ` Andrew Morton [this message]
2011-05-21 6:48 ` Jean Delvare
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=20110520151113.645dbbe7.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.