From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: fenghua.yu@intel.com, tony.luck@intel.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ia64: agp: Replace empty define with do while
Date: Sat, 20 Apr 2019 17:07:50 +0000 [thread overview]
Message-ID: <20190420170750.GA23311@Red> (raw)
In-Reply-To: <20171220191613.7827-1-clabbe.montjoie@gmail.com>
On Wed, Dec 20, 2017 at 08:16:13PM +0100, Corentin Labbe wrote:
> It's dangerous to use empty code define.
> Furthermore it lead to the following warning:
> drivers/char/agp/generic.c: In function « agp_generic_destroy_page »:
> drivers/char/agp/generic.c:1266:28: attention : suggest braces around empty body in an « if » statement [-Wempty-body]
>
> So let's replace emptyness by "do {} while(0)"
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Hello
Gentle ping
Regards
> ---
> arch/ia64/include/asm/agp.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/ia64/include/asm/agp.h b/arch/ia64/include/asm/agp.h
> index 2b451c4496da..0261507dc264 100644
> --- a/arch/ia64/include/asm/agp.h
> +++ b/arch/ia64/include/asm/agp.h
> @@ -14,8 +14,8 @@
> * in coherent mode, which lets us map the AGP memory as normal (write-back) memory
> * (unlike x86, where it gets mapped "write-coalescing").
> */
> -#define map_page_into_agp(page) /* nothing */
> -#define unmap_page_from_agp(page) /* nothing */
> +#define map_page_into_agp(page) do { } while (0)
> +#define unmap_page_from_agp(page) do { } while (0)
> #define flush_agp_cache() mb()
>
> /* GATT allocation. Returns/accepts GATT kernel virtual address. */
> --
> 2.13.6
>
WARNING: multiple messages have this Message-ID (diff)
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: fenghua.yu@intel.com, tony.luck@intel.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ia64: agp: Replace empty define with do while
Date: Sat, 20 Apr 2019 19:07:50 +0200 [thread overview]
Message-ID: <20190420170750.GA23311@Red> (raw)
In-Reply-To: <20171220191613.7827-1-clabbe.montjoie@gmail.com>
On Wed, Dec 20, 2017 at 08:16:13PM +0100, Corentin Labbe wrote:
> It's dangerous to use empty code define.
> Furthermore it lead to the following warning:
> drivers/char/agp/generic.c: In function « agp_generic_destroy_page »:
> drivers/char/agp/generic.c:1266:28: attention : suggest braces around empty body in an « if » statement [-Wempty-body]
>
> So let's replace emptyness by "do {} while(0)"
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Hello
Gentle ping
Regards
> ---
> arch/ia64/include/asm/agp.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/ia64/include/asm/agp.h b/arch/ia64/include/asm/agp.h
> index 2b451c4496da..0261507dc264 100644
> --- a/arch/ia64/include/asm/agp.h
> +++ b/arch/ia64/include/asm/agp.h
> @@ -14,8 +14,8 @@
> * in coherent mode, which lets us map the AGP memory as normal (write-back) memory
> * (unlike x86, where it gets mapped "write-coalescing").
> */
> -#define map_page_into_agp(page) /* nothing */
> -#define unmap_page_from_agp(page) /* nothing */
> +#define map_page_into_agp(page) do { } while (0)
> +#define unmap_page_from_agp(page) do { } while (0)
> #define flush_agp_cache() mb()
>
> /* GATT allocation. Returns/accepts GATT kernel virtual address. */
> --
> 2.13.6
>
next prev parent reply other threads:[~2019-04-20 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 19:16 [PATCH] ia64: agp: Replace empty define with do while Corentin Labbe
2017-12-20 19:16 ` Corentin Labbe
2019-04-20 17:07 ` Corentin Labbe [this message]
2019-04-20 17:07 ` Corentin Labbe
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=20190420170750.GA23311@Red \
--to=clabbe.montjoie@gmail.com \
--cc=fenghua.yu@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/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.