From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: Remove casts to same type
Date: Mon, 04 Jun 2012 11:45:33 -0400 (EDT) [thread overview]
Message-ID: <20120604.114533.1720204611284591292.davem@davemloft.net> (raw)
In-Reply-To: <4b3738493b23bc386d3372012faa8cd3672a138d.1338780551.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Sun, 3 Jun 2012 20:41:40 -0700
> Adding casts of objects to the same type is unnecessary
> and confusing for a human reader.
>
> For example, this cast:
>
> int y;
> int *p = (int *)&y;
>
> I used the coccinelle script below to find and remove these
> unnecessary casts. I manually removed the conversions this
> script produces of casts with __force and __user.
>
> @@
> type T;
> T *p;
> @@
>
> - (T *)p
> + p
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied to net-next, thanks Joe.
next prev parent reply other threads:[~2012-06-04 15:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 3:41 [PATCH] net: Remove casts to same type Joe Perches
2012-06-04 15:45 ` David Miller [this message]
2012-06-04 15:52 ` Joe Perches
2012-06-04 15:53 ` David Miller
2012-06-04 16:04 ` Ben Hutchings
2012-06-04 17:16 ` [PATCH] net/9p: Add __force to cast of __user pointer Joe Perches
2012-06-04 18:12 ` David Miller
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=20120604.114533.1720204611284591292.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
/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).