linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: mail@richard-neumann.de
Cc: syniurge@gmail.com, nehal-bakulchandra.shah@amd.com,
	shyam-sundar.s-k@amd.com, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] i2c: i2c-amd-mp2: Remove NIH logging functions
Date: Mon, 1 Feb 2021 12:37:01 +0200	[thread overview]
Message-ID: <YBfZzUHx4UpRwhM9@smile.fi.intel.com> (raw)
In-Reply-To: <20210129192553.55906-2-mail@richard-neumann.de>

On Fri, Jan 29, 2021 at 08:25:52PM +0100, mail@richard-neumann.de wrote:
> From: Richard Neumann <mail@richard-neumann.de>

Thanks for an update, my comments below.

> Use pci_{info,warn,err,dbg} functions of the kernel's PCI API.
> Remove unnecessary ndev_pdev, ndev_name and ndev_dev macros.

"ndev_pdev(), ndev_name() and ndev_dev()"

> Remove useless __func__ from logging.


"While at it, remove..."

...

> -		dev_err(ndev_dev(privdata),
> +		pci_err(pdev,
>  			"length %d in event doesn't match buffer length %d!\n",

Can be one line, but it's up to you (checkpatch won't scream on this).
Same comment for other similar cases.

>  			len, i2c_common->msg->len);

...

>  	struct pci_dev *pci_dev = to_pci_dev(dev);
>  	struct amd_mp2_dev *privdata = pci_get_drvdata(pci_dev);
> +	struct pci_dev *pdev = privdata->pci_dev;

I guess it's a bit overkill. You already have pci_dev above. Isn't it enough?

...

> +		pci_err(pdev, "pci_save_state failed = %d\n", ret);

And here pci_dev will be still okay and fit 80 limit.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-02-01 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 19:25 [PATCH v2 0/2] i2c: i2c-amd-mp2: Clean up driver mail
2021-01-29 19:25 ` [PATCH v2 1/2] i2c: i2c-amd-mp2: Remove NIH logging functions mail
2021-02-01 10:37   ` Andy Shevchenko [this message]
2021-01-29 19:25 ` [PATCH v2 2/2] i2c: i2c-amd-mp2: Remove unused macro mail
2021-02-01 10:38   ` 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=YBfZzUHx4UpRwhM9@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@richard-neumann.de \
    --cc=nehal-bakulchandra.shah@amd.com \
    --cc=shyam-sundar.s-k@amd.com \
    --cc=syniurge@gmail.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;
as well as URLs for NNTP newsgroup(s).