[PATCH] 2.5.4-pre2 PROC_I() compile warnings

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Thu Feb 07 2002 - 07:36:30 EST


The new PROC_I() and PDE() access functions for /proc
inodes need to have their formal parameters declared "const",
to avoid some compile warnings (in drivers/pci/ and possibly
elsewhere).

/Mikael

--- linux-2.5.4-pre2/include/linux/proc_fs.h.~1~ Thu Feb 7 12:51:22 2002
+++ linux-2.5.4-pre2/include/linux/proc_fs.h Thu Feb 7 12:53:00 2002
@@ -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;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:01:01 EST