2021-01-29 19:32:05

by Richard Neumann

[permalink] [raw]
Subject: [PATCH v2 0/2] i2c: i2c-amd-mp2: Clean up driver

From: Richard Neumann <[email protected]>

Clean up i2c-amd-mp2-{pci,plat} drivers:
* Use pci_* logging functions provided by the kernel's PCI API.
* Remove unused macros.
* Remove useless __func__ from logging.

Changes since v1:
* Remove useless __func__ from logging.
* Assign pci_dev to local variable where applicable.

Richard Neumann (2):
i2c: i2c-amd-mp2: Remove NIH logging functions
i2c: i2c-amd-mp2: Remove unused macro

drivers/i2c/busses/i2c-amd-mp2-pci.c | 53 +++++++++++++--------------
drivers/i2c/busses/i2c-amd-mp2-plat.c | 3 +-
drivers/i2c/busses/i2c-amd-mp2.h | 6 ---
3 files changed, 27 insertions(+), 35 deletions(-)

--
2.30.0


2021-01-29 19:32:19

by Richard Neumann

[permalink] [raw]
Subject: [PATCH v2 2/2] i2c: i2c-amd-mp2: Remove unused macro

From: Richard Neumann <[email protected]>

Remove unused work_amd_i2c_common macro.

Signed-off-by: Richard Neumann <[email protected]>
---
drivers/i2c/busses/i2c-amd-mp2.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd-mp2.h b/drivers/i2c/busses/i2c-amd-mp2.h
index 6b91e285745d..ddecd0c88656 100644
--- a/drivers/i2c/busses/i2c-amd-mp2.h
+++ b/drivers/i2c/busses/i2c-amd-mp2.h
@@ -185,9 +185,6 @@ struct amd_mp2_dev {
unsigned int probed;
};

-#define work_amd_i2c_common(__work) \
- container_of(__work, struct amd_i2c_common, work.work)
-
/* PCIe communication driver */

int amd_mp2_rw(struct amd_i2c_common *i2c_common, enum i2c_cmd reqcmd);
--
2.30.0

2021-02-01 10:44:37

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] i2c: i2c-amd-mp2: Remove unused macro

On Fri, Jan 29, 2021 at 08:25:53PM +0100, [email protected] wrote:
> From: Richard Neumann <[email protected]>
>
> Remove unused work_amd_i2c_common macro.

I think I gave you a tag on this. If no, here it is
Reviewed-by: Andy Shevchenko <[email protected]>

Please carry it on in a new versions (as a part of the commit message,
tag block, usually after your SoB in chronological order of receiving).

> Signed-off-by: Richard Neumann <[email protected]>
> ---
> drivers/i2c/busses/i2c-amd-mp2.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-amd-mp2.h b/drivers/i2c/busses/i2c-amd-mp2.h
> index 6b91e285745d..ddecd0c88656 100644
> --- a/drivers/i2c/busses/i2c-amd-mp2.h
> +++ b/drivers/i2c/busses/i2c-amd-mp2.h
> @@ -185,9 +185,6 @@ struct amd_mp2_dev {
> unsigned int probed;
> };
>
> -#define work_amd_i2c_common(__work) \
> - container_of(__work, struct amd_i2c_common, work.work)
> -
> /* PCIe communication driver */
>
> int amd_mp2_rw(struct amd_i2c_common *i2c_common, enum i2c_cmd reqcmd);
> --
> 2.30.0
>

--
With Best Regards,
Andy Shevchenko