From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752692AbdCEB3N (ORCPT ); Sat, 4 Mar 2017 20:29:13 -0500 Received: from casper.infradead.org ([85.118.1.10]:33884 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638AbdCEB3C (ORCPT ); Sat, 4 Mar 2017 20:29:02 -0500 Date: Sun, 5 Mar 2017 00:51:59 +0000 (GMT) From: James Simmons To: simran singhal cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org, florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, oleg.drokin@intel.com, outreachy-kernel@googlegroups.com Subject: Re: [PATCH v5 2/5] staging: lustre: Remove unnecessary cast on void pointer In-Reply-To: <1488641453-22575-3-git-send-email-singhalsimran0@gmail.com> Message-ID: References: <1488641453-22575-1-git-send-email-singhalsimran0@gmail.com> <1488641453-22575-3-git-send-email-singhalsimran0@gmail.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170305_005159_437271_41FBE69B X-CRM114-Status: GOOD ( 11.64 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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 Reviewed-by: James Simmons > --- > drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c > index 271e189..09b46924 100644 > --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c > +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c > @@ -640,7 +640,7 @@ static int lmv_fid2path(struct obd_export *exp, int len, void *karg, > int remote_gf_size = 0; > int rc; > > - gf = (struct getinfo_fid2path *)karg; > + gf = karg; > tgt = lmv_find_target(lmv, &gf->gf_fid); > if (IS_ERR(tgt)) > return PTR_ERR(tgt); > @@ -657,7 +657,7 @@ static int lmv_fid2path(struct obd_export *exp, int len, void *karg, > struct getinfo_fid2path *ori_gf; > char *ptr; > > - ori_gf = (struct getinfo_fid2path *)karg; > + ori_gf = karg; > if (strlen(ori_gf->gf_path) + > strlen(gf->gf_path) > ori_gf->gf_pathlen) { > rc = -EOVERFLOW; > -- > 2.7.4 > > _______________________________________________ > devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel >