From patchwork Tue Oct 2 12:16:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 10623589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0B45174A for ; Tue, 2 Oct 2018 12:19:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC28328887 for ; Tue, 2 Oct 2018 12:19:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A03E52888B; Tue, 2 Oct 2018 12:19:24 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 ED39E28887 for ; Tue, 2 Oct 2018 12:19:23 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=kv9cSEvbnroRZDhPfliuT5E1dtAh9r5FsaYexWpbqUA=; b=AsVFxX5gSgzwwN Z5tiz5555l0/QwHYLpQN7JPU808BnpB/F46ZtDWupIQUqxt1Y4Sm4FGZ/vfWadgb17SW3XU1bDhok AwiD5/t7f0OvCoOdpKOum0p27r7gjC8pCAwAACe7wet7kO363DryQeqM6N+tF+BNqJDm6HZ9gHUBM Oq8PE0phc51tsqUIyUXHDKE/6S6KE+Lg6B7RXxuFwVUPWyt+7/ngt5dnO0pmw6xepHH5nbCuz6Tac QG4FgG4aSbKlhoXcQ+7iGWt9kTTlohFiSrkwUivAvujC5gJ+nvD4NQlUzRwP3A6Tjv04HgGiFKkSm 5IB3W95mGNmyWLL6nQwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7Je2-0007DV-73; Tue, 02 Oct 2018 12:19:18 +0000 Received: from mail-db5eur01on0088.outbound.protection.outlook.com ([104.47.2.88] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7JbO-0005xm-07 for linux-arm-kernel@lists.infradead.org; Tue, 02 Oct 2018 12:16:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9A67WAkTuLmWG8BV0N11CTw9aA59LypGUOINHIVf3Tc=; b=P1ghiHMlpAX0OmDwoO4j/QTyCVjQ47XKkDqEdzw7xNsSAvs/Nf2FnxOmQnAqrXz6lGt/jj5/ltWyf3T4bVVzy1biGV7RRUmdf10v55mePaINrDTEH3WYYy6T/8XQniy8aBcXyRgQUK39RVOriW5xcfshz+5OkellvCWdrQrIUB0= Received: from HE1PR0401MB2363.eurprd04.prod.outlook.com (10.168.33.8) by HE1PR0401MB2459.eurprd04.prod.outlook.com (10.168.147.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.23; Tue, 2 Oct 2018 12:16:17 +0000 Received: from HE1PR0401MB2363.eurprd04.prod.outlook.com ([fe80::10fa:841f:d25c:a565]) by HE1PR0401MB2363.eurprd04.prod.outlook.com ([fe80::10fa:841f:d25c:a565%10]) with mapi id 15.20.1185.024; Tue, 2 Oct 2018 12:16:17 +0000 From: Ioana Ciornei To: "gregkh@linuxfoundation.org" , Leo Li , Laurentiu Tudor Subject: [PATCH] bus: fsl-mc: explicitly define the fsl_mc_command endianness Thread-Topic: [PATCH] bus: fsl-mc: explicitly define the fsl_mc_command endianness Thread-Index: AQHUWkm47JDUmoDApkiQYO7wBwTqZA== Date: Tue, 2 Oct 2018 12:16:17 +0000 Message-ID: <1538482550-7698-1-git-send-email-ioana.ciornei@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR07CA0189.eurprd07.prod.outlook.com (2603:10a6:802:3f::13) To HE1PR0401MB2363.eurprd04.prod.outlook.com (2603:10a6:3:25::8) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0401MB2459; 6:iinTUm1bPGDxoJinGDn+QpYDtUltdZQeWDDPmOlZApxz6Xe271Qe0qFeTyCEx1GXOgiaU4VLfuYX/PDTHOnEYFMZIH8pS6sbV7UZ+QKZEqUAtf7llVp+pGSTRUBMFJptak8FPp/lztGpiSKGbX2PlCBxKS+PUv+HJKUxXtrWnFp+02QwaxNPJ9Q7QLUt4F2oMCLjpbLgGnMsfxUI/1ENYYI1FIDWB1ndsbhqfMmzQpNFxQlO7WhoCh/NouJiuirelQbzo5yGjnPFGzorzOzsr/kuKPtWB/XTgT8dVor3SjL0xOnm46dxRmmXdrDdHN5mvgoe1xSxMHsYTof/pP9YpMoWUfezr0EofJUUmlENG7UMgDuhf8lZbeVwavttO8xeXHCUAQdmhmrLWpG6qokTmtX1oXQbpsOlZVYMYotcAKSyvFDuTDFBCdvoGf4RZZ3/TjXLYu9pQM1p46Zye51kKg==; 5:+89yeFpaJ4YE+QWONMN4FeB11PMRDemSS+MGz0NE+PYi28nHB5AdjhyYbx7qG22kRjzHr2FuWnm6j1zYg6AmDbkIG/SXBznIRhI+WAjXsc3uvCcWx8HMmpBXX/CyA+WaMcLwhS/q7ZVJiZNkrN6RrJ5ZiXzJ4LKEtFfVp57oiGM=; 7:tGOsTJKsQVLJ/WMU4am7SNOXjjaAvc0hZKtgQZaMu0J+ErHkKC301nvODLykQU5JX9AVkGjIEyOl4lhoN5XErE4Zcn6aZlKkVSwzQNk7GdXAoDn0P8Cok1CXy/bKEgyqPiWVkdl9AsAOPdM+vdciSkSyQNhP1JOARnMJ/IGDkmaVu6wjq0lZp+hJAamzwz3NECZ7amtupICwSwLdN2x7SlX6FEtAtVizxpL9a8wj+Dt15vqcFmc1TjNw4iRzuZhX x-ms-office365-filtering-correlation-id: d69dd34a-4c8c-453c-8f50-08d62860da6d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0401MB2459; x-ms-traffictypediagnostic: HE1PR0401MB2459: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991041); SRVR:HE1PR0401MB2459; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0401MB2459; x-forefront-prvs: 0813C68E65 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(136003)(396003)(189003)(199004)(99286004)(6506007)(36756003)(386003)(6436002)(52116002)(6346003)(68736007)(305945005)(86362001)(478600001)(575784001)(39060400002)(4326008)(25786009)(6486002)(6512007)(26005)(102836004)(71200400001)(97736004)(186003)(5250100002)(256004)(8676002)(2501003)(71190400001)(105586002)(106356001)(81156014)(2906002)(8936002)(316002)(53936002)(486006)(476003)(2616005)(54906003)(110136005)(1857600001)(6636002)(14454004)(5660300001)(6116002)(66066001)(7736002)(81166006)(2900100001)(44832011)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2459; H:HE1PR0401MB2363.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ioana.ciornei@nxp.com; x-microsoft-antispam-message-info: lqaDMDF5BN+W6fiIUBqB+kuvpGB41csoYiWHboZMEmBuVnRis3Gc6ulCUZYjIAVNw7QzYAap6B/9vmJvnOVtWCGWZ2F0v4afyYC2w/SP/pOhJDcEhptccYogUNhCvbPV7iFLwiLm+GROXIHynCvrMsFJdEC5alYpoNw+cJySYgySandY8/AhiyuKuIjr1n4fYbL3Xw5qhGilBLCJUi8j4QaLIeTDt2hiPe4VPpzb0B3a7xNY4Xck+TG5QgL1kP2pYQsFYQ/1eglqOyf5odeomNEEQIvSlUxdmqOLsCQ+nNlPNAk5JAtlu3epEQN8PwFTbTXpDScQtcxqr01ykAt93Cx0t60OAMOHoRsMpItMsGY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d69dd34a-4c8c-453c-8f50-08d62860da6d X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2018 12:16:17.4682 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2459 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181002_051634_222419_002B53D2 X-CRM114-Status: GOOD ( 12.41 ) 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: "devel@driverdev.osuosl.org" , "arnd@arndb.de" , Ioana Ciocoi Radulescu , "linux-kernel@vger.kernel.org" , "stuyoder@gmail.com" , Ioana Ciornei , "linux-arm-kernel@lists.infradead.org" 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 Both the header and the command parameters of the fsl_mc_command are 64-bit little-endian words. Use the appropriate type to explicitly specify their endianness. Signed-off-by: Ioana Ciornei Reviewed-By: Laurentiu Tudor --- include/linux/fsl/mc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index f27cb14..96c54bb 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -210,8 +210,8 @@ struct mc_cmd_header { }; struct fsl_mc_command { - u64 header; - u64 params[MC_CMD_NUM_OF_PARAMS]; + __le64 header; + __le64 params[MC_CMD_NUM_OF_PARAMS]; }; enum mc_cmd_status { @@ -238,11 +238,11 @@ enum mc_cmd_status { /* Command completion flag */ #define MC_CMD_FLAG_INTR_DIS 0x01 -static inline u64 mc_encode_cmd_header(u16 cmd_id, - u32 cmd_flags, - u16 token) +static inline __le64 mc_encode_cmd_header(u16 cmd_id, + u32 cmd_flags, + u16 token) { - u64 header = 0; + __le64 header = 0; struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header; hdr->cmd_id = cpu_to_le16(cmd_id);