All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Wu Fengguang <fengguang.wu@intel.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Gleb Natapov <gleb@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] hlist: drop the node parameter from iterators
Date: Mon, 04 Mar 2013 11:41:25 +0100	[thread overview]
Message-ID: <1362393685.16460.16.camel@x61.thuisdomein> (raw)
In-Reply-To: <1359597622-31532-1-git-send-email-sasha.levin@oracle.com>

On Wed, 2013-01-30 at 21:00 -0500, Sasha Levin wrote:
> I'm not sure why, but the hlist for each entry iterators were conceived
> differently from the list ones. While the list ones are nice and elegant:
> 
>         list_for_each_entry(pos, head, member)
> 
> The hlist ones were greedy and wanted an extra parameter:
> 
>         hlist_for_each_entry(tpos, pos, head, member)
> 
> Why did they need an extra pos parameter? I'm not quite sure. Not only
> they don't really need it, it also prevents the iterator from looking
> exactly like the list iterator, which is unfortunate.
> 
> Besides the semantic patch, there was some manual work required:
> 
>  - Fix up the actual hlist iterators in linux/list.h
>  - Fix up the declaration of other iterators based on the hlist ones.
>  - A very small amount of places were using the 'node' parameter, this
>  was modified to use 'obj->member' instead.
>  - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
>  properly, so those had to be fixed up manually.

This patch seems to have become commit
b67bfe0d42cac56c512dd5da4b1b347a23f4b70a in v3.9-rc1. It triggers this
(obviously correct) warning:
    net/9p/trans_virtio.c:350:1: warning: ‘p9_virtio_zc_request’ defined but not used [-Wunused-function]

> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
> index fd05c81..d7a3fe3 100644
> --- a/net/9p/trans_virtio.c
> +++ b/net/9p/trans_virtio.c
> @@ -655,7 +655,7 @@ static struct p9_trans_module p9_virtio_trans = {
>  	.create = p9_virtio_create,
>  	.close = p9_virtio_close,
>  	.request = p9_virtio_request,
> -	.zc_request = p9_virtio_zc_request,
> +	//.zc_request = p9_virtio_zc_request,
>  	.cancel = p9_virtio_cancel,
>  	/*
>  	 * We leave one entry for input and one entry for response

Why was that line commented out? There's no comment nor is there
anything in the commit explanation on this change.


Paul Bolle


  parent reply	other threads:[~2013-03-04 10:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  2:00 [PATCH v2] hlist: drop the node parameter from iterators Sasha Levin
2013-02-07  0:55 ` Andrew Morton
2013-02-07  1:00   ` Tejun Heo
2013-02-07  1:45     ` Li Zefan
2013-02-07  1:01   ` Sasha Levin
2013-02-07 21:34 ` Andrew Morton
2013-03-04 10:41 ` Paul Bolle [this message]
2013-03-04 14:20   ` Sasha Levin
  -- strict thread matches above, loose matches on Subject: below --
2013-01-13 16:31 Sasha Levin
2013-01-15 16:46 ` Paul E. McKenney
2013-01-16 20:48 ` Linus Torvalds
2013-01-16 21:58   ` Sasha Levin
2013-01-16 22:04     ` Linus Torvalds
2013-01-16 22:17       ` Sasha Levin

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=1362393685.16460.16.camel@x61.thuisdomein \
    --to=pebolle@tiscali.nl \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=gleb@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peter.senna@gmail.com \
    --cc=sasha.levin@oracle.com \
    --cc=torvalds@linux-foundation.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.