Search Linux Wireless

Re: coding style lesson: iwlwifi vs. endianness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux