From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v2 1/6] i2c: designware-pci: Use temporary variable for struct device
Date: Wed, 15 Dec 2021 15:48:49 +0200 [thread overview]
Message-ID: <YbnyQcpAXxSs9R2K@smile.fi.intel.com> (raw)
In-Reply-To: <3d67442c-87a7-e05b-7f69-de501fc0ad29@linux.intel.com>
On Wed, Dec 15, 2021 at 09:51:10AM +0200, Jarkko Nikula wrote:
> On 12/13/21 20:00, Andy Shevchenko wrote:
> > Use temporary variable for struct device to make code neater.
...
> > + dev->suspended = true;
> > + dev->disable(dev);
> In my opinion this brings more mess than removes. If I see dev->something
> I'll immediatelly think "struct device" and get confused. x_dev->something
> or dev_y->something not so much. And this change adds in my opinion more
> confusion than removes.
Either way it will be inconsistent. If you wish to fix, I can build something
on top of your fix, but currently I drop this patch.
> > if (id->driver_data >= ARRAY_SIZE(dw_pci_controllers)) {
> > - dev_err(&pdev->dev, "%s: invalid driver data %ld\n", __func__,
> > - id->driver_data);
> > + dev_err(d, "%s: invalid driver data %ld\n", __func__, id->driver_data);
> > return -EINVAL;
>
> Honestly, what's is the value of this change?
What is the value of the changes in general? :-)
> Yet another differently named
> "device" pointer more to the mess (Inconsistent naming use of struct
> dw_i2c_dev *dev, struct dw_i2c_dev *i_dev and struct device *dev in the
> i2c-designware-*).
As I said, please fix this inconsistency yourself how you find it better
and I will use that in the future contributions.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-12-15 13:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 18:00 [PATCH v2 1/6] i2c: designware-pci: Use temporary variable for struct device Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 2/6] i2c: designware-pci: Convert to use dev_err_probe() Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 3/6] i2c: designware-pci: use __maybe_unused for PM functions Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters Andy Shevchenko
2021-12-15 7:55 ` Jarkko Nikula
2021-12-15 13:51 ` Andy Shevchenko
2021-12-15 14:21 ` Jarkko Nikula
2021-12-13 18:00 ` [PATCH v2 5/6] i2c: designware-pci: Group MODULE_*() macros Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 6/6] i2c: designware-pci: Add a note about struct dw_scl_sda_cfg usage Andy Shevchenko
2021-12-15 7:51 ` [PATCH v2 1/6] i2c: designware-pci: Use temporary variable for struct device Jarkko Nikula
2021-12-15 13:48 ` Andy Shevchenko [this message]
2021-12-15 14:15 ` Jarkko Nikula
2021-12-15 13:58 ` 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=YbnyQcpAXxSs9R2K@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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