[PATCH] 2.5.4-pre2 PROC_I() compile warnings

Mikael Pettersson (mikpe@csd.uu.se)
Thu, 7 Feb 2002 13:36:30 +0100 (MET)


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/