From: akinobu.mita@gmail.com (Akinobu Mita)
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH] driver core: warn unused return value for internal functions
Date: Mon, 9 Oct 2006 18:13:23 +0900 [thread overview]
Message-ID: <20061009091323.GA6503@localhost> (raw)
This patch adds __must_check attribute to driver core internal functions
(drivers/base/base.h)
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
drivers/base/base.h | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
Index: work-fault-inject/drivers/base/base.h
===================================================================
--- work-fault-inject.orig/drivers/base/base.h 2006-10-09 15:06:23.000000000 +0900
+++ work-fault-inject/drivers/base/base.h 2006-10-09 15:09:30.000000000 +0900
@@ -1,35 +1,36 @@
+#include <linux/compiler.h>
/* initialisation functions */
-extern int devices_init(void);
-extern int buses_init(void);
-extern int classes_init(void);
-extern int firmware_init(void);
+extern int __must_check devices_init(void);
+extern int __must_check buses_init(void);
+extern int __must_check classes_init(void);
+extern int __must_check firmware_init(void);
#ifdef CONFIG_SYS_HYPERVISOR
-extern int hypervisor_init(void);
+extern int __must_check hypervisor_init(void);
#else
static inline int hypervisor_init(void) { return 0; }
#endif
-extern int platform_bus_init(void);
-extern int system_bus_init(void);
-extern int cpu_dev_init(void);
-extern int attribute_container_init(void);
+extern int __must_check platform_bus_init(void);
+extern int __must_check system_bus_init(void);
+extern int __must_check cpu_dev_init(void);
+extern int __must_check attribute_container_init(void);
-extern int bus_add_device(struct device * dev);
-extern int bus_attach_device(struct device * dev);
+extern int __must_check bus_add_device(struct device * dev);
+extern int __must_check bus_attach_device(struct device * dev);
extern void bus_remove_device(struct device * dev);
extern struct bus_type *get_bus(struct bus_type * bus);
extern void put_bus(struct bus_type * bus);
-extern int bus_add_driver(struct device_driver *);
+extern int __must_check bus_add_driver(struct device_driver *);
extern void bus_remove_driver(struct device_driver *);
extern void driver_detach(struct device_driver * drv);
-extern int driver_probe_device(struct device_driver *, struct device *);
+extern int __must_check driver_probe_device(struct device_driver *, struct device *);
extern void sysdev_shutdown(void);
-extern int sysdev_suspend(pm_message_t state);
-extern int sysdev_resume(void);
+extern int __must_check sysdev_suspend(pm_message_t state);
+extern int __must_check sysdev_resume(void);
static inline struct class_device *to_class_dev(struct kobject *obj)
{
reply other threads:[~2006-10-09 9:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061009091323.GA6503@localhost \
--to=akinobu.mita@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.