From: Dmitry Osipenko <digetx@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Akhil R <akhilrajeev@nvidia.com>,
Christian Koenig <christian.koenig@amd.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Jon Hunter <jonathanh@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
linaro-mm-sig@lists.linaro.org,
linux-i2c <linux-i2c@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-tegra <linux-tegra@vger.kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Sumit Semwal <sumit.semwal@linaro.org>,
Thierry Reding <thierry.reding@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/2] i2c: tegra: Add SMBus block read and SMBus alert functions
Date: Thu, 9 Dec 2021 18:42:56 +0300 [thread overview]
Message-ID: <8803c595-8cb8-2511-b3eb-dcd2add6f867@gmail.com> (raw)
In-Reply-To: <CAHp75VdzrT5z13qx-mMRdrS2=GrMOv87WaEPL5eoPO5cBiqjDg@mail.gmail.com>
09.12.2021 18:33, Andy Shevchenko пишет:
> On Thu, Dec 9, 2021 at 5:30 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>> 09.12.2021 18:05, Akhil R пишет:
>>> +static int tegra_i2c_setup_smbalert(struct tegra_i2c_dev *i2c_dev)
>>> +{
>>> + struct tegra_i2c_smbalert *smbalert = &i2c_dev->smbalert;
>>> + struct gpio_desc *alert_gpiod;
>>> + struct i2c_client *ara;
>>> +
>>> + alert_gpiod = devm_gpiod_get(i2c_dev->dev, "smbalert", GPIOD_IN);
>>> + if (IS_ERR(alert_gpiod))
>>> + return PTR_ERR(alert_gpiod);
>>> +
>>> + smbalert->alert_data.irq = gpiod_to_irq(alert_gpiod);
>>> + if (smbalert->alert_data.irq <= 0)
>>> + return smbalert->alert_data.irq;
>>
>> 0 is the error condition.
>
> I'm not sure what you implied here. gpiod_to_irq() returns 0 if and
> only if it goes to the architectures where it might be possible to
> have valid vIRQ 0, but this is not the case (at least I never heard of
> a such) for GPIO controllers on such platforms. So, looking at the
> above code I may tell that the '=' part is redundant.
>
Yes, removal of the '=' should be enough here.
next prev parent reply other threads:[~2021-12-09 15:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 15:05 [PATCH 0/2] Add SMBus features to Tegra I2C Akhil R
2021-12-09 15:05 ` [PATCH 1/2] dt-bindings: i2c: tegra: Add SMBus feature properties Akhil R
2021-12-09 15:30 ` Andy Shevchenko
2021-12-15 18:37 ` Rob Herring
2021-12-09 15:05 ` [PATCH 2/2] i2c: tegra: Add SMBus block read and SMBus alert functions Akhil R
2021-12-09 15:27 ` Dmitry Osipenko
2021-12-09 15:30 ` Dmitry Osipenko
2021-12-09 15:33 ` Andy Shevchenko
2021-12-09 15:42 ` Dmitry Osipenko [this message]
2021-12-09 15:43 ` Dmitry Osipenko
2021-12-09 16:04 ` [PATCH 0/2] Add SMBus features to Tegra I2C Dmitry Osipenko
2021-12-10 8:56 ` Thierry Reding
2021-12-15 18:42 ` Rob Herring
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=8803c595-8cb8-2511-b3eb-dcd2add6f867@gmail.com \
--to=digetx@gmail.com \
--cc=akhilrajeev@nvidia.com \
--cc=andy.shevchenko@gmail.com \
--cc=christian.koenig@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=thierry.reding@gmail.com \
/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