From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Grundler <grundler@google.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
Date: Mon, 07 Jul 2008 16:43:37 +1000 [thread overview]
Message-ID: <1215413017.8970.101.camel@pasglop> (raw)
In-Reply-To: <da824cf30807062335q5057a816wf4071bbec3052093@mail.gmail.com>
On Sun, 2008-07-06 at 23:35 -0700, Grant Grundler wrote:
> > --- linux-work.orig/drivers/scsi/sym53c8xx_2/sym_misc.h 2008-07-07 10:42:03.000000000 +1000
> > +++ linux-work/drivers/scsi/sym53c8xx_2/sym_misc.h 2008-07-07 10:44:41.000000000 +1000
> > @@ -121,9 +121,7 @@ static __inline void sym_que_move(struct
> > }
> > }
> >
> > -#define sym_que_entry(ptr, type, member) \
> > - ((type *)((char *)(ptr)-(unsigned int)(&((type *)0)->member)))
> > -
> > +#define sym_que_entry(ptr, type, member) container_of(ptr, type, member)
>
> There are 11 uses of sym_que_entry() macro. Is that too many to
> completely remove it's use?
> (question for willy to decide I guess).
Willy wants to completely remove the queue management. While that might
be the right thing to do, I'd like the small fixup to go in to at least
remove the warnings in the meantime.
Cheers,
Ben.
next prev parent reply other threads:[~2008-07-07 6:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 0:50 [PATCH] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of Benjamin Herrenschmidt
2008-07-07 6:35 ` Grant Grundler
2008-07-07 6:43 ` Benjamin Herrenschmidt [this message]
2008-07-07 15:02 ` Grant Grundler
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=1215413017.8970.101.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=grundler@google.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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