From: Pavel Machek <pavel@ucw.cz>
To: malattia@linux.it, kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Cc: trivial@kernel.org
Subject: struct should not be named same way as function in sony-laptop
Date: Thu, 3 Jan 2008 12:01:54 +0100 [thread overview]
Message-ID: <20080103110154.GA2376@elf.ucw.cz> (raw)
Naming struct and function by same name is evil. Rename the struct.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index b0f6803..31ce39d 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -1180,7 +1180,7 @@ struct sony_pic_ioport {
struct list_head list;
};
-struct sony_pic_irq {
+struct sony_pic_irqdesc {
struct acpi_resource_irq irq;
struct list_head list;
};
@@ -1192,7 +1192,7 @@ struct sony_pic_dev {
u8 bluetooth_power;
u8 wwan_power;
struct acpi_device *acpi_dev;
- struct sony_pic_irq *cur_irq;
+ struct sony_pic_irqdesc *cur_irq;
struct sony_pic_ioport *cur_ioport;
struct list_head interrupts;
struct list_head ioports;
@@ -2094,7 +2094,7 @@ sony_pic_read_possible_resource(struct a
case ACPI_RESOURCE_TYPE_IRQ:
{
struct acpi_resource_irq *p = &resource->data.irq;
- struct sony_pic_irq *interrupt = NULL;
+ struct sony_pic_irqdesc *interrupt = NULL;
if (!p || !p->interrupt_count) {
/*
* IRQ descriptors may have no IRQ# bits set,
@@ -2218,7 +2218,7 @@ static int sony_pic_disable(struct acpi_
* Call _SRS to set current resources
*/
static int sony_pic_enable(struct acpi_device *device,
- struct sony_pic_ioport *ioport, struct sony_pic_irq *irq)
+ struct sony_pic_ioport *ioport, struct sony_pic_irqdesc *irq)
{
acpi_status status;
int result = 0;
@@ -2381,7 +2381,7 @@ found:
static int sony_pic_remove(struct acpi_device *device, int type)
{
struct sony_pic_ioport *io, *tmp_io;
- struct sony_pic_irq *irq, *tmp_irq;
+ struct sony_pic_irqdesc *irq, *tmp_irq;
if (sony_pic_disable(device)) {
printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
@@ -2422,7 +2422,7 @@ static int sony_pic_add(struct acpi_devi
{
int result;
struct sony_pic_ioport *io, *tmp_io;
- struct sony_pic_irq *irq, *tmp_irq;
+ struct sony_pic_irqdesc *irq, *tmp_irq;
printk(KERN_INFO DRV_PFX "%s v%s.\n",
SONY_PIC_DRIVER_NAME, SONY_LAPTOP_DRIVER_VERSION);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2008-01-03 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 11:01 Pavel Machek [this message]
2008-01-03 11:15 ` struct should not be named same way as function in sony-laptop Al Viro
2008-01-03 17:09 ` 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=20080103110154.GA2376@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malattia@linux.it \
--cc=trivial@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