public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Wolfram Sang <wsa@kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] i2c: Add i2c_device_get_match_data() callback
Date: Wed, 2 Aug 2023 17:41:18 +0300	[thread overview]
Message-ID: <ZMprDsFk+cUgq2hk@smile.fi.intel.com> (raw)
In-Reply-To: <OS0PR01MB5922AA1F68BC091BB997D941860BA@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On Wed, Aug 02, 2023 at 07:59:21AM +0000, Biju Das wrote:
> > On Tue, Aug 01, 2023 at 06:03:18PM +0100, Biju Das wrote:

...

> > > -	struct i2c_driver *driver = to_i2c_driver(client->dev.driver);
> > 
> > Does it make sense to remove and add an additional parameter? In one
> > case it's a copy, in another it probably the same, just hidden in the
> > code.
> 
> Ok, you mean add the below check in i2c_device_get_match_data() and
> drop *driver parameter from i2c_get_match_data_helper().

Right.

> if (!client || !dev->driver)                                             
>  return NULL;

Not sure if you need this here in this static helper.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-08-02 14:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 17:03 [PATCH v3 0/2] Extend device_get_match_data() to struct bus_type Biju Das
2023-08-01 17:03 ` [PATCH v3 2/2] i2c: Add i2c_device_get_match_data() callback Biju Das
2023-08-01 19:28   ` Andy Shevchenko
2023-08-01 20:41     ` Dmitry Torokhov
2023-08-02  9:34       ` Biju Das
2023-08-02 14:23         ` Andy Shevchenko
2023-08-02  7:59     ` Biju Das
2023-08-02 14:41       ` Andy Shevchenko [this message]
2023-08-01 19:29   ` Andy Shevchenko
2023-08-02  6:34     ` Biju Das
2023-08-02 14:44       ` Andy Shevchenko
2023-08-02  4:12   ` kernel test robot
2023-08-02 11:04     ` Biju Das
2023-08-02  4:22   ` kernel test robot
2023-08-02  4:22   ` kernel test robot
2023-08-02  5:25   ` kernel test robot

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=ZMprDsFk+cUgq2hk@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@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