linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Julia Lawall <julia@diku.dk>
Cc: Joel Becker <Joel.Becker@oracle.com>,
	Mark Fasheh <mfasheh@suse.com>,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Sunil Mushran <sunil.mushran@oracle.com>
Subject: Re: [PATCH 1/2] fs/ocfs2/dlm: Eliminate update of list_for_each_entry loop cursor
Date: Thu, 12 Aug 2010 09:14:31 +0200	[thread overview]
Message-ID: <20100812071431.GF645@bicker> (raw)
In-Reply-To: <Pine.LNX.4.64.1008120735200.16027@ask.diku.dk>

On Thu, Aug 12, 2010 at 07:46:13AM +0200, Julia Lawall wrote:
> 
> This seems a bit ugly to me, since it exposes the implementation of the 
> list abstraction.  What about the following:
> 
> lock = NULL;
> list_for_each_entry(x, tmpq, list) {
> 	if (x->ml.cookie == ml->cookie) {
> 	   	lock = x;
> 		break;
> 	}
> }
> 

I agree with you that it's ugly as pants.  Maybe someone could write an
at_list_start() macro?

regards,
dan carpenter

  reply	other threads:[~2010-08-12  7:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-07  9:09 [PATCH 1/2] fs/ocfs2/dlm: Eliminate update of list_for_each_entry loop cursor Julia Lawall
2010-08-12  0:03 ` Joel Becker
2010-08-12  5:46   ` Julia Lawall
2010-08-12  7:14     ` Dan Carpenter [this message]
2010-08-12  9:31     ` Joel Becker
2011-11-02  7:39   ` Dan Carpenter
2011-11-02 17:05     ` Sunil Mushran
2011-11-17  8:43       ` [Ocfs2-devel] " Joel Becker

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=20100812071431.GF645@bicker \
    --to=error27@gmail.com \
    --cc=Joel.Becker@oracle.com \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=sunil.mushran@oracle.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).