Re: [RFC] regmap: Add regmap_pipe_read API

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

 



On 06/21/2016 09:42 PM, Mark Brown wrote:
> On Thu, Jun 16, 2016 at 06:24:36PM +0300, Crestez Dan Leonard wrote:
> 
>> +		val = ((u8*)val) + read_len;
> 
> This cast looks broken, you should be able to do pointer arithmetic on
> void pointers as though they were char *.
> 
Pointer arithmetic on void* is not standard C, it's a GCC extension. I
know that GCC extensions are allowed for the kernel but is it really
encouraged to rely on them this way?

Anyway, are my concerns about the regmap_bus implementation for SPMI
valid? In theory this could be submitted in it's present form and let
regmap+spmi users

If this API is otherwise fine I can just resend this marked as [PATCH]
with the cast removed and some rearranged comments.

-- 
Regards,
Leonard
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux