[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-i2c
Subject: Re: [PATCH v1 1/2] Removed NIH log functions
From: Andy Shevchenko <andriy.shevchenko () linux ! intel ! com>
Date: 2021-01-29 18:50:52
Message-ID: YBRZDDmVll2iCudM () smile ! fi ! intel ! com
[Download RAW message or body]
On Fri, Jan 29, 2021 at 07:26:05PM +0100, mail@richard-neumann.de wrote:
> From: Richard Neumann <mail@richard-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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic