From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761929AbXFQXnH (ORCPT ); Sun, 17 Jun 2007 19:43:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761904AbXFQXmj (ORCPT ); Sun, 17 Jun 2007 19:42:39 -0400 Received: from emailhub.stusta.mhn.de ([141.84.69.5]:37889 "EHLO mailhub.stusta.mhn.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761889AbXFQXmi (ORCPT ); Sun, 17 Jun 2007 19:42:38 -0400 Date: Mon, 18 Jun 2007 01:42:54 +0200 From: Adrian Bunk To: Tejun Heo Cc: Jeff Garzik , linux-kernel@vger.kernel.org Subject: [2.6 patch] fix devres_release_all() return value Message-ID: <20070617234254.GD3588@stusta.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 #include +#include "base.h" + struct devres_node { struct list_head entry; dr_release_t release;