All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Jian Peng <jipeng@broadcom.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: fix warning in fs/ubifs compiled with gcc-4.5
Date: Mon, 14 Mar 2011 10:29:00 +0200	[thread overview]
Message-ID: <1300091340.2727.1.camel@localhost> (raw)
In-Reply-To: <E18F441196CA634DB8E1F1C56A50A87432421E2F50@IRVEXCHCCR01.corp.ad.broadcom.com>

Hi

On Fri, 2011-03-11 at 16:35 -0800, Jian Peng wrote:
> -#define ubifs_debugging_init(c)                0
> -#define ubifs_debugging_exit(c)                ({})
> +#define	ARG1(a)			a
> +#define	ARG2(a1, a2)		a1, a2
> +#define	ARG3(a1, a2, a3)	a1, a2, a3
> +#define	ARG4(a1, a2, a3, a4)	a1, a2, a3, a4
> +
> +#define void_F(name, x)		\
> +static inline void name(x)	\
> +{				\
> +	return;			\
> +}
> +
> +#define int_F(name, x)		\
> +static inline int name(x)	\
> +{				\
> +	return 0;		\
> +}
> +
> +int_F(ubifs_debugging_init, ARG1(struct ubifs_info *c))
> +void_F(ubifs_debugging_exit, ARG1(struct ubifs_info *c))
> +
> +/* Dump functions */
> +void_F(dbg_dump_inode, ARG2(const struct ubifs_info *c,
> +				const struct inode *inode))

Thanks, but this is a too complex solution, I think. It turns easy to
read code into some cryptic and difficult to read code, IMO May be we
can invent something simpler?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

      reply	other threads:[~2011-03-14  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12  0:35 fix warning in fs/ubifs compiled with gcc-4.5 Jian Peng
2011-03-14  8:29 ` Artem Bityutskiy [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=1300091340.2727.1.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=jipeng@broadcom.com \
    --cc=linux-mtd@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 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.