All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Oeser <netdev@axxeo.de>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: netdev@vger.kernel.org, rt2x00-devel@lfcorreia.dyndns.org
Subject: Re: [PATCH 17/32] rt2x00: Put net_device structure in data_ring
Date: Fri, 28 Apr 2006 13:45:21 +0200	[thread overview]
Message-ID: <200604281345.22006.netdev@axxeo.de> (raw)
In-Reply-To: <200604280003.09753.IvDoorn@gmail.com>

Hi Ivo,

Ivo van Doorn wrote:
> diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2400pci.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
> --- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-04-27 21:48:21.000000000 +0200
> +++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-04-27 21:49:08.000000000 +0200
> @@ -760,10 +760,8 @@ rt2400pci_write_tx_desc(
>  static void
>  rt2400pci_beacondone(void *data)
>  {
> -	struct data_ring	*ring = (struct data_ring*)data;
> -	struct rt2x00_pci	*rt2x00pci = (struct rt2x00_pci*)ring->dev;
> -	struct net_device	*net_dev = pci_get_drvdata(rt2x00pci->pci_dev);
> -	struct sk_buff		*skb;
> +	struct data_ring		*ring = (struct data_ring*)data;

No need for a cast here. 
In C you can cast from any struct pointer to void pointer and back
without problems.

> @@ -784,8 +782,8 @@ static void
>  rt2400pci_rxdone(void *data)
>  {
>  	struct data_ring	*ring = (struct data_ring*)data;

No need for casting.

> @@ -835,8 +834,8 @@ static void
>  rt2400pci_txdone(void *data)
>  {
>  	struct data_ring	*ring = (struct data_ring*)data;

No need for casting.

> diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500pci.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
> --- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-04-27 21:48:21.000000000 +0200
> +++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-04-27 21:49:08.000000000 +0200
> @@ -834,10 +834,8 @@ rt2500pci_write_tx_desc(
>  static void
>  rt2500pci_beacondone(void *data)
>  {
> -	struct data_ring	*ring = (struct data_ring*)data;
> -	struct rt2x00_pci	*rt2x00pci = (struct rt2x00_pci*)ring->dev;
> -	struct net_device	*net_dev = pci_get_drvdata(rt2x00pci->pci_dev);
> -	struct sk_buff		*skb;
> +	struct data_ring		*ring = (struct data_ring*)data;

No need for casting.

Many more of them.

I guess you could just do a fgrep for "*ring = (struct data_ring*)data;"

Regards

Ingo Oeser

  reply	other threads:[~2006-04-28 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-27 22:03 [PATCH 17/32] rt2x00: Put net_device structure in data_ring Ivo van Doorn
2006-04-28 11:45 ` Ingo Oeser [this message]
2006-04-28 13:41   ` Ivo van Doorn

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=200604281345.22006.netdev@axxeo.de \
    --to=netdev@axxeo.de \
    --cc=ivdoorn@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rt2x00-devel@lfcorreia.dyndns.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.