Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312AbeAQNeK (ORCPT + 1 other); Wed, 17 Jan 2018 08:34:10 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38159 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753105AbeAQNeI (ORCPT ); Wed, 17 Jan 2018 08:34:08 -0500 X-ME-Sender: Date: Wed, 17 Jan 2018 14:33:59 +0100 From: Greg KH To: ShuFanLee Cc: heikki.krogerus@linux.intel.com, cy_huang@richtek.com, shufan_lee@richtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver Message-ID: <20180117133359.GD3188@kroah.com> References: <1515567552-7692-1-git-send-email-leechu729@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515567552-7692-1-git-send-email-leechu729@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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