From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Herbert Xu <herbert@gondor•apana.org.au>
Cc: Martin Schwidefsky <schwidefsky@de•ibm.com>,
linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: linux-next: build warning after merge of the crypto tree
Date: Thu, 25 Aug 2016 21:14:11 +1000 [thread overview]
Message-ID: <20160825211411.08858397@canb.auug.org.au> (raw)
In-Reply-To: <20160825074701.GA11175@gondor.apana.org.au>
Hi Herbert,
On Thu, 25 Aug 2016 15:47:01 +0800 Herbert Xu <herbert@gondor•apana.org.au> wrote:
>
> I'm going to do something like this:
>
> ---8<---
> This patch fixes an unused label warning triggered when the macro
> XOR_SELECT_TEMPLATE is not set.
>
> Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...")
> Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
> Signed-off-by: Herbert Xu <herbert@gondor•apana.org.au>
>
> diff --git a/crypto/xor.c b/crypto/xor.c
> index b8975d9..69866e9 100644
> --- a/crypto/xor.c
> +++ b/crypto/xor.c
> @@ -113,13 +113,14 @@ calibrate_xor_blocks(void)
>
> #ifdef XOR_SELECT_TEMPLATE
> fastest = XOR_SELECT_TEMPLATE(fastest);
> +#endif
> +
> if (fastest) {
> printk(KERN_INFO "xor: automatically using best "
> "checksumming function %-10s\n",
> fastest->name);
> goto out;
> }
> -#endif
That looks fine to me. An alternative might be to have:
#ifndef XOR_SELECT_TEMPLATE
#define XOR_SELECT_TEMPLATE(x) (x)
#endif
near the top of the file. That gets the #ifdef out of the code flow
and serves as some hint that such a thing can be defined by arch header
files.
Either way.
--
Cheers,
Stephen Rothwell
next prev parent reply other threads:[~2016-08-25 11:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 1:38 linux-next: build warning after merge of the crypto tree Stephen Rothwell
2016-08-25 6:20 ` Martin Schwidefsky
2016-08-25 7:47 ` Herbert Xu
2016-08-25 11:14 ` Stephen Rothwell [this message]
2016-08-26 15:19 ` crypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2017-07-31 2:17 linux-next: build warning after merge of the crypto tree Stephen Rothwell
2017-07-31 13:50 ` Gary R Hook
2018-01-19 1:49 Stephen Rothwell
2018-01-19 4:21 ` Harsh Jain
2018-01-19 5:12 ` Herbert Xu
2018-03-19 1:04 Stephen Rothwell
2018-03-19 5:44 ` Harsh Jain
2018-10-05 5:31 Stephen Rothwell
2019-02-04 0:01 Stephen Rothwell
2019-08-23 3:14 Stephen Rothwell
2019-08-25 18:01 ` Hans de Goede
2022-07-11 10:49 Stephen Rothwell
2022-11-21 1:52 Stephen Rothwell
2024-02-12 3:48 Stephen Rothwell
2024-02-12 12:59 ` Cabiddu, Giovanni
2024-10-08 6:29 Stephen Rothwell
2025-06-16 5:31 Stephen Rothwell
2025-10-20 2:53 Stephen Rothwell
2025-10-20 3:34 ` Bagas Sanjaya
2025-10-20 3:07 Stephen Rothwell
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=20160825211411.08858397@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=schwidefsky@de$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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