From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Julian Calaby <julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Luis R. Rodriguez"
<lrodriguez-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>,
Jouni Malinen <jmalinen-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>,
Vasanthakumar Thiagarajan
<vasanth-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>,
Senthil Balasubramanian
<senthilkumar-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org>,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
Christian Lamparter
<chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
Stanislaw Gruszka
<sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Wey-Yi Guy <wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Intel Linux Wireless
<ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH net-next 1/2] wireless: Remove casts of void *
Date: Mon, 13 Jun 2011 22:32:12 -0700 [thread overview]
Message-ID: <1308029532.26699.68.camel@Joe-Laptop> (raw)
In-Reply-To: <BANLkTi=i30Rn7gpCDbn9KKJucq8CB=hssA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, 2011-06-14 at 15:23 +1000, Julian Calaby wrote:
> Joe,
Hi Julian.
> On Tue, Jun 14, 2011 at 14:02, Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org> wrote:
> > Unnecessary casts of void * clutter the code.
> > These are the remainder casts after several specific
> > patches to remove netdev_priv and dev_priv.
> You seem to have removed a lot of casts that don't relate to these cleanups.
> In particular, some of the casts seem to relate more to documentation
> rather than just changing pointer types to make the compiler happy.
All of the cast removals are casts of void* types.
I think none of of the casts are useful.
None of them are required, all are duplicative.
> In
> particular, I'm referring to the casts describing the different usages
> of data_buf in mwiflex, and around some pointer math in ath9k.
Can you describe more in detail why you think these are documentary?
This sort of cast:
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
@@ -191,7 +191,7 @@ int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp, void *data_buf)
struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg;
if (data_buf) {
- tx_cfg = (struct mwifiex_ds_11n_tx_cfg *) data_buf;
+ tx_cfg = data_buf;
I think pretty useless. tx_cfg is a struct mwifiex_ds_11n_tx_cfg *.
> Whilst I'm sure that the compiler is smart enough to handle automatic
> casts between pointer types, some of these, in particular the mwiflex
> bits, add some documentation to the code.
I think not. Opinions of course can vary.
cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-06-14 5:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 4:02 [PATCH net-next 0/2] drivers/net: Remove casts of void * Joe Perches
2011-06-14 4:02 ` [PATCH net-next 1/2] wireless: " Joe Perches
2011-06-14 5:23 ` Julian Calaby
[not found] ` <BANLkTi=i30Rn7gpCDbn9KKJucq8CB=hssA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-14 5:32 ` Joe Perches [this message]
2011-06-14 5:39 ` Julian Calaby
2011-06-14 7:19 ` Joe Perches
2011-06-14 8:45 ` Bing Zhao
2011-06-14 8:46 ` Bing Zhao
[not found] ` <337c22b774ff7f007b90b266b25c9a33ff555c48.1308024069.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2011-06-14 16:31 ` [ath9k-devel] " Pavel Roskin
2011-06-14 16:43 ` Joe Perches
2011-06-14 17:43 ` Christian Lamparter
2011-06-14 4:02 ` [PATCH net-next 2/2] drivers/net: " Joe Perches
2011-06-14 7:56 ` Debashis Dutt
2011-06-14 8:18 ` Daniele Venzano
2011-06-14 9:21 ` Geert Uytterhoeven
2011-06-14 14:00 ` Joe Perches
2011-06-14 14:02 ` Geert Uytterhoeven
2011-06-14 10:34 ` Chris Snook
2011-06-14 14:17 ` Joe Perches
2011-06-14 14:22 ` Chris Snook
2011-06-15 0:10 ` Huang, Xiong
2011-06-14 11:31 ` Amit Salecha
2011-06-14 17:53 ` Sjur BRENDELAND
[not found] ` <C4E199C967B4824F9C9DF4C42CE4A3B8591B7F0D78@EXMAIL.ad.emulex.com>
2011-06-14 18:31 ` Ajit.Khaparde
2011-06-16 15:23 ` Jon Mason
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=1308029532.26699.68.camel@Joe-Laptop \
--to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
--cc=ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public.gmane.org \
--cc=chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
--cc=ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=jmalinen-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org \
--cc=julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=lrodriguez-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=senthilkumar-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org \
--cc=sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=vasanth-DlyHzToyqoxBDgjK7y7TUQ@public.gmane.org \
--cc=wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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).