Skip to contentSkip to conversation

2.5.4-pre6 pci/proc.c compile fix

PATCH New Udo A. Steinberg 1 participant 1 message Feb 11, 2002 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.4-pre6 pci/proc.c compile fix

Hi Linus,

The attached patch fixes the following compile warning in 2.5.4-pre6:

proc.c: In function `proc_bus_pci_read':
proc.c:49: warning: passing arg 1 of PDE' discards qualifiers from pointer target type proc.c: In function proc_bus_pci_write':
proc.c:131: warning: passing arg 1 of `PDE' discards qualifiers from pointer target type

I see no reason why the two inline functions should not use const qualifier. Otherwise the caller in proc.c should be fixed.

Regards,
Udo.

include/linux/proc_fs.h Mon Feb 11 03:09:50 2002 renamed from include/linux/proc_fs.h Mon Feb 11 03:03:48 2002 +2 -2
@@ -217,12 +217,12 @@
        struct inode vfs_inode;
 };
 
-static inline struct proc_inode *PROC_I(struct inode *inode)
+static inline struct proc_inode *PROC_I(const struct inode *inode)
 {
        return list_entry(inode, struct proc_inode, vfs_inode);
 }
 
-static inline struct proc_dir_entry *PDE(struct inode *inode)
+static inline struct proc_dir_entry *PDE(const struct inode *inode)
 {
        return PROC_I(inode)->pde;
 }