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