Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7047665ybi; Thu, 13 Jun 2019 08:41:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwum1B7UIWCPNvsKuoA2aPMdNroxEUz9hTNU4/TDxU7Smxu4fy8XDTFj63TM0yPJgVavoBn X-Received: by 2002:a62:5e06:: with SMTP id s6mr96609665pfb.193.1560440496037; Thu, 13 Jun 2019 08:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560440496; cv=none; d=google.com; s=arc-20160816; b=vIYLH77ZB2u1R+gmDsaDY3LvoHi/wHHWd2wFpKjqnyiR9Ga4/wSpAkHeXuUa9Ziko+ HYApmGdpFoTVKkSEjcljsixLXhqwo3u+7zWERMCmuOr+uYHc+d/EkGje+Cq9EZEJBmv+ kmB3ETQzRKNEK0rcu7VOJnzTOwImHJRNyi+3TZrJ91xUrnANBoc41yUWz80NIW7gB8ZT h4L3pi3bMPua+k//0XHp0laJBZnZrqZxhbSYpVGcthQDMeV6s9sm7p32x+KsX/lZvLVC lJOr4FjjwR02QJL9pxC5haOM2PsI9HNcuUcrUtUP3jgLGquV96kuFHhdO+nN83+Wz/kT T/Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organisation:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5NGu+qj7x8Uu+aIzTtMvLKpCl0J14PJ4DtSsMWsodcc=; b=kpsPhipuupgSEmJZJiijakTUqvq61/Tl2t6LtpLKPy94wCE7FAm4B7Kp2/SG+q8m4c o/FEyO/kyi6Z7UmP5hpz7eh4zJzWVCcKyhcDyQFDogg2IcJyIFuTK8pguLenqWZLpcLw iUJ1+y1zL6gCmv9xGfyfIINjejx1ilNGjm3Op7/KyNFEuiuP7KHjggR5PjJ9jmTpJUWs nRxn6yVvI3aldWaVSamzm7agqVZtHdBCU97LitWnO5O0qFxQJ3H+2AxmH3YpoO7PCMk9 1Jv3aCh/QaZLOoCR8CUZmA2MU7uBF3UiUV7U1Jq7o8u8/TSuJmIDnkeHqb8KgODy6cYf aQ1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si3673558pfr.6.2019.06.13.08.41.21; Thu, 13 Jun 2019 08:41:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731928AbfFMPjW (ORCPT + 99 others); Thu, 13 Jun 2019 11:39:22 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:40986 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731922AbfFMJy5 (ORCPT ); Thu, 13 Jun 2019 05:54:57 -0400 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id DE70225BE4A; Thu, 13 Jun 2019 19:54:54 +1000 (AEST) Received: by reginn.horms.nl (Postfix, from userid 7100) id E2695940483; Thu, 13 Jun 2019 11:54:52 +0200 (CEST) Date: Thu, 13 Jun 2019 11:54:52 +0200 From: Simon Horman To: Guenter Roeck Cc: Wolfram Sang , linux-i2c@vger.kernel.org, Heikki Krogerus , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 34/34] usb: typec: tcpm: fusb302: simplify getting the adapter of a client Message-ID: <20190613095452.qim3khiqcz2iwkbr@verge.net.au> References: <20190608105619.593-1-wsa+renesas@sang-engineering.com> <20190608105619.593-35-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 08, 2019 at 05:59:17AM -0700, Guenter Roeck wrote: > On 6/8/19 3:56 AM, Wolfram Sang wrote: > > We have a dedicated pointer for that, so use it. Much easier to read and > > less computation involved. > > > > Signed-off-by: Wolfram Sang > > Reviewed-by: Guenter Roeck Reviewed-by: Simon Horman > > > --- > > > > Please apply to your subsystem tree. > > > > drivers/usb/typec/tcpm/fusb302.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c > > index 7302f7501ec9..c524088246ee 100644 > > --- a/drivers/usb/typec/tcpm/fusb302.c > > +++ b/drivers/usb/typec/tcpm/fusb302.c > > @@ -1697,13 +1697,12 @@ static int fusb302_probe(struct i2c_client *client, > > const struct i2c_device_id *id) > > { > > struct fusb302_chip *chip; > > - struct i2c_adapter *adapter; > > + struct i2c_adapter *adapter = client->adapter; > > struct device *dev = &client->dev; > > const char *name; > > int ret = 0; > > u32 v; > > - adapter = to_i2c_adapter(client->dev.parent); > > if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) { > > dev_err(&client->dev, > > "I2C/SMBus block functionality not supported!\n"); > > >