Received: by 10.213.65.68 with SMTP id h4csp1859054imn; Mon, 19 Mar 2018 15:28:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELvt8cnOXAAYoZS/7ZurxnwGBPUf95TqZ1W/8+TZZyVVreT/jf5mh4XmZv8czC++hRO4MLbG X-Received: by 2002:a17:902:4481:: with SMTP id l1-v6mr14210723pld.43.1521498493983; Mon, 19 Mar 2018 15:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498493; cv=none; d=google.com; s=arc-20160816; b=Dpz0k861XsllwI1byHCly9cEOeD66BPZF+KQg4IXfXk+/wLsZgAYevthty0a7fqh0g HZfkex2nrFjiVAVAYloiwmjX12VHHnK03zIYrHXcj9ApfGV38br0jxl9315RBuw8tt2q 7bXTbsvlsn3hVUxOtW0Y1Kpg2IGld6N4xdRGOiP8ptDtpEkXCGvWdPgXrWL1nkaEaJem EgnucPDaWKlkXASiXQj/3A0VcTj5J5KmKu4nADv2GR3btOq3KGaI1cH58ifdlHeckXXw GoCC6RkoQd7wBlYodh1rdh6EUS+DUfLLW5cElrPJNwyBjHLvgvg240EQZeB4gYmK4H56 MQeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=AVjhkrlooSa49j/77yrXTC8OSQlvKkwhhpXo5rXiWmA=; b=utfj9kAvnBRXrSrdfiplB4nNcKLtSlTgv6Zwb0Aspk6T1sjuj9qD5dz12qFtSWociA djCGa3xwy6cl4lUwRUPaxK48nMfqLrMhglsS+oWWqkz8a0iwVrpL+4GMXxz5TFjmpiOS YE02a3EWABPFnJW35sKSRMK2a8+kVCXP3ncy99V7DGrSDVVDpZkiXWj1cmjlzAs7YY5J 2HittZh66j/dP6oPGo4dgo8mhPCjvnpURTyGQd+mPQ9a/76hFQzypeKrD0u5KnlOOAvN NR7ygaEvtDzqD+bfwee7WR14USqEGuUBUcRUeqr06GFEOvFxZZaaC9VA9UMCTUIEl3QN C7oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VshvgB8q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si189284pfj.149.2018.03.19.15.27.59; Mon, 19 Mar 2018 15:28:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VshvgB8q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032524AbeCSW01 (ORCPT + 99 others); Mon, 19 Mar 2018 18:26:27 -0400 Received: from mail-sn1nam02on0103.outbound.protection.outlook.com ([104.47.36.103]:38940 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933866AbeCSPs7 (ORCPT ); Mon, 19 Mar 2018 11:48:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AVjhkrlooSa49j/77yrXTC8OSQlvKkwhhpXo5rXiWmA=; b=VshvgB8q1jvqezdI78q4mk+R9w78jSnTw3fhDJOmUT2kYOvajVmzPjycXSliNkr8C9IUasSmx8DGEod2l0DR9QUJF1od1ZAhIrhe1k4UN6Zbj32MU8/C8Qy+tx49OHOaMtjQKB5tUyuCnnJh8dlide4bX8EHgVeMs7aBxlrW/1s= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0936.namprd21.prod.outlook.com (52.132.131.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.2; Mon, 19 Mar 2018 15:48:52 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:48:52 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Lorenzo Bianconi , Jonathan Cameron , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 066/124] iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() Thread-Topic: [PATCH AUTOSEL for 4.15 066/124] iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() Thread-Index: AQHTv5mv4RunrjTsbEuVUeIo/U5Kzw== Date: Mon, 19 Mar 2018 15:48:12 +0000 Message-ID: <20180319154645.11350-66-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0936;7:splcnU+hIySVeQYT7SXADarnQjLN8s20hP7q0F1B/aTlNjkK7jYZmGQ987NJdDEv9mGATvhmBfyPMvNFqdTlcnW8xICGNBSTDzIXCjaF5noLooMyWS7smd0BZJSD11QShrJvoLTlE+7NDlYaZz6e21Kkh53CoJBHxEnUYay1LJIqr/ecGC6p9DokyoeCgKEsHWUEDNUWSXqhHT5LX0mkEce2CvA3FrCIdBdgQPxDlbhp1m4Nbl6MEIDa+gUnLfIu;20:pKadT4LP/32mTsO746ia8+1in14dCKL/tINr3nZX1emySCuPXG6uOoo1+jRDHfKmeowiw1H3xtjcCfLRJ4Zafa4tWF7thknzGHcbiHxazyxbfpoJ9j36zkbAQiBhWPjjT+MmHFPMH+mBRaSoVJHLGuftx5F8Vii9YglC3LjXa6s= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a1b9054a-776c-4573-7385-08d58db0ea02 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0936; x-ms-traffictypediagnostic: DM5PR2101MB0936: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(50582790962513); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231221)(944501300)(52105095)(6055026)(61426038)(61427038)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:DM5PR2101MB0936;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0936; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(39860400002)(366004)(376002)(396003)(199004)(189003)(2900100001)(3280700002)(2950100002)(10290500003)(66066001)(106356001)(76176011)(86612001)(6666003)(478600001)(5250100002)(6512007)(6486002)(107886003)(36756003)(97736004)(72206003)(25786009)(6436002)(53936002)(7736002)(2501003)(54906003)(110136005)(105586002)(10090500001)(2906002)(86362001)(305945005)(5660300001)(316002)(8676002)(6346003)(1076002)(3846002)(3660700001)(81156014)(4326008)(14454004)(26005)(6116002)(102836004)(8936002)(81166006)(6506007)(186003)(22452003)(59450400001)(99286004)(68736007)(15760500003)(575784001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0936;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: FVW98AKdPa2xmDodXD527riZOWCm+iBIzwE8QHFJvMWPlOPkpOR/mV9PIPSdRNRAZZpmk8Ksgs96kC1hUyc/M/2yU3rZuZtUH8B2sB0v9R2B+fzFeJemDDMvSE2oR8ee2MJLBUsnE2KAuJFENOoRuUXj4jgeSPV3VjLGonhmwGjIN1GPyk0eVnrwVHSqVTuqWsG1jox9ZXbrKcXjfcmzVUfuXWYCw62z9OwcZZXd7znkS0MG3OaMIgtiJmnAhpA7CM+hsDbuFrrl4RGSBnfw8IQ/vejE8ZR5PJ3kIcelqoa3hb30343Uu7FWl7fmlfW5kEEi0Snm5qytAdMIwKuE3w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1b9054a-776c-4573-7385-08d58db0ea02 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:12.4694 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0936 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit 7b9ebe428266fb7e0a6d769bb3ff3fcb6044b15e ] Apply le16_to_cpu() to data read from the sensor in order to take into account architecture endianness Fixes: 290a6ce11d93 (iio: imu: add support to lsm6dsx driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu= /st_lsm6dsx/st_lsm6dsx_core.c index 239c735242be..812cd25f284e 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -448,7 +448,7 @@ static int st_lsm6dsx_read_oneshot(struct st_lsm6dsx_se= nsor *sensor, =20 st_lsm6dsx_sensor_disable(sensor); =20 - *val =3D (s16)data; + *val =3D (s16)le16_to_cpu(data); =20 return IIO_VAL_INT; } --=20 2.14.1