lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] hlist: drop the node parameter from iterators
On 03/04/2013 05:41 AM, Paul Bolle wrote:
> 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.

uh... what.

I'm not sure what happened there, I'll send a patch to fix it though.

Thanks for the catch!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-03-04 16:01    [W:0.087 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site