From: Michael Buesch <mb@bu3sch.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Tomas Winkler <tomasw@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>,
Dan Williams <dcbw@redhat.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
Zhu Yi <yi.zhu@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>
Subject: Re: coding style lesson: iwlwifi vs. endianness
Date: Mon, 10 Dec 2007 17:48:43 +0100 [thread overview]
Message-ID: <200712101748.43693.mb@bu3sch.de> (raw)
In-Reply-To: <1197303523.6035.92.camel@johannes.berg>
On Monday 10 December 2007 17:18:43 Johannes Berg wrote:
>
> > my_data = read_drom_device()
> > swap_to_cpu(my_data)
> > do_whatever(my_data)
> > store the data somewhere else in the device structs for
> > later use, maybe.
> > do_something_else(my_data)
> >
> > You see that now you have only _one_ place that you have to care about.
> > And if you have to write your data back at some point, simply do it
> > just before the write.
>
> The thing is that Tomas is saying that because they don't have a
> function to "read_from_device()" but that is rather only
> "shared_structure->something" it is special and completely different
> than regular drivers.
The read_from_device wasn't supposed to be a function call, actually.
It was more a "get data from the device, somehow". That could be reading
a structure that we just received via DMA.
> The actual runtime penalty of byteswaps is insignificant since fetching
> the value from memory already takes forever.
Right, as per definition these values can't be in the cache. :)
--
Greetings Michael.
next prev parent reply other threads:[~2007-12-10 16:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 18:44 coding style lesson: iwlwifi vs. endianness Johannes Berg
2007-11-28 18:20 ` Tomas Winkler
2007-11-28 18:50 ` Johannes Berg
2007-11-28 21:43 ` Dan Williams
2007-11-29 0:58 ` John W. Linville
2007-11-29 23:02 ` Tomas Winkler
2007-12-10 11:42 ` Johannes Berg
2007-12-10 14:18 ` Tomas Winkler
2007-12-10 15:18 ` Johannes Berg
2007-12-10 15:30 ` Michael Buesch
2007-12-10 16:18 ` Johannes Berg
2007-12-10 16:48 ` Michael Buesch [this message]
2007-12-10 16:21 ` Tomas Winkler
2007-12-10 16:25 ` Johannes Berg
2007-12-10 21:18 ` Tomas Winkler
2007-12-10 16:10 ` Tomas Winkler
2007-12-10 16:17 ` Johannes Berg
2007-12-10 16:23 ` Johannes Berg
2007-11-29 9:03 ` Holger Schurig
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=200712101748.43693.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=dcbw@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=reinette.chatre@intel.com \
--cc=tomasw@gmail.com \
--cc=yi.zhu@intel.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).