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: 9913059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 607A7600C8 for ; Mon, 21 Aug 2017 15:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BBE62874F for ; Mon, 21 Aug 2017 15:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50BCE2879C; Mon, 21 Aug 2017 15:35:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C5D042874F for ; Mon, 21 Aug 2017 15:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=uwjySLPmQFAzio/tCjbDyAEzq74HqwEL5eJc90GUn3s=; b=QY7 Gpqnaww4xBx986ex4RbiA5jh+tVBiogYZDn7T1uu5g5GfNmqA9vK+9dzxY4b9+9EhcipKYFrANFr7 +uRBwUK+EEwFdPuYKgpTiMsVoPxjoCaRloc7VeZo8EnKuCNUwrNwsGEjeO2zzUP6GFGY/w6zm+PbX ktPQTCMh8pklILHJ/KEyB5eNajLiw9LfmcO/LLtegBnUSeZnD6t6IFjTlEu8fP1RcLanaoYruBB5R Rw4Iz2IqdphiZnwRzv8dfG31zhXfFMjlvQX6rR97VwQUaMnyjig12VFH5ulzxgYhiETK1VgwIY3e8 5TnQtfW0zfthCZ7Y6WEjIJ5XA471acw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djojv-0007pS-Ob; Mon, 21 Aug 2017 15:35:43 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djojs-0007mP-4N for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2017 15:35:41 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170821_083540_256358_7F3F689B X-CRM114-Status: UNSURE ( 7.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Sudeep Holla MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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;