* [PATCH v1 1/1] driver core: Move dev_err_probe() to where it belogs
@ 2023-07-21 13:13 Andy Shevchenko
2023-07-23 20:30 ` Andi Shyti
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-07-21 13:13 UTC (permalink / raw)
To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel; +Cc: Andi Shyti
dev_err_probe() belongs to the printing API, hence
move the definition from device.h to dev_printk.h.
There is no change to the callers at all, since:
1) implementation is located in the same core.c;
2) dev_printk.h is guaranteed to be included by device.h.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/dev_printk.h | 2 ++
include/linux/device.h | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/dev_printk.h b/include/linux/dev_printk.h
index 8904063d4c9f..6bfe70decc9f 100644
--- a/include/linux/dev_printk.h
+++ b/include/linux/dev_printk.h
@@ -274,4 +274,6 @@ do { \
WARN_ONCE(condition, "%s %s: " format, \
dev_driver_string(dev), dev_name(dev), ## arg)
+__printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
+
#endif /* _DEVICE_PRINTK_H_ */
diff --git a/include/linux/device.h b/include/linux/device.h
index 6731d7dc1a2a..2ee6023b427a 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1241,8 +1241,6 @@ void device_link_remove(void *consumer, struct device *supplier);
void device_links_supplier_sync_state_pause(void);
void device_links_supplier_sync_state_resume(void);
-__printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
-
/* Create alias, so I can be autoloaded. */
#define MODULE_ALIAS_CHARDEV(major,minor) \
MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
--
2.40.0.1.gaa8946217a0b
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] driver core: Move dev_err_probe() to where it belogs
2023-07-21 13:13 [PATCH v1 1/1] driver core: Move dev_err_probe() to where it belogs Andy Shevchenko
@ 2023-07-23 20:30 ` Andi Shyti
0 siblings, 0 replies; 2+ messages in thread
From: Andi Shyti @ 2023-07-23 20:30 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Greg Kroah-Hartman, linux-kernel
Hi Andi,
On Fri, Jul 21, 2023 at 04:13:09PM +0300, Andy Shevchenko wrote:
> dev_err_probe() belongs to the printing API, hence
> move the definition from device.h to dev_printk.h.
>
> There is no change to the callers at all, since:
> 1) implementation is located in the same core.c;
> 2) dev_printk.h is guaranteed to be included by device.h.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
yes! I think that's right!
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-23 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 13:13 [PATCH v1 1/1] driver core: Move dev_err_probe() to where it belogs Andy Shevchenko
2023-07-23 20:30 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®