* [PATCH v2 1/6] staging: lustre: ptlrpc: sec_bulk: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
@ 2015-10-14 18:41 ` Amitoj Kaur Chawla
2015-10-14 18:43 ` [PATCH v2 2/6] staging: lustre: ptlrpc: service: " Amitoj Kaur Chawla
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:41 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>
---
Changes in v2:
-Fixed subject in commit message
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
index c89973c..ee82b32 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
@@ -541,8 +541,7 @@ int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,
memcpy(buf, hashbuf, buflen);
} else {
bufsize = buflen;
- err = cfs_crypto_hash_final(hdesc, (unsigned char *)buf,
- &bufsize);
+ err = cfs_crypto_hash_final(hdesc, buf, &bufsize);
}
if (err)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 2/6] staging: lustre: ptlrpc: service: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
2015-10-14 18:41 ` [PATCH v2 1/6] staging: lustre: ptlrpc: sec_bulk: " Amitoj Kaur Chawla
@ 2015-10-14 18:43 ` Amitoj Kaur Chawla
2015-10-14 18:45 ` [PATCH v2 3/6] staging: lustre: ptlrpc: pinger: " Amitoj Kaur Chawla
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:43 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>
---
Changes in v2:
-Fixed subject in commit message
drivers/staging/lustre/lustre/ptlrpc/service.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 0131361..22b89c7 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -1873,7 +1873,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;
@@ -1980,7 +1980,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;
@@ -2182,7 +2182,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];
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 3/6] staging: lustre: ptlrpc: pinger: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
2015-10-14 18:41 ` [PATCH v2 1/6] staging: lustre: ptlrpc: sec_bulk: " Amitoj Kaur Chawla
2015-10-14 18:43 ` [PATCH v2 2/6] staging: lustre: ptlrpc: service: " Amitoj Kaur Chawla
@ 2015-10-14 18:45 ` Amitoj Kaur Chawla
2015-10-14 18:47 ` [PATCH v2 4/6] staging: lustre: ptlrpc: sec_gc: " Amitoj Kaur Chawla
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:45 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>
---
Changes in v2:
-Fixed subject in commit message
drivers/staging/lustre/lustre/ptlrpc/pinger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
index a608165..31b197a 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
@@ -219,7 +219,7 @@ static void ptlrpc_pinger_process_import(struct obd_import *imp,
static int ptlrpc_pinger_main(void *arg)
{
- struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
+ struct ptlrpc_thread *thread = arg;
/* Record that the thread is running */
thread_set_flags(thread, SVC_RUNNING);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 4/6] staging: lustre: ptlrpc: sec_gc: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
` (2 preceding siblings ...)
2015-10-14 18:45 ` [PATCH v2 3/6] staging: lustre: ptlrpc: pinger: " Amitoj Kaur Chawla
@ 2015-10-14 18:47 ` Amitoj Kaur Chawla
2015-10-14 18:48 ` [PATCH v2 5/6] staging: lustre: mgc: " Amitoj Kaur Chawla
2015-10-14 18:50 ` [PATCH v2 6/6] staging: lustre: osc: " Amitoj Kaur Chawla
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:47 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>
---
Changes in v2:
-Fixed subject in commit message
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
index 520329f..e570359 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
@@ -148,7 +148,7 @@ static void sec_do_gc(struct ptlrpc_sec *sec)
static int sec_gc_main(void *arg)
{
- struct ptlrpc_thread *thread = (struct ptlrpc_thread *) arg;
+ struct ptlrpc_thread *thread = arg;
struct l_wait_info lwi;
unshare_fs_struct();
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 5/6] staging: lustre: mgc: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
` (3 preceding siblings ...)
2015-10-14 18:47 ` [PATCH v2 4/6] staging: lustre: ptlrpc: sec_gc: " Amitoj Kaur Chawla
@ 2015-10-14 18:48 ` Amitoj Kaur Chawla
2015-10-14 18:50 ` [PATCH v2 6/6] staging: lustre: osc: " Amitoj Kaur Chawla
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:48 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>
---
Changes in v2:
-None
drivers/staging/lustre/lustre/mgc/mgc_request.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 3e9cca0..b36bad9 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -756,7 +756,7 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
void *data, int flag)
{
struct lustre_handle lockh;
- struct config_llog_data *cld = (struct config_llog_data *)data;
+ struct config_llog_data *cld = data;
int rc = 0;
switch (flag) {
@@ -860,7 +860,7 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
void *data, __u32 lvb_len, void *lvb_swabber,
struct lustre_handle *lockh)
{
- struct config_llog_data *cld = (struct config_llog_data *)data;
+ struct config_llog_data *cld = data;
struct ldlm_enqueue_info einfo = {
.ei_type = type,
.ei_mode = mode,
@@ -972,7 +972,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
if (KEY_IS(KEY_SET_INFO)) {
struct mgs_send_param *msp;
- msp = (struct mgs_send_param *)val;
+ msp = val;
rc = mgc_set_mgs_param(exp, msp);
return rc;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 6/6] staging: lustre: osc: Remove useless cast on void pointer
2015-10-14 18:39 [PATCH v2 0/6] staging: lustre: Remove useless cast on void pointer Amitoj Kaur Chawla
` (4 preceding siblings ...)
2015-10-14 18:48 ` [PATCH v2 5/6] staging: lustre: mgc: " Amitoj Kaur Chawla
@ 2015-10-14 18:50 ` Amitoj Kaur Chawla
5 siblings, 0 replies; 7+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-14 18:50 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>
---
Changes in v2:
-None
drivers/staging/lustre/lustre/osc/osc_request.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 225e5ed..2ab94c5 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -2664,7 +2664,7 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
data->ioc_offset);
goto out;
case OBD_IOC_POLL_QUOTACHECK:
- err = osc_quota_poll_check(exp, (struct if_quotacheck *)karg);
+ err = osc_quota_poll_check(exp, karg);
goto out;
case OBD_IOC_PING_TARGET:
err = ptlrpc_obd_ping(obd);
@@ -2731,8 +2731,7 @@ static int osc_get_info(const struct lu_env *env, struct obd_export *exp,
ptlrpc_req_finished(req);
return rc;
} else if (KEY_IS(KEY_FIEMAP)) {
- struct ll_fiemap_info_key *fm_key =
- (struct ll_fiemap_info_key *)key;
+ struct ll_fiemap_info_key *fm_key = key;
struct ldlm_res_id res_id;
ldlm_policy_data_t policy;
struct lustre_handle lockh;
@@ -2854,7 +2853,7 @@ static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
struct client_obd *cli = &obd->u.cli;
LASSERT(cli->cl_cache == NULL); /* only once */
- cli->cl_cache = (struct cl_client_cache *)val;
+ cli->cl_cache = val;
atomic_inc(&cli->cl_cache->ccc_users);
cli->cl_lru_left = &cli->cl_cache->ccc_lru_left;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread