linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: simran singhal <singhalsimran0@gmail.com>
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
Date: Sun, 5 Mar 2017 00:51:59 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1703050051480.10898@casper.infradead.org> (raw)
In-Reply-To: <1488641453-22575-3-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>

Reviewed-by: James Simmons <jsimmons@infradead.org>

> ---
>  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
> 

  reply	other threads:[~2017-03-05  1:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04 15:30 [PATCH v5 0/5] Remove unnecessary cast on void pointer simran singhal
2017-03-04 15:30 ` [PATCH v5 1/5] staging: nvec: " simran singhal
2017-03-04 15:30 ` [PATCH v5 2/5] staging: lustre: " simran singhal
2017-03-05  0:51   ` James Simmons [this message]
2017-03-04 15:30 ` [PATCH v5 3/5] staging: lustre: " simran singhal
2017-03-05  0:51   ` James Simmons
2017-03-04 15:30 ` [PATCH v5 4/5] staging: rts5208: " simran singhal
2017-03-04 15:30 ` [PATCH v5 5/5] staging: rtl8712: " simran singhal
2017-03-04 15:43 ` [Outreachy kernel] [PATCH v5 0/5] " Julia Lawall
2017-03-04 15:52 ` Joe Perches
2017-03-04 16:03   ` 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=alpine.LFD.2.20.1703050051480.10898@casper.infradead.org \
    --to=jsimmons@infradead.org \
    --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=oleg.drokin@intel.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=singhalsimran0@gmail.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;
as well as URLs for NNTP newsgroup(s).