From: Marcus Meissner <meissner@suse.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org, albrecht.dress@arcor.de
Subject: Re: [PATCH] Fixed statement without effect by using a correct empty instruction
Date: Wed, 24 Feb 2010 14:43:55 +0100 [thread overview]
Message-ID: <20100224134355.GA1024@suse.de> (raw)
In-Reply-To: <fa686aa41002240540s2044ecaaj3ce04021719a51ef@mail.gmail.com>
On Wed, Feb 24, 2010 at 06:40:37AM -0700, Grant Likely wrote:
> On Wed, Feb 24, 2010 at 1:51 AM, Marcus Meissner <meissner@suse.de> wrote:
> > This fixes this build failure:
> > cc1: warnings being treated as errors
> > /usr/src/packages/BUILD/kernel-default-2.6.33/linux-2.6.32/arch/powerpc/platforms/52xx/mpc52xx_gpt.c: In function 'mpc52xx_gpt_probe':
> > /usr/src/packages/BUILD/kernel-default-2.6.33/linux-2.6.32/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:761:3: error: statement with no effect
> >
> > Signed-off-by: Marcus Meissner <meissner@suse.de>
>
> Hi Marcus, thanks for the patch. One comment below...
>
> > ---
> > arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
> > index 6f8ebe1..88231d8 100644
> > --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
> > +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
> > @@ -711,7 +711,7 @@ static int __devinit mpc52xx_gpt_wdt_init(void)
> > return 0;
> > }
> >
> > -#define mpc52xx_gpt_wdt_setup(x, y) (0)
> > +#define mpc52xx_gpt_wdt_setup(x, y) do { } while (0)
>
> As Andrew likes to say, we should be programming in C instead of preprocessor.
>
> -#define mpc52xx_gpt_wdt_setup(x, y) (0)
> +static inline void mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv
> *gpt, const u32 *period) { }
Sounds good to me too. :)
Ciao, Marcus
prev parent reply other threads:[~2010-02-24 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 8:51 [PATCH] Fixed statement without effect by using a correct empty instruction Marcus Meissner
2010-02-24 13:40 ` Grant Likely
2010-02-24 13:43 ` Marcus Meissner [this message]
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=20100224134355.GA1024@suse.de \
--to=meissner@suse.de \
--cc=albrecht.dress@arcor.de \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.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.