[PATCH] fix a warning on drivers/pci/hotplug/cpqphp.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
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@xxxxxxxxx>
---
 drivers/pci/hotplug/cpqphp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);
 }
-- 
1.5.6.5

-- 
---------------------------------
Zhenwen Xu - Open and Free
Home Page:	http://zhwen.org
My Studio:	http://dim4.cn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux