All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Remove useless cast on void pointer
@ 2015-10-13 13:17 Amitoj Kaur Chawla
  2015-10-13 13:20 ` [PATCH 1/2] staging: lustre: llite: " Amitoj Kaur Chawla
  2015-10-13 13:21 ` [PATCH 2/2] " Amitoj Kaur Chawla
  0 siblings, 2 replies; 3+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-13 13:17 UTC (permalink / raw)
  To: outreachy-kernel

This patchset removes multiple useless cast on void pointer.

The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)


Amitoj Kaur Chawla (2):
  staging: lustre: llite: Remove useless cast on void pointer
  staging: lustre: llite: Remove useless cast on void pointer

 drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 +--
 drivers/staging/lustre/lustre/llite/xattr.c     | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] staging: lustre: llite: Remove useless cast on void pointer
  2015-10-13 13:17 [PATCH 0/2] Remove useless cast on void pointer Amitoj Kaur Chawla
@ 2015-10-13 13:20 ` Amitoj Kaur Chawla
  2015-10-13 13:21 ` [PATCH 2/2] " Amitoj Kaur Chawla
  1 sibling, 0 replies; 3+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-13 13:20 UTC (permalink / raw)
  To: outreachy-kernel

The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index 400acacc..f992eda1 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -78,8 +78,7 @@ void get_uuid2fsid(const char *name, int len, __kernel_fsid_t *fsid)
 
 static int ll_nfs_test_inode(struct inode *inode, void *opaque)
 {
-	return lu_fid_eq(&ll_i2info(inode)->lli_fid,
-			 (struct lu_fid *)opaque);
+	return lu_fid_eq(&ll_i2info(inode)->lli_fid, opaque);
 }
 
 struct inode *search_inode_for_lustre(struct super_block *sb,
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] staging: lustre: llite: Remove useless cast on void pointer
  2015-10-13 13:17 [PATCH 0/2] Remove useless cast on void pointer Amitoj Kaur Chawla
  2015-10-13 13:20 ` [PATCH 1/2] staging: lustre: llite: " Amitoj Kaur Chawla
@ 2015-10-13 13:21 ` Amitoj Kaur Chawla
  1 sibling, 0 replies; 3+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-13 13:21 UTC (permalink / raw)
  To: outreachy-kernel

The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)


Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/lustre/lustre/llite/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index e051dcc..4b7eb33 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -519,7 +519,7 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
 			goto out;
 		}
 
-		lump = (struct lov_user_md *)buffer;
+		lump = buffer;
 		memcpy(lump, lmm, lmmsize);
 		/* do not return layout gen for getxattr otherwise it would
 		 * confuse tar --xattr by recognizing layout gen as stripe
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-13 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 13:17 [PATCH 0/2] Remove useless cast on void pointer Amitoj Kaur Chawla
2015-10-13 13:20 ` [PATCH 1/2] staging: lustre: llite: " Amitoj Kaur Chawla
2015-10-13 13:21 ` [PATCH 2/2] " Amitoj Kaur Chawla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.