On Thu, Apr 23, 2015 at 11:11 AM, Firo Yang <firogm@xxxxxxxxx> wrote: > Remove unnecessary cast of allocation return value in > fs/proc/inode.c::proc_alloc_inode(). > > Signed-off-by: Firo Yang <firogm@xxxxxxxxx> > --- > fs/proc/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/proc/inode.c b/fs/proc/inode.c > index 7697b66..08a7235 100644 > --- a/fs/proc/inode.c > +++ b/fs/proc/inode.c > @@ -58,7 +58,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb) > struct proc_inode *ei; > struct inode *inode; > > - ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); > + ei = kmem_cache_alloc(proc_inode_cachep, GFP_KERNEL); It is not really unnecessary for at lest two reasons. - If the type of "ei" changes gcc will emit a warning - It is grep friendly At the end of the day it is a matter of taste. :-) -- Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html