From: Pavel Machek <pavel@suse.cz>
To: kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
ACPI mailing list <linux-acpi@vger.kernel.org>
Cc: ak@linux.intel.com, hare@suse.de
Subject: catch calls of acpi_driver_data on pointer of wrong type
Date: Wed, 10 Sep 2008 16:11:51 +0200 [thread overview]
Message-ID: <20080910141151.GA13669@elf.ucw.cz> (raw)
Catch attempts to use of acpi_driver_data on pointers of wrong type.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: Hannes Reinecke <hare@suse.de>
---
commit 76c9074075cd9208cf386f37ebd932a00557643a
tree 02589a15c23f430c7728560e4ba51077d41a6eff
parent d4a51ebfa2ffc3320d7eab269dc1ca84e86719f5
author Pavel <pavel@amd.ucw.cz> Wed, 10 Sep 2008 16:10:28 +0200
committer Pavel <pavel@amd.ucw.cz> Wed, 10 Sep 2008 16:10:28 +0200
include/acpi/acpi_bus.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index a5ac0bc..641656e 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -300,7 +300,7 @@ struct acpi_device {
enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
};
-#define acpi_driver_data(d) ((d)->driver_data)
+#define acpi_driver_data(d) ((void) (d == (struct acpi_device *) 0), d)->driver_data
#define to_acpi_device(d) container_of(d, struct acpi_device, dev)
#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2008-09-10 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 14:11 Pavel Machek [this message]
2008-09-11 0:31 ` catch calls of acpi_driver_data on pointer of wrong type Andrew Morton
2008-09-11 12:51 ` Pavel Machek
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=20080910141151.GA13669@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=ak@linux.intel.com \
--cc=akpm@osdl.org \
--cc=hare@suse.de \
--cc=linux-acpi@vger.kernel.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