Linux-i2c Archive on lore.kernel.org
 help / color / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Eddie James <eajames@linux.ibm.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	andy.shevchenko@gmail.com, joel@jms.id.au
Subject: Re: [PATCH v2 2/2] i2c: fsi: Prevent adding adapters for ports without dts nodes
Date: Sat, 4 Jul 2020 08:39:18 +0200
Message-ID: <20200704063918.GH1041@kunai> (raw)
In-Reply-To: <20200609201555.11401-3-eajames@linux.ibm.com>


[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

On Tue, Jun 09, 2020 at 03:15:55PM -0500, Eddie James wrote:
> Ports should be defined in the devicetree if they are to be enabled on
> the system.

The patch description does not really fit anymore, does it? There is no
change in behaviour, we just remove a redundant check.

> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> Changes since v1:
>  - Remove the check for null device node since that is checked in
>    of_device_is_available
> 
>  drivers/i2c/busses/i2c-fsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
> index 977d6f524649..10332693edf0 100644
> --- a/drivers/i2c/busses/i2c-fsi.c
> +++ b/drivers/i2c/busses/i2c-fsi.c
> @@ -703,7 +703,7 @@ static int fsi_i2c_probe(struct device *dev)
>  
>  	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))
> +		if (!of_device_is_available(np))
>  			continue;
>  
>  		port = kzalloc(sizeof(*port), GFP_KERNEL);
> -- 
> 2.24.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 20:15 [PATCH v2 0/2] i2c: fsi: Fixes for systems with more ports Eddie James
2020-06-09 20:15 ` [PATCH v2 1/2] i2c: fsi: Fix the port number field in status register Eddie James
2020-06-25 22:26   ` Wolfram Sang
2020-06-09 20:15 ` [PATCH v2 2/2] i2c: fsi: Prevent adding adapters for ports without dts nodes Eddie James
2020-07-04  6:39   ` Wolfram Sang [this message]
2020-07-06 13:53     ` Eddie James
2020-07-06 14:01       ` Wolfram Sang
2020-07-24 19:32   ` Wolfram Sang
2020-06-09 22:00 ` [PATCH v2 0/2] i2c: fsi: Fixes for systems with more ports Andy Shevchenko

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=20200704063918.GH1041@kunai \
    --to=wsa@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=eajames@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=linux-i2c@vger.kernel.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

Linux-i2c Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-i2c/0 linux-i2c/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-i2c linux-i2c/ https://lore.kernel.org/linux-i2c \
		linux-i2c@vger.kernel.org
	public-inbox-index linux-i2c

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-i2c


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git