From: Eddie James <eajames@linux.ibm.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-i2c <linux-i2c@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
wsa@kernel.org, Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH 2/2] i2c: fsi: Prevent adding adapters for ports without dts nodes
Date: Mon, 8 Jun 2020 13:12:02 -0500 [thread overview]
Message-ID: <cab1dd65-e746-d861-3aef-696294bf496b@linux.ibm.com> (raw)
In-Reply-To: <CAHp75VfRj4kA1yrhkqak9zMJuES8Udk3YuzMKHXyh+hwrB6rSQ@mail.gmail.com>
On 6/8/20 11:31 AM, Andy Shevchenko wrote:
> On Mon, Jun 8, 2020 at 7:05 PM Eddie James <eajames@linux.ibm.com> wrote:
>> Ports should be defined in the devicetree if they are to be enabled on
>> the system.
> ...
>
>> for (port_no = 0; port_no < ports; port_no++) {
>> np = fsi_i2c_find_port_of_node(dev->of_node, port_no);
>> - if (np && !of_device_is_available(np))
>> + /* Do not add port if it is not described in the device tree */
>> + if (!np)
>> + continue;
> I believe this is redundant, since below will do the same second time.
Good point, thanks, I'll update that.
>
>> + /* Do not add port if it is described as disabled */
>> + if (!of_device_is_available(np))
>> continue;
prev parent reply other threads:[~2020-06-08 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 16:05 [PATCH 0/2] i2c: fsi: Fixes for systems with more ports Eddie James
2020-06-08 16:05 ` [PATCH 1/2] i2c: fsi: Fix the port number field in status register Eddie James
2020-06-08 16:05 ` [PATCH 2/2] i2c: fsi: Prevent adding adapters for ports without dts nodes Eddie James
2020-06-08 16:31 ` Andy Shevchenko
2020-06-08 18:12 ` Eddie James [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=cab1dd65-e746-d861-3aef-696294bf496b@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=andy.shevchenko@gmail.com \
--cc=joel@jms.id.au \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@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;
as well as URLs for NNTP newsgroup(s).