* [PATCH v1 0/3] watchdog: intel-mid_wdt: header and code cleanups
@ 2024-03-05 16:52 Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-05 16:52 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: Wim Van Sebroeck, Guenter Roeck
A few cleanups against the driver, mostly making an order in the header
inclusions.
Andy Shevchenko (3):
watchdog: intel-mid_wdt: Remove unused intel-mid.h
watchdog: intel-mid_wdt: Don't use "proxy" headers
watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
drivers/watchdog/intel-mid_wdt.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h
2024-03-05 16:52 [PATCH v1 0/3] watchdog: intel-mid_wdt: header and code cleanups Andy Shevchenko
@ 2024-03-05 16:52 ` Andy Shevchenko
2024-03-05 17:56 ` Guenter Roeck
2024-03-05 16:52 ` [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata() Andy Shevchenko
2 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-05 16:52 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: Wim Van Sebroeck, Guenter Roeck
intel-mid.h is providing some core parts of the South Complex PM,
which are usually are not used by individual drivers. In particular,
this driver doesn't use it, so simply remove the unused header.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/watchdog/intel-mid_wdt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index fb7fae750181..b41c45582aa4 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -17,7 +17,6 @@
#include <linux/platform_data/intel-mid_wdt.h>
#include <asm/intel_scu_ipc.h>
-#include <asm/intel-mid.h>
#define IPC_WATCHDOG 0xf8
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h
2024-03-05 16:52 ` [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h Andy Shevchenko
@ 2024-03-05 17:56 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2024-03-05 17:56 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-watchdog, linux-kernel, Wim Van Sebroeck
On Tue, Mar 05, 2024 at 06:52:18PM +0200, Andy Shevchenko wrote:
> intel-mid.h is providing some core parts of the South Complex PM,
> which are usually are not used by individual drivers. In particular,
> this driver doesn't use it, so simply remove the unused header.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/intel-mid_wdt.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
> index fb7fae750181..b41c45582aa4 100644
> --- a/drivers/watchdog/intel-mid_wdt.c
> +++ b/drivers/watchdog/intel-mid_wdt.c
> @@ -17,7 +17,6 @@
> #include <linux/platform_data/intel-mid_wdt.h>
>
> #include <asm/intel_scu_ipc.h>
> -#include <asm/intel-mid.h>
>
> #define IPC_WATCHDOG 0xf8
>
> --
> 2.43.0.rc1.1.gbec44491f096
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers
2024-03-05 16:52 [PATCH v1 0/3] watchdog: intel-mid_wdt: header and code cleanups Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h Andy Shevchenko
@ 2024-03-05 16:52 ` Andy Shevchenko
2024-03-05 17:57 ` Guenter Roeck
2024-03-05 16:52 ` [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata() Andy Shevchenko
2 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-05 16:52 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: Wim Van Sebroeck, Guenter Roeck
Update header inclusions to follow IWYU (Include What You Use)
principle.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/watchdog/intel-mid_wdt.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index b41c45582aa4..06d5d207a065 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -9,11 +9,17 @@
* Contact: David Cohen <david.a.cohen@linux.intel.com>
*/
+#include <linux/bitops.h>
+#include <linux/device.h>
+#include <linux/errno.h>
#include <linux/interrupt.h>
+#include <linux/math.h>
#include <linux/module.h>
-#include <linux/nmi.h>
+#include <linux/panic.h>
#include <linux/platform_device.h>
+#include <linux/types.h>
#include <linux/watchdog.h>
+
#include <linux/platform_data/intel-mid_wdt.h>
#include <asm/intel_scu_ipc.h>
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers
2024-03-05 16:52 ` [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers Andy Shevchenko
@ 2024-03-05 17:57 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2024-03-05 17:57 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-watchdog, linux-kernel, Wim Van Sebroeck
On Tue, Mar 05, 2024 at 06:52:19PM +0200, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/intel-mid_wdt.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
> index b41c45582aa4..06d5d207a065 100644
> --- a/drivers/watchdog/intel-mid_wdt.c
> +++ b/drivers/watchdog/intel-mid_wdt.c
> @@ -9,11 +9,17 @@
> * Contact: David Cohen <david.a.cohen@linux.intel.com>
> */
>
> +#include <linux/bitops.h>
> +#include <linux/device.h>
> +#include <linux/errno.h>
> #include <linux/interrupt.h>
> +#include <linux/math.h>
> #include <linux/module.h>
> -#include <linux/nmi.h>
> +#include <linux/panic.h>
> #include <linux/platform_device.h>
> +#include <linux/types.h>
> #include <linux/watchdog.h>
> +
> #include <linux/platform_data/intel-mid_wdt.h>
>
> #include <asm/intel_scu_ipc.h>
> --
> 2.43.0.rc1.1.gbec44491f096
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
2024-03-05 16:52 [PATCH v1 0/3] watchdog: intel-mid_wdt: header and code cleanups Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers Andy Shevchenko
@ 2024-03-05 16:52 ` Andy Shevchenko
2024-03-05 17:57 ` Guenter Roeck
2 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-03-05 16:52 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: Wim Van Sebroeck, Guenter Roeck
Access to platform data via dev_get_platdata() getter to make code cleaner.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/watchdog/intel-mid_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index 06d5d207a065..8d71f6a2236b 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -127,7 +127,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct watchdog_device *wdt_dev;
- struct intel_mid_wdt_pdata *pdata = dev->platform_data;
+ struct intel_mid_wdt_pdata *pdata = dev_get_platdata(dev);
struct mid_wdt *mid;
int ret;
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
2024-03-05 16:52 ` [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata() Andy Shevchenko
@ 2024-03-05 17:57 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2024-03-05 17:57 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-watchdog, linux-kernel, Wim Van Sebroeck
On Tue, Mar 05, 2024 at 06:52:20PM +0200, Andy Shevchenko wrote:
> Access to platform data via dev_get_platdata() getter to make code cleaner.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/intel-mid_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
> index 06d5d207a065..8d71f6a2236b 100644
> --- a/drivers/watchdog/intel-mid_wdt.c
> +++ b/drivers/watchdog/intel-mid_wdt.c
> @@ -127,7 +127,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct watchdog_device *wdt_dev;
> - struct intel_mid_wdt_pdata *pdata = dev->platform_data;
> + struct intel_mid_wdt_pdata *pdata = dev_get_platdata(dev);
> struct mid_wdt *mid;
> int ret;
>
> --
> 2.43.0.rc1.1.gbec44491f096
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-05 17:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 16:52 [PATCH v1 0/3] watchdog: intel-mid_wdt: header and code cleanups Andy Shevchenko
2024-03-05 16:52 ` [PATCH v1 1/3] watchdog: intel-mid_wdt: Remove unused intel-mid.h Andy Shevchenko
2024-03-05 17:56 ` Guenter Roeck
2024-03-05 16:52 ` [PATCH v1 2/3] watchdog: intel-mid_wdt: Don't use "proxy" headers Andy Shevchenko
2024-03-05 17:57 ` Guenter Roeck
2024-03-05 16:52 ` [PATCH v1 3/3] watchdog: intel-mid_wdt: Get platform data via dev_get_platdata() Andy Shevchenko
2024-03-05 17:57 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome