qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: zwu.kernel@gmail.com, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition
Date: Wed, 15 Feb 2012 11:38:00 +0200	[thread overview]
Message-ID: <20120215093800.GB30825@redhat.com> (raw)
In-Reply-To: <4F3B6D1F.9010607@web.de>

On Wed, Feb 15, 2012 at 09:30:23AM +0100, Jan Kiszka wrote:
> On 2012-02-15 09:12, zwu.kernel@gmail.com wrote:
> > From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> > 
> > Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> > ---
> >  slirp/if.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> > 
> > diff --git a/slirp/if.c b/slirp/if.c
> > index 2852396..8e0cac2 100644
> > --- a/slirp/if.c
> > +++ b/slirp/if.c
> > @@ -8,8 +8,6 @@
> >  #include <slirp.h>
> >  #include "qemu-timer.h"
> >  
> > -#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))
> > -
> >  static void
> >  ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead)
> >  {
> 
> Let's grab the chance and move ifs_init to mbuf.h.
> 
> Jan
> 

Since you mention it - why does slirp have all these
defines in the first place?

slirp/mbuf.h:#define m_nextpkt  m_hdr.mh_nextpkt
slirp/mbuf.h:#define ifs_next m_nextpkt

Seriously, #define for a field name?
This is just crazy, and violates our coding style
which requires macros to be PPER_CAS_WITH_UNDERSCORES

-- 
MST

  reply	other threads:[~2012-02-15  9:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15  8:12 [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition zwu.kernel
2012-02-15  8:30 ` Jan Kiszka
2012-02-15  9:38   ` Michael S. Tsirkin [this message]
2012-02-15  9:48     ` Jan Kiszka
2012-02-15 23:02     ` Andreas Färber
2012-02-15 23:21       ` Peter Maydell
2012-02-17 13:43   ` Jan Kiszka

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=20120215093800.GB30825@redhat.com \
    --to=mst@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).