Re: [PATCH] iio: ad9523: Fix argument type mismatch

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

 



Hi Michael,

On Mon, Jun 11, 2012 at 2:45 PM, Michael Hennerich
<michael.hennerich@xxxxxxxxxx> wrote:
[..]
>>>  static int ad9523_vco_out_map(struct iio_dev *indio_dev,
>>> -                             unsigned ch, bool out)
>>> +                             unsigned ch, unsigned out)
>>
>> Unsigned defaults to unsigned int right shouldnt it be a char?
>> Or am I missing something.
>>
> Hi Shubhrajyoti,
>
> can you explain why this matters?
> If you take a closer look at the disassembly -
> you will notice that 'unsigned int' will generate nicer code.
>

What I was thinking is that


+       }
+
+       st->vco_out_map[ch] = out;
+
+       return ret;
+}
Here

and
+struct ad9523_state {
+       struct spi_device               *spi;
+       struct regulator                *reg;
+       struct ad9523_platform_data     *pdata;
+       struct iio_chan_spec            ad9523_channels[AD9523_NUM_CHAN];
+
+       unsigned long           vcxo_freq;
+       unsigned long           vco_freq;
+       unsigned long           vco_out_freq[AD9523_NUM_CLK_SRC];
+       unsigned char           vco_out_map[AD9523_NUM_CHAN_ALT_CLK_SRC];

So that may not work well with all the endianness etc,
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux