Re: [PATCH v3 2/9] staging: iio: ad2s1200: Improve readability with be16_to_cpup

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:03 +0200 David Veenstra wrote: > The manual states that the data is contained in the upper 12 bits > of the 16 bits read by spi. The code that extracts these 12 bits > is correct for both be and le machines, but this is not clear > from a first glance. > > To improve re

[PATCH v3 2/9] staging: iio: ad2s1200: Improve readability with be16_to_cpup

2018-04-22 Thread David Veenstra
The manual states that the data is contained in the upper 12 bits of the 16 bits read by spi. The code that extracts these 12 bits is correct for both be and le machines, but this is not clear from a first glance. To improve readability the relevant expressions are replaced with equivalent express