Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbcCATiq (ORCPT ); Tue, 1 Mar 2016 14:38:46 -0500 Received: from g4t3428.houston.hp.com ([15.201.208.56]:7842 "EHLO g4t3428.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbcCATio (ORCPT ); Tue, 1 Mar 2016 14:38:44 -0500 X-Greylist: delayed 3781 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Mar 2016 14:38:44 EST Message-ID: <1456861992.15454.90.camel@hpe.com> Subject: Re: [PATCH v2 1/3] ACPI/NFIT: Update Control Region Structure to comply ACPI 6.1 From: Toshi Kani To: Dan Williams Cc: "Moore, Robert" , "rjw@rjwysocki.net" , "Zheng, Lv" , "elliott@hpe.com" , "linux-nvdimm@lists.01.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devel@acpica.org" Date: Tue, 01 Mar 2016 12:53:12 -0700 In-Reply-To: References: <1456178130-26468-1-git-send-email-toshi.kani@hpe.com> <1456178130-26468-2-git-send-email-toshi.kani@hpe.com> <94F2FBAB4432B54E8AACC7DFDE6C92E37E44D64B@ORSMSX110.amr.corp.intel.com> <1456850284.15454.23.camel@hpe.com> <94F2FBAB4432B54E8AACC7DFDE6C92E37E44D6E1@ORSMSX110.amr.corp.intel.com> <1456853819.15454.45.camel@hpe.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 679 Lines: 19 On Tue, 2016-03-01 at 10:14 -0800, Dan Williams wrote: > On Tue, Mar 1, 2016 at 9:36 AM, Toshi Kani wrote: > > On Tue, 2016-03-01 at 16:03 +0000, Moore, Robert wrote:  : > I think the "ACPI tables are little-endian" assumption is pervasive > throughout the implementation. > > Toshi, it seems all we need is conversions like: > > - sprintf(buf, "%#x\n", dcr->vendor_id); > + sprintf(buf, "%#x\n", le16_to_cpu(dcr->vendor_id)); nit - I think it needs to be be16_to_cpu() if I understand this macro correctly. -Toshi > > ...for the values exported to userspace through sysfs, but otherwise > leave the base table definitions as is.  Will this suffice?