From: Ferenc Wagner <wferi@niif.hu>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Replace the dangerous to_root_device macro with an inline function
Date: Fri, 07 Jan 2011 15:21:24 +0100 [thread overview]
Message-ID: <87r5co23rv.fsf@tac.ki.iif.hu> (raw)
In-Reply-To: <20110106205259.GA28326@suse.de> (Greg KH's message of "Thu, 6 Jan 2011 12:52:59 -0800")
Greg KH <gregkh@suse.de> writes:
> On Thu, Jan 06, 2011 at 09:47:08PM +0100, Ferenc Wagner wrote:
>
>> Greg KH <gregkh@suse.de> writes:
>>
>>> On Thu, Jan 06, 2011 at 04:24:24PM +0100, Ferenc Wagner wrote:
>>>
>>>> The original macro worked only when applied to variables named 'dev'.
>>>> While this could have been fixed by simply renaming the macro argument,
>>>> a more type-safe replacement is preferred.
>>>
>>> Preferred for what? This is a local macro, not exported to anything
>>> else, is it causing problems today within this single file?
>>
>> No, it isn't a problem currently, because this macro is applied to
>> variables named 'dev' exclusively. But the macro definition is wrong,
>> as it uses 'dev' (the macro argument) in two places, of which the second
>> probably isn't intentional, as the third argument of the container_of
>> macro is a structure member name, which should stay fixed to the literal
>> string 'dev' in this case, not replaced by the actual macro argument.
>
> No, it was intentional :)
Then we should fix it's misleading name. :)
> I'll take this as a general "clean up" patch
Great, that's exactly what it is.
> if you resend it with the 2/2 removed.
On its way...
> But note that it will not get added to my trees until after the
> .38-rc1 merge happens.
No problem, it's been sitting in my tree for almost a year now. :)
--
Thanks,
Feri.
prev parent reply other threads:[~2011-01-07 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 15:24 Ferenc Wagner
2011-01-06 15:28 ` Ferenc Wagner
2011-01-06 16:20 ` Greg KH
2011-01-06 20:47 ` Ferenc Wagner
2011-01-06 20:52 ` Greg KH
2011-01-07 14:17 ` [PATCH] " Ferenc Wagner
2011-01-07 14:21 ` Ferenc Wagner [this message]
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=87r5co23rv.fsf@tac.ki.iif.hu \
--to=wferi@niif.hu \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®