From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: fabio.estevam@freescale.com,
"Alexandre Courbot" <gnurou@gmail.com>,
"Richard Genoud" <richard.genoud@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org,
"Janusz Uzycki" <j.uzycki@elproma.com.pl>,
linux-serial@vger.kernel.org,
"Fabio Estevam" <festevam@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines
Date: Thu, 12 Feb 2015 16:45:18 +0300 [thread overview]
Message-ID: <1423748718.221741158@f354.i.mail.ru> (raw)
In-Reply-To: <20150212132939.GE10842@pengutronix.de>
Четверг, 12 февраля 2015, 14:29 +01:00 от Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
...
> > +int mctrl_gpio_request_irqs(struct mctrl_gpios *gpios)
>
> > +{
>
> > + struct uart_port *port = gpios->port;
>
> > + int *irq = gpios->irq;
>
> > + enum mctrl_gpio_idx i;
>
> > + int err = 0;
>
> > +
>
> > + /* When gpios is NULL just gpio irqs are also never set
>
> > + * so return without any error */
>
> > + if (IS_ERR_OR_NULL(gpios))
>
> > + return err;
>
> I'd expect drivers using mctrl-gpio to error out if mctrl_gpio_init_dt
>
> fails. Also mctrl_gpio_init_dt never returns NULL, so IMHO this check
>
> can be dropped. (There are more places in mctrl-gpio that should be
>
> fixed accordingly.
At least this check should be moved to start of this function due
future usage of gpios->port and gpios->irq.
---
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2015-02-12 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 16:55 [PATCH v3 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Janusz Uzycki
2015-02-06 16:55 ` [PATCH v3 2/4] serial: mxs-auart: Use helpers for gpio irqs Janusz Uzycki
2015-02-12 13:40 ` Uwe Kleine-König
2015-02-06 16:55 ` [PATCH v3 3/4] serial: at91: " Janusz Uzycki
2015-02-06 16:55 ` [PATCH v3 4/4] serial: clps711x: Update to new mctrl_gpio_init_dt Janusz Uzycki
2015-02-12 13:29 ` [PATCH v3 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Uwe Kleine-König
2015-02-12 13:45 ` Alexander Shiyan [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=1423748718.221741158@f354.i.mail.ru \
--to=shc_work@mail.ru \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=j.uzycki@elproma.com.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=richard.genoud@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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