From: Himangi Saraogi Date: Thu, 26 Jun 2014 19:41:59 +0000 (+0530) Subject: ecryptfs: Drop cast X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c4cf3ba4f34819170fee43532f729e2fc6aa9a76;p=linux-beck.git ecryptfs: Drop cast This patch does away with cast on void * and the if as it is unnecessary. The following Coccinelle semantic patch was used for making the change: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Himangi Saraogi Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 87ad33e091e9..a27121d35b23 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -53,9 +53,7 @@ static void unlock_dir(struct dentry *dir) static int ecryptfs_inode_test(struct inode *inode, void *lower_inode) { - if (ecryptfs_inode_to_lower(inode) == (struct inode *)lower_inode) - return 1; - return 0; + return ecryptfs_inode_to_lower(inode) == lower_inode; } static int ecryptfs_inode_set(struct inode *inode, void *opaque)