From patchwork Mon Aug 21 15:36:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 110558 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp4212444obb; Mon, 21 Aug 2017 08:35:24 -0700 (PDT) X-Received: by 10.84.229.3 with SMTP id b3mr15258884plk.164.1503329724268; Mon, 21 Aug 2017 08:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503329724; cv=none; d=google.com; s=arc-20160816; b=ef1qzEIDzuXvUJX0FROocz+uGtVtMMZeH4miOmdE/HVQS3vRUR4pHVMk5oktSJIP0S C+SYqXbxhWJ4yPFsjbeg5oFUgbf+mDxKe1NZNQz+QACcDLjVaLaJRMKVkAFEaUNTfZv8 RBxoQVr6/eGJKwUROt8bRrqd0unMLuZ2OrQue9U8nCT9TDGZhj54d0NemIcFlQX7lpfe Wb4Oz8OVi09arUt/faoHtzickrRnlB1KsKCD2vfzyAz/zOUCDGXmJ6feLJhrDTaZZsfF u4ozMYESk6Ml3KR72EcEFHBFZMDGuA4bU9vbK/nXYXFqkvzg3iT95F400qhdXzdpoTn4 bg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ysHbPJPQ/t8NwComT3IhQO10ycR1l1Jj0rQz3mCrOPw=; b=IO6RreUmm6pB1JtcTEfa/2kVWuQwBHd34XQ3R1qAshFR+ghVDWJ33TXZ9uXtKE3hPC IS4plKlTm5BjC1cOVa8Jvw/dYwsEsSL7H6kZOqDV7MSyfIB3qedLkBPUhuay7iudv7h2 z1wJrK3yQl1Du+rKfYU/yyFXuJaRbAcwla3wel4BjjD8ORvECpxbziBFI3ECyCnTl+E5 NUtueahBa7rfuE8e44yEssmsSi613S3luLCJOfJa65d6C8gYRGenaUFsfYnvDulN8UqR dKfuIanKCme59PbK0MW8uh1mBm3mkLSr9i5qhQgzpLkzM0diLsRYKmXSgNDACohUYvTP SSHA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n187si7346258pga.798.2017.08.21.08.35.23; Mon, 21 Aug 2017 08:35:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754380AbdHUPfW (ORCPT + 26 others); Mon, 21 Aug 2017 11:35:22 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60104 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754017AbdHUPfU (ORCPT ); Mon, 21 Aug 2017 11:35:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C911A2B; Mon, 21 Aug 2017 08:35:19 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D377C3F577; Mon, 21 Aug 2017 08:35:18 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Sudeep Holla , Arnd Bergmann Subject: [PATCH] firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set Date: Mon, 21 Aug 2017 16:36:37 +0100 Message-Id: <1503329797-5909-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org scpi_device_{g,s}et_power_state correctly handles the conversion of endianness for dev_id using cpu_to_le16. However dev_id is declared as u16 in struct dev_pstate_set which is incorrect. This patch fixes the endianness of dev_id in dev_pstate_set structure. Signed-off-by: Sudeep Holla --- drivers/firmware/arm_scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Hi Arnd, Can you pick up this fix for v4.14 directly ? I can send a pull request if required. Regards, Sudeep -- 2.7.4 diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 8043e51de897..ab52f1bcd277 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -357,7 +357,7 @@ struct sensor_value { } __packed; struct dev_pstate_set { - u16 dev_id; + __le16 dev_id; u8 pstate; } __packed;