The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: simran singhal <singhalsimran0@gmail.com>
To: Larry.Finger@lwfinger.net
Cc: florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	oleg.drokin@intel.com, marvin24@gmx.de,
	outreachy-kernel@googlegroups.com
Subject: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
Date: Fri,  3 Mar 2017 02:49:02 +0530	[thread overview]
Message-ID: <1488489544-25941-3-git-send-email-singhalsimran0@gmail.com> (raw)
In-Reply-To: <1488489544-25941-1-git-send-email-singhalsimran0@gmail.com>

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/lustre/lustre/llite/range_lock.c | 2 +-
 drivers/staging/lustre/lustre/mgc/mgc_request.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/range_lock.c b/drivers/staging/lustre/lustre/llite/range_lock.c
index 14148a0..161391b 100644
--- a/drivers/staging/lustre/lustre/llite/range_lock.c
+++ b/drivers/staging/lustre/lustre/llite/range_lock.c
@@ -174,7 +174,7 @@ void range_unlock(struct range_lock_tree *tree, struct range_lock *lock)
  */
 static enum interval_iter range_lock_cb(struct interval_node *node, void *arg)
 {
-	struct range_lock *lock = (struct range_lock *)arg;
+	struct range_lock *lock = arg;
 	struct range_lock *overlap = node2rangelock(node);
 
 	lock->rl_blocking_ranges += overlap->rl_lock_count + 1;
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 6a76605..b13961a 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
 		rc = sptlrpc_parse_flavor(val, &flvr);
 		if (rc) {
 			CERROR("invalid sptlrpc flavor %s to MGS\n",
-			       (char *)val);
+			       val);
 			return rc;
 		}
 
@@ -1050,7 +1050,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
 			sptlrpc_flavor2name(&cli->cl_flvr_mgc,
 					    str, sizeof(str));
 			LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
-				       (char *)val, str);
+				       val, str);
 			rc = -EPERM;
 		}
 		return rc;
-- 
2.7.4

  parent reply	other threads:[~2017-03-02 21:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
2017-03-02 21:19 ` [PATCH 2/5] staging: lustre: " simran singhal
2017-03-02 21:19 ` simran singhal [this message]
2017-03-02 21:43   ` [PATCH 3/5] staging: lustre: " Joe Perches
2017-03-02 21:55     ` SIMRAN SINGHAL
2017-03-02 21:59       ` Joe Perches
2017-03-02 22:05         ` SIMRAN SINGHAL
2017-03-02 22:07           ` [Outreachy kernel] " Julia Lawall
2017-03-02 22:09           ` Joe Perches
2017-03-03 22:41   ` kbuild test robot
2017-03-04  0:16   ` kbuild test robot
2017-03-02 21:19 ` [PATCH 4/5] staging: rts5208: " simran singhal
2017-03-02 21:56   ` [Outreachy kernel] " Julia Lawall
2017-03-02 21:58     ` SIMRAN SINGHAL
2017-03-02 21:19 ` [PATCH 5/5] staging: rtl8712: " simran singhal
2017-03-02 21:56   ` [Outreachy kernel] " Julia Lawall
2017-03-02 21:57     ` SIMRAN SINGHAL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488489544-25941-3-git-send-email-singhalsimran0@gmail.com \
    --to=singhalsimran0@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marvin24@gmx.de \
    --cc=oleg.drokin@intel.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox