staging: lustre: ptlrpc: service: Remove useless cast on void pointer
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Wed, 14 Oct 2015 18:43:30 +0000 (00:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 05:22:26 +0000 (22:22 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/service.c

index 3f6f0700272651aeade6057830802118644f983a..f45898f17793bebfabb28d6d208abf7710c90079 100644 (file)
@@ -1872,7 +1872,7 @@ ptlrpc_check_rqbd_pool(struct ptlrpc_service_part *svcpt)
 static int
 ptlrpc_retry_rqbds(void *arg)
 {
-       struct ptlrpc_service_part *svcpt = (struct ptlrpc_service_part *)arg;
+       struct ptlrpc_service_part *svcpt = arg;
 
        svcpt->scp_rqbd_timeout = 0;
        return -ETIMEDOUT;
@@ -1979,7 +1979,7 @@ ptlrpc_wait_event(struct ptlrpc_service_part *svcpt,
  */
 static int ptlrpc_main(void *arg)
 {
-       struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
+       struct ptlrpc_thread *thread = arg;
        struct ptlrpc_service_part *svcpt = thread->t_svcpt;
        struct ptlrpc_service *svc = svcpt->scp_service;
        struct ptlrpc_reply_state *rs;
@@ -2181,7 +2181,7 @@ static int hrt_dont_sleep(struct ptlrpc_hr_thread *hrt,
  */
 static int ptlrpc_hr_main(void *arg)
 {
-       struct ptlrpc_hr_thread *hrt = (struct ptlrpc_hr_thread *)arg;
+       struct ptlrpc_hr_thread *hrt = arg;
        struct ptlrpc_hr_partition *hrp = hrt->hrt_partition;
        LIST_HEAD       (replies);
        char threadname[20];