Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbeAJTfI (ORCPT + 1 other); Wed, 10 Jan 2018 14:35:08 -0500 Received: from mga11.intel.com ([192.55.52.93]:3060 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754130AbeAJTfG (ORCPT ); Wed, 10 Jan 2018 14:35:06 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,341,1511856000"; d="scan'208";a="22994845" Subject: Re: [PATCH linux dev-4.10 3/6] drivers/misc: Add driver for Aspeed PECI and generic PECI headers To: Greg KH Cc: joel@jms.id.au, andrew@aj.id.au, arnd@arndb.de, jdelvare@suse.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openbmc@lists.ozlabs.org References: <20180109223126.13093-1-jae.hyun.yoo@linux.intel.com> <20180109223126.13093-4-jae.hyun.yoo@linux.intel.com> <20180110102011.GC5822@kroah.com> From: Jae Hyun Yoo Message-ID: Date: Wed, 10 Jan 2018 11:34:54 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180110102011.GC5822@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 1/10/2018 2:20 AM, Greg KH wrote: > On Tue, Jan 09, 2018 at 02:31:23PM -0800, Jae Hyun Yoo wrote: >> +#pragma pack(push, 1) >> +struct peci_xfer_msg { >> + unsigned char client_addr; >> + unsigned char tx_len; >> + unsigned char rx_len; >> + unsigned char tx_buf[MAX_BUFFER_SIZE]; >> + unsigned char rx_buf[MAX_BUFFER_SIZE]; >> +}; >> +#pragma pack(pop) > > For any structure that crosses the user/kernel boundry, you _HAVE_ to > use the "__" variant. So for here you would use __u8 instead of > "unsigned char" in order for things to work properly. > > I'm guessing you didn't test this all out on a mixed 32/64 bit system? > > Please fix up and test to ensure that it all works properly before > resubmitting. > > thanks, > > greg k-h > Thanks for your pointing it out. I'll fix this. Thanks a lot, Jae