login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
23
Re: drivers/net/wireless/rt2x00/: struct data_desc strangeness
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Ivo van Doorn
Subject:
Re: drivers/net/wireless/rt2x00/: struct data_desc strangeness
Date: Tuesday, October 23, 2007 - 1:13 pm
Hi,
quoted text
> > > I haven't checked whether it might work in all cases, but passing > > > non-zero values as second parameter to rt2x00_desc_{read,write}() > > > (as is done in many cases) is even in the best case bad coding style. > > > > Access to the array is correct, even with non-zero values the code that is > > reading/writing to the array knows the exact size of the descriptor. Within > > rt2x00 are however 5 drivers who have different descriptor sizes. That means > > I can't create a structure which has the correct array length. > > > > The structure itself is just a simple map over preallocated memory > > (skb->data in case of USB or dma in case of PCI). > > > > So possible solutions would be: > > - remove struct data_desc and make it a void* or __le32* > > This is at the cost of code readibility since the above pointers > > have less meaning then a pointer to a structure which can be nicely > > documented. > >... > > The worst is a wrong meaning. > __le32 word[1] is an array with _one_ element. > > And an __le32* can be used as an array.
Ok. I'll fix this in 1 or 2 days. Ivo -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
drivers/net/wireless/rt2x00/: struct data_desc strangeness
, Adrian Bunk
, (Sun Oct 14, 10:50 am)
Re: drivers/net/wireless/rt2x00/: struct data_desc strangeness
, Ivo van Doorn
, (Sun Oct 14, 12:06 pm)
Re: drivers/net/wireless/rt2x00/: struct data_desc strangeness
, Adrian Bunk
, (Tue Oct 23, 12:43 pm)
Re: drivers/net/wireless/rt2x00/: struct data_desc strangeness
, Ivo van Doorn
, (Tue Oct 23, 1:13 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Uwe Kleine-König
Re: [PATCH v2] ARM: allow, but warn, when issuing ioremap() on RAM
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Ingo Molnar
Re: [GIT PULL] time.c - respin
Alexander van Heukelum
Re: [PATCH] bitops: simplify generic bit finding functions
git
:
Mike Miller
git message
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Petr Baudis
Re: PPC SHA-1 Updates in "pu"
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
Documentation/timers/hpet_example.c: only build on X86
Linux Kernel Mailing List
ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
Linux Kernel Mailing List
V4L/DVB: AZ6027: Add support for Technisat V1 device
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Jeff Garzik
Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM
openbsd-misc
:
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Christian Weisgerber
Re: CARP with a single public IP address
Marco Peereboom
Re: OpenBSD culture?
Darrin Chandler
Re: strange output on openbsd C code
KURS ENGLESKOG JEZIKA NA 10 CD-a
AUDIO-VIZUELNA METODA UCENJA ENGLESKOG JEZIKA na 10 CD-a
Colocation donated by:
Syndicate