lkml.org 
[lkml]   [2021]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] i2c: i2c-amd-mp2: Remove NIH logging functions
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


\
 
 \ /
  Last update: 2021-02-01 11:40    [W:0.074 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site