diff mbox

fix a warning on drivers/pci/hotplug/cpqphp.h

Message ID 20090412114250.GA4024@helight
State Superseded, archived
Headers show

Commit Message

Zhenwen Xu April 12, 2009, 11:42 a.m. UTC
fix this warning:

In file included from drivers/pci/hotplug/cpqphp_core.c:46:
drivers/pci/hotplug/cpqphp.h: In function ‘slot_name’:
drivers/pci/hotplug/cpqphp.h:454: warning: return discards qualifiers from pointer target type
In file included from drivers/pci/hotplug/cpqphp_ctrl.c:41:
drivers/pci/hotplug/cpqphp.h: In function ‘slot_name’:
drivers/pci/hotplug/cpqphp.h:454: warning: return discards qualifiers from pointer target type
In file included from drivers/pci/hotplug/cpqphp_sysfs.c:37:
drivers/pci/hotplug/cpqphp.h: In function ‘slot_name’:
drivers/pci/hotplug/cpqphp.h:454: warning: return discards qualifiers from pointer target type
In file included from drivers/pci/hotplug/cpqphp_pci.c:38:
drivers/pci/hotplug/cpqphp.h: In function ‘slot_name’:
drivers/pci/hotplug/cpqphp.h:454: warning: return discards qualifiers from pointer target type

the return value of "*slot_name(struct slot *slot)" should be "static inline const char"


From da974a1c4dfe9311b4a882b5f7e09c1e3e322c91 Mon Sep 17 00:00:00 2001
From: Zhenwen Xu <Helight.Xu@gmail.com>
Date: Sun, 12 Apr 2009 19:35:49 +0800
Subject: [PATCH] fix a warning on drivers/pci/hotplug/cpqphp.h

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
---
 drivers/pci/hotplug/cpqphp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/pci/hotplug/cpqphp.h b/drivers/pci/hotplug/cpqphp.h
index afaf8f6..390a9ba 100644
--- a/drivers/pci/hotplug/cpqphp.h
+++ b/drivers/pci/hotplug/cpqphp.h
@@ -449,7 +449,7 @@  extern u8 cpqhp_disk_irq;
 
 /* inline functions */
 
-static inline char *slot_name(struct slot *slot)
+static inline const char *slot_name(struct slot *slot)
 {
 	return hotplug_slot_name(slot->hotplug_slot);
 }