Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

Greg KH
2018-01-17T13:34:10Z

On Wed, Jan 10, 2018 at 02:59:12PM +0800, ShuFanLee wrote:
> +static inline int rt1711h_reg_write_word(struct rt1711h_chip *chip, uint8_t reg,
> + uint16_t data)
> +{
> + data = cpu_to_le16(data);
> + return rt1711h_reg_block_write(chip, reg, 2, (uint8_t *)&data);
> +}

Did you run sparse on this code? What are you doing casting the types
all over the place for data? That does not seem correct at all.

thanks,

greg k-h