mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, linux-kernel@vger.kernel.org
Subject: [2.6 patch] fix devres_release_all() return value
Date: Mon, 18 Jun 2007 01:42:54 +0200	[thread overview]
Message-ID: <20070617234254.GD3588@stusta.de> (raw)

Every file should include the headers containing the prototypes for
it's global functions.

Since the GNU C compiler is now able to detect that the function 
prototype of devres_release_all() in the header and the actual function 
disagree regarding the return value, this patch also fixes this bug.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/base/base.h   |    2 +-
 drivers/base/devres.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.22-rc4-mm2/drivers/base/base.h.old	2007-06-17 15:37:21.000000000 +0200
+++ linux-2.6.22-rc4-mm2/drivers/base/base.h	2007-06-17 15:37:34.000000000 +0200
@@ -44,6 +44,6 @@
 
 extern char *make_class_name(const char *name, struct kobject *kobj);
 
-extern void devres_release_all(struct device *dev);
+extern int devres_release_all(struct device *dev);
 
 extern struct kset devices_subsys;
--- linux-2.6.22-rc4-mm2/drivers/base/devres.c.old	2007-06-17 15:30:48.000000000 +0200
+++ linux-2.6.22-rc4-mm2/drivers/base/devres.c	2007-06-17 15:31:03.000000000 +0200
@@ -10,6 +10,8 @@
 #include <linux/device.h>
 #include <linux/module.h>
 
+#include "base.h"
+
 struct devres_node {
 	struct list_head		entry;
 	dr_release_t			release;


             reply	other threads:[~2007-06-17 23:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17 23:42 Adrian Bunk [this message]
2007-06-18  5:55 ` Tejun Heo
2007-06-25  7:53   ` Greg KH

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=20070617234254.GD3588@stusta.de \
    --to=bunk@stusta.de \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome