From: Randy Dunlap <rdunlap@xenotime.net>
To: Jan Beulich <JBeulich@suse.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Grant Likely <grant.likely@secretlab.ca>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] allow gpiolib to be a module
Date: Wed, 12 Sep 2012 10:41:35 -0700 [thread overview]
Message-ID: <5050C94F.4060403@xenotime.net> (raw)
In-Reply-To: <50505959020000780009AC53@nat28.tlf.novell.com>
On 09/12/2012 12:43 AM, Jan Beulich wrote:
>>>> On 11.09.12 at 19:38, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Mon, Sep 10, 2012 at 2:16 PM, Jan Beulich <JBeulich@suse.com> wrote:
>>> +#ifndef MODULE
>>> subsys_initcall(gpiolib_debugfs_init);
>>> +#endif
>>>
>>> #endif /* DEBUG_FS */
>>> +
>>> +#ifdef MODULE
>>> +int __init gpiolib_init(void)
>>> +{
>>> + return gpiolib_sysfs_init() ?: gpiolib_debugfs_init();
>>
>> I can't parse this, sorry the gpio subsystem maintainer is too bad coder.
>> What about something more readable?
>>
>> int ret;
>>
>> ret = gpiolib_sysfs_init();
>> if (ret)
>> return ret;
>> return gpiolib_debugfs_init();
>>
>> I know it doesn't look as cool but it's easier for me to understand.
>
> Okay, since you're the second one to complain despite there
> being other uses of the construct in the same source file, I'll
> replace it, ...
Does C just use the value generated from the left side of a ?:
expression for the middle (empty) expression or does it call the
function again (which would usually be bad)?
--
~Randy
next prev parent reply other threads:[~2012-09-12 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 12:16 [PATCH] allow gpiolib to be a module Jan Beulich
2012-09-11 6:17 ` Ryan Mallon
2012-09-11 7:00 ` Jan Beulich
2012-09-11 17:38 ` Linus Walleij
2012-09-12 7:43 ` Jan Beulich
2012-09-12 15:53 ` Linus Walleij
2012-09-12 17:41 ` Randy Dunlap [this message]
2012-09-13 7:00 ` Jan Beulich
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=5050C94F.4060403@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=JBeulich@suse.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--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