Re: [PATCH 3/3] staging: typec: Fix one defect of incorrect type assignment.

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

 



On Thu, Jun 01, 2017 at 07:21:38AM +0000, ? ? wrote:
> From: Pan Li <incarnation.p.lee@xxxxxxxxxxx>
> 
>     Convert type cpu to le16 for consistent type assignment.
> 
> Signed-off-by: Pan Li <incarnation.p.lee@xxxxxxxxxxx>
> ---
>  drivers/staging/typec/tcpci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c
> index 18d2e06..dac41f2 100644
> --- a/drivers/staging/typec/tcpci.c
> +++ b/drivers/staging/typec/tcpci.c
> @@ -390,7 +390,7 @@ static irqreturn_t tcpci_irq(int irq, void *dev_id)
>  		regmap_read(tcpci->regmap, TCPC_RX_BYTE_CNT, &cnt);
>  
>  		tcpci_read16(tcpci, TCPC_RX_HDR, &reg);
> -		msg.header = reg;
> +		msg.header = cpu_to_le16(reg);

This looks like you introduced a bug.  We surely read le values?
Please be more careful.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux