From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v2] input: gpio-beeper: Simplify GPIO handling
Date: Mon, 28 Apr 2014 19:21:04 -0700 [thread overview]
Message-ID: <20140429022104.GA7672@core.coreip.homeip.net> (raw)
In-Reply-To: <1398491214-14936-1-git-send-email-shc_work@mail.ru>
Hi Alexander,
On Sat, Apr 26, 2014 at 09:46:54AM +0400, Alexander Shiyan wrote:
> + beep->desc = devm_gpiod_get(&pdev->dev, NULL);
> + if (!beep->desc)
> + return -EINVAL;
As far as I can see devm_gpiod_get() never returns NULL, but either a
valid pointer or ERR_PTR-encoded error. Why do we check for NULL?
I can drop the check myself, no need to resubmit.
>
> -static struct of_device_id gpio_beeper_of_match[] = {
> +static struct of_device_id __maybe_unused gpio_beeper_of_match[] = {
> { .compatible = BEEPER_MODNAME, },
> { }
> };
Instead of marking it as __maybe_unused we should wrap it in
#ifdef CONFIG_OF. I'll do it as well.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2014-04-29 2:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 5:46 [PATCH v2] input: gpio-beeper: Simplify GPIO handling Alexander Shiyan
2014-04-29 2:21 ` Dmitry Torokhov [this message]
2014-04-29 2:55 ` Alexander Shiyan
2014-04-29 3:22 ` Dmitry Torokhov
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=20140429022104.GA7672@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=shc_work@mail.ru \
/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).