From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbdFAO7v (ORCPT ); Thu, 1 Jun 2017 10:59:51 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:50396 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdFAO7t (ORCPT ); Thu, 1 Jun 2017 10:59:49 -0400 Date: Thu, 1 Jun 2017 17:58:56 +0300 From: Dan Carpenter To: ? ? Cc: "gregkh@linuxfoundation.org" , "linux@roeck-us.net" , "yueyao.zhu@gmail.com" , "devel@driverdev.osuosl.org" , "o_leveque@orange.fr" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/3] staging: typec: Fix one defect of incorrect type assignment. Message-ID: <20170601145856.xjmo5rh7o63itbpz@mwanda> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 07:21:22AM +0000, ? ? wrote: > From: Pan Li > > Convert type le16 to cpu for consistent type assignment. > > Signed-off-by: Pan Li > --- > 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 405c9cc..18d2e06 100644 > --- a/drivers/staging/typec/tcpci.c > +++ b/drivers/staging/typec/tcpci.c > @@ -292,7 +292,7 @@ static int tcpci_pd_transmit(struct tcpc_dev *tcpc, > if (ret < 0) > return ret; > > - header = msg ? msg->header : 0; > + header = msg ? le16_to_cpu(msg->header) : 0; > ret = tcpci_write16(tcpci, TCPC_TX_HDR, header); This looks like it introduces bugs. We normally write endian data and you've changed it to write CPU endian data. regards, dan carpenter