[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YBRZDDmVll2iCudM@smile.fi.intel.com>
Date: Fri, 29 Jan 2021 20:50:52 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: mail@...hard-neumann.de
Cc: syniurge@...il.com, nehal-bakulchandra.shah@....com,
shyam-sundar.s-k@....com, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] Removed NIH log functions
On Fri, Jan 29, 2021 at 07:26:05PM +0100, mail@...hard-neumann.de wrote:
> From: Richard Neumann <mail@...hard-neumann.de>
Thanks for the patch, my comments below.
> Removed unnecessary ndev_pdev, ndev_name and ndev_dev macros.
> Using pci_{info,warn,err,dbg} functions of the kernel's PCI API.
First of all Subject should be in imperative mode with corresponding prefix,
something like: "i2c: amd-mp2: Remove NIH logging functions". Same to the rest
of the series.
While at it, drop useless __func__ parameters.
...
> - dev_dbg(ndev_dev(privdata), "%s id: %d\n", __func__,
> + pci_dbg(privdata->pci_dev, "%s id: %d\n", __func__,
> i2c_common->bus_id);
E.g. this will become one line after dropping __func__.
...
Also in some cases, like here, you may consider simple trick to reduce amount
of LOCs.
struct pci_dev *pdev = privdata->pci_dev;
> if (res != command_failed)
> - dev_err(ndev_dev(privdata), "invalid response to i2c command!\n");
> + pci_err(privdata->pci_dev,
> + "invalid response to i2c command!\n");
pci_err(pdev, "invalid response to i2c command!\n");
> return;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists