From patchwork Mon Jan 9 13:11:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 40854 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2148107wrt; Mon, 9 Jan 2023 05:14:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXv0Zlc3kWrlhgEck19W8k53dQQvnU00CGDz7uP56ajOlIl+e90U3oSpkTH8U858uGaa2wv7 X-Received: by 2002:a17:906:60cd:b0:845:bb21:f638 with SMTP id f13-20020a17090660cd00b00845bb21f638mr50993385ejk.75.1673270061859; Mon, 09 Jan 2023 05:14:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673270061; cv=pass; d=google.com; s=arc-20160816; b=DWouYyDXy4/7C45oCQazNZ/5n5J3SiulM3bJAo58AetMmF7qGYcOxXDVHHwWQvshJB mIo2u6J9f6B6RQPjejIpKgKsJ82BuAOAF6yo0xJPrKmZN3kIXz2pP6jm/bKxnxTr4zqi BI2ZuJBFQjkTAU9MyAD3C5jI5StP3JN9m8WoQa7unD/Fk9rWhsY+usAjTSR4rdPlZVUF W6ejpCSnJ6nA87CBWGKqW0U1jLnJvZ7tm9mH5jMPLh/CCvBCbugc7hrv9b7N0VKLYS4Y jUBF0YagWEYAZT1kzTBlRVGXyrawFPZyz3HEEkPY5tW16lUdRFbaNPXDDP7csxrm+cZ0 y30A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=LR56DzMllJI/Ux2S7RnEyg77ZM1RzFADhxp+m8xrjRs=; b=LI85DCbLliUD9diSBxhEjluIbhjUyWP8jwUWG3/nsxepHPx7r0bJl9oJYHPPVM8tpC aOWCLIuiTmQFfYzttGXhHqa1Dz514pS9ZgmoYI7je24VV5Hx3/ac6tv4N4hzMqMqBfoP M1l96sEbn0/bwcGhPYshptm3d6S4gQiD0QvsNQOuVlJfTFYiB0G/xXUGA4vx8uLJUeaW WB4KI3bLttHxHfcsvUW0C3I+WvT0gG8TwAHYoLOWp4YVpGStnJLquFLmp4OdkLwXmnNh gHCQ22o6x7OD+AtsUaPV3ifTPJfbB/CeF495MlGCKWI3rQwMTRrcNeH1n/xAGANIOux7 zS9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CNSBuyz+; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd8-20020a1709076e0800b007c4fb003fc0si10547952ejc.99.2023.01.09.05.13.56; Mon, 09 Jan 2023 05:14:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CNSBuyz+; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234329AbjAINMX (ORCPT + 99 others); Mon, 9 Jan 2023 08:12:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234483AbjAINMK (ORCPT ); Mon, 9 Jan 2023 08:12:10 -0500 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2071.outbound.protection.outlook.com [40.107.247.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC9E6CD6; Mon, 9 Jan 2023 05:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JB3JzWCxlgloFNNyH7L6wLiOOcKzQliFshKW46nz8XNl375p20j1W4JDR7OfbnZxbWKRwROgrmbAuXe/IoSyfyDcszbLO+wtZ53v8/6VLiIpEzbWiOTxfhrkFgtIzLYo6fI17ifX73wccpeVJy3TlA+EH4zeutECtMgbUXb46OTPFPiHGM9ZiK7CdHiZXFQrUBC1eT7KTaj3q7Os3/2eR50MpYq796Mrd86AqrpOuwKZFqniE2wyzPJ88LkW/9sgMnflYt2xScgsvznw3JS/J0C0zg+sRWYWNLHUhZp/sVj5yDS+/nFrpNeonEu7KcoFzEB5pMN/rvrfFlq8EDLxYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LR56DzMllJI/Ux2S7RnEyg77ZM1RzFADhxp+m8xrjRs=; b=VQpiO7Qmgl1ZIZhBNqHThAFsuoJF8CmZ5XgHwiE9/ABdn2WANfsTK9CVouv6y2d5p2CZjPHN3IEphin3B1gGhpaJhh/aa5Z9CmJFPa7qcKOSHmXXgd4NBGLID5R7P9H2fw8bDCHgZiGRrImfoJn+nJQvdDBECF/WHXWb8QPPDaxBx/ROaCd7f+k/XzAQ4MA76RI7KlmkxbaQM/wJcJRLenPZn4SAv15V3wm08fceSEif/4t/Lp5ggrxmrHGBz0jng4aXuVnZrq1l3EkDloBf7NaAS604D7Ltp3sazUS9RoUu3GCisYDuXNlPOgQQ4DltmfNg6gWeQjdSIVQnC/jsfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LR56DzMllJI/Ux2S7RnEyg77ZM1RzFADhxp+m8xrjRs=; b=CNSBuyz+6J9hceThh1VEDi0g4GloKQ+TuF0bCEubOUQPwHx6D81N0wfiNX2hSee0k8bN9cmeY0ugjZDRsbUjHsWuaZ9KCfm3B/a5bHpc66ZZNyPa3Nb578I7NILDnS+SIC6RBNE1OWjdyCEzeU8tzk+XrMxVGKt2OUQrmQrI2ck= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by PA4PR04MB9638.eurprd04.prod.outlook.com (2603:10a6:102:273::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 9 Jan 2023 13:12:06 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%4]) with mapi id 15.20.5986.018; Mon, 9 Jan 2023 13:12:06 +0000 From: Vladimir Oltean To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] asm-generic/io.h: suppress endianness warnings for readq() and writeq() Date: Mon, 9 Jan 2023 15:11:52 +0200 Message-Id: <20230109131153.991322-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BE1P281CA0120.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7b::7) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PA4PR04MB9638:EE_ X-MS-Office365-Filtering-Correlation-Id: 80113943-9b70-4108-674b-08daf2431b2e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UciY55pYLLfqx9A4YHAvvbJcr0XHWYwOkZQ+1xuyg2rH/xcz9wkNK2SR4VUm8L63vGOlpQDu4XJF7SfobBpUGXfuoQzANq4k0gfqK/OxI76EDRfcdIkYgp64cHhrlrkurSDETWCwCBn00R5gwO49cMwZUpaqTaxXOC5yDxvhz6alx14UzIhsrpG7r3jMgho0ggtjROkF/u4uIf5TCmIsiHyfXKad+GBdXTdtTWNPIuOj1ipnDXroOZaeqQHEN5ZIz+QcrdwaqHLuOQH3hbrSHXC2VKVhNJUjYMH9Tr7AXPxnDKdWkeVNzhb3PxuyH0GtwUCvD7ztmEHYy/nQ/+CyhVtaVhHzJNV7f5IKB4+EaE6UyPGEBNOnryoRqeDEeNYlWzA9QVsc2yTTYVqHYEiaNmWBTXp4SIsBlhE3mXjybXxiGIN0gGlVik/T7tlfG/Lsubt61k4mADiclAXKcRaYI1LfGUADChXEn3gHo6DP8AL9RJ2n5FjRt1wvQqpQbg5h2/mi3KJIB3yLd5UUmXsh/kBbLwScaR2EXjyPGDlUfohRLC6VQ3DwCuXeSQc30MCKsFaeYsQMxOEDrHiVsD0VZHAZXREPxXeOKBZPGLHwm80fux83Gd0CYgwoblqgufFRAd3S4zUMRz3A95NGkP1qW0ZRqC0LoWFsmPaARaN1J+JPZZM5JHPSBbNesVOnhBSRAxFvoxPeZ6xg1jZhtkb3IWoy38UBQf7nRbJ0sJ23cM58ekbdWJYsZlDrCQWJt8OY X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(451199015)(2906002)(44832011)(83380400001)(1076003)(2616005)(66476007)(66556008)(52116002)(5660300002)(66946007)(6666004)(26005)(186003)(36756003)(8936002)(6506007)(6512007)(478600001)(38100700002)(38350700002)(8676002)(41300700001)(6486002)(86362001)(966005)(6916009)(4326008)(316002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nFjY3OwJvPfJcOVsRF4utLy7g1nPE6jbSGyF8FsR/ksbbINJw7D/AKMVmwbqq/yBGZs/PRGLkPtWtVmqjci4Qpz4kQl7zkfutvFRYggEdHXoWRGDeqv1U2XELd9TuRHIBGIKOpti5p0tfvZgsLcXB9OcLq3Qce/H5jC7Dl0w9GCmOPEPug6rxmxdbCEvQ9lH3tLa1GCd8NwDeESg/RiBoFo1pWXf3ctb+/mu6DaOPQbySi4C9oj1iTHAG54utjqcVmqmlz1Db2a1iI0vjBjLlf80ghDTSsSaMC6BNRVIonzhnKlxWHeqJoUgvJPL20u3+u/jxA/XKkVtWdblBmcKK+FKNVTDAtTsVny7XssCdaTiW9Hp0iSJJHY9s8l9W9Q2l6jbM0zSW7uiw1OevHLY0fTobTv8pxh1w9DvOuaDr2akLcr1dq9o3OjHCUdfE4efRv3kz5o3jD4VSuYHjSIoJjckTWSP11o4xaWD0xhylBHBFIEyt4PRDdIvHZzd+Cw5XTaTMZ0l7RGcIZZjB76GZIgWWt9VsEin3IrNN26joJOO9qhDJoI5o/5BB8W5/lDLKMcDVu8Va29uyhmCdNebx0RrJq/CGQyLkUAj32XnjgOItW5aW/LkYYmUkc0nCVNPHBIAgq+mfYpIXW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5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2023 13:12:06.1602 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y4h+lLeacRMSeURrOk/0mcr3mm17st8Bg0d480aA5tKTkSSzHkAwgY7LHxhjr8rcFGfcSXWwK0Kv+H4HHw8QZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9638 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754550828342028203?= X-GMAIL-MSGID: =?utf-8?q?1754550828342028203?= Commit c1d55d50139b ("asm-generic/io.h: Fix sparse warnings on big-endian architectures") missed fixing the 64-bit accessors. Arnd explains in the attached link why the casts are necessary, even if __raw_readq() and __raw_writeq() do not take endian-specific types. Link: https://lore.kernel.org/lkml/9105d6fc-880b-4734-857d-e3d30b87ccf6@app.fastmail.com/ Suggested-by: Arnd Bergmann Signed-off-by: Vladimir Oltean Reviewed-by: Jonathan Cameron --- include/asm-generic/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 4c44a29b5e8e..d78c3056c98f 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -236,7 +236,7 @@ static inline u64 readq(const volatile void __iomem *addr) log_read_mmio(64, addr, _THIS_IP_, _RET_IP_); __io_br(); - val = __le64_to_cpu(__raw_readq(addr)); + val = __le64_to_cpu((__le64 __force)__raw_readq(addr)); __io_ar(val); log_post_read_mmio(val, 64, addr, _THIS_IP_, _RET_IP_); return val; @@ -287,7 +287,7 @@ static inline void writeq(u64 value, volatile void __iomem *addr) { log_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_); __io_bw(); - __raw_writeq(__cpu_to_le64(value), addr); + __raw_writeq((u64 __force)__cpu_to_le64(value), addr); __io_aw(); log_post_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_); } From patchwork Mon Jan 9 13:11:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 40855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2148302wrt; Mon, 9 Jan 2023 05:14:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXvE5RI4IUXHjrAp0+ctUfY5UIJStf0ClMXnUaFWv3T7bY151BlpLLBFGTAYFWe/dTrbFLwq X-Received: by 2002:a17:907:a50f:b0:7c0:d609:6f9b with SMTP id vr15-20020a170907a50f00b007c0d6096f9bmr60440850ejc.27.1673270084521; Mon, 09 Jan 2023 05:14:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673270084; cv=pass; d=google.com; s=arc-20160816; b=kDKokqhhnd3ylXMnQ9OemP/S8YaRIVXjgugzjA97oy/oBGjOTazN23TcsHiFr8LWe/ mTXYxI+umX7og/Nf4gyH28vHHh1dE4INlI3FKmOcdu4eVBZbqC4FzPQxVts3UCle5ZNj z8HOL0sjxMSYBV4TdJrTTjHZgjjGb9XSe1+CfOke9MBj3osmaIKeh3BLLwPIMadhE+p/ EiYQTIHv6SuF8eurUn/P/5ItaVhhNSPVSgEn0ml1AGW12harc94VnoL/b9zas8WyCxdn xi7IzIsiz7vDTRL1VovlxtEpwUeRs7PuYBbKNjFFDU+hjqC0Vuk4vTb7hHut/QBVz4DV J/TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YsmK1XOQRRUJqPdMUYL84c+DpllXPsEMLjtEDxLIl3c=; b=OntkxP93WCpIt3a+TOTqmkGRS4uVgJsxU6l2TI1t4A5/BzMxvcH7RjJiVn3gMpmA/A VaarufeSbE08oDqR7GLXsBg6hvr/r9tkgWteHjjYxpP4Q8QD6oTneImbf2kxsP22fdlM Wjb9WpeNFTSC+xoTgRZ23Rixo1hj88l96p5T8/0H6cxXQadFGGqmGwipIygpSs8P7ZMB 0NHpEKzy6gfVcfR5OlWkOJTMnsfovqgDvYOlB/uNZ4NzLTkReXRu8G6s9wHX4ApBXxif XRuhdOX2Eq13q3L9z8QZEQRQ8pr3ZqzKoNMP49dvpLIMPPcwkqf+01QDoRLDOBWFfz7O Ul/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=jQ62VcPw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xe10-20020a170907318a00b007c0a7286bc3si8833141ejb.741.2023.01.09.05.14.20; Mon, 09 Jan 2023 05:14:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=jQ62VcPw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234203AbjAINMq (ORCPT + 99 others); Mon, 9 Jan 2023 08:12:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbjAINMM (ORCPT ); Mon, 9 Jan 2023 08:12:12 -0500 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2071.outbound.protection.outlook.com [40.107.247.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B335323; Mon, 9 Jan 2023 05:12:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DfyMco7ufPfHQ6h8VKqI+SBeXmH44pLnek9dJO+ZRWlVtdXuMfjcy1+ltvzZX3UihYEyha9h/0v5g161XknqLwY0P/ZvnhbRNL2/bQfT7qgISro47bQTAYCCsbMHq48Y5JlTAsEs1Y6LtUpuOZw+g9f4zUQeoPAlRaiH0k/VMCHWwRGrLYTAveuK/JHMQBFt3Wc04Pzd5L4HBVhu2XlUkm9W/0eICC4j+hfibjj2KZSW0PNHf2BFrWp2v8UIJ+fa63iluUQkw5XYsyWaqynQNRsQGAGiObpZ4koyxai0ZJIhXb5buEqDOKZDnS2ewF4FqN/ewFAFjJ0yCOkPsNNk+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YsmK1XOQRRUJqPdMUYL84c+DpllXPsEMLjtEDxLIl3c=; b=exlh35RKM3DEobQtqWoW2sPmmnpt4iYpz7ov6mdQFejb0t3ljHNZmCZKB5aQzW2hh7MCKV5sx8oiZtRZ6kZp+lHyKd3xFcW0WyWEYvOgVKbNNFdjyDYwKqP0PYmQRFJmwiikMAfuXyQNaPPo9gok5GmEnLBwVRfjhmI7m58My2ekQbB3oxPu867FJH5y8q5UCbVA2Ypmdf5y24vnRUajP1dluCh3zCL5nSmxcQKK3lexqztl+5/OB2npwO8r79P6+BAw01tkGqB64o73QeHZX0Er+ZhNGI4BvxWdBggq5zkSjUEo9Yr44zKLR8YuzueNholjCDXlW9X1b50t4nvV8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YsmK1XOQRRUJqPdMUYL84c+DpllXPsEMLjtEDxLIl3c=; b=jQ62VcPwnHuJQaBXeqOLJSgi1tGRRyoa4hTFIgueg88d10CgsfO2HkDQNcKiGa9CiMcvq+eWHzgNytGq0nMSN+Q6/CRQYvzG9x+cAUe5Y/Wouel0ZxMhnNxmFyN8dM4Ka6FQS5vX9kjr5cZ3xnY8a8s6nbGP0albYmwzy4Tprh0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by PA4PR04MB9638.eurprd04.prod.outlook.com (2603:10a6:102:273::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 9 Jan 2023 13:12:06 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%4]) with mapi id 15.20.5986.018; Mon, 9 Jan 2023 13:12:06 +0000 From: Vladimir Oltean To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] asm-generic/io.h: suppress endianness warnings for relaxed accessors Date: Mon, 9 Jan 2023 15:11:53 +0200 Message-Id: <20230109131153.991322-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109131153.991322-1-vladimir.oltean@nxp.com> References: <20230109131153.991322-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0120.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7b::7) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PA4PR04MB9638:EE_ X-MS-Office365-Filtering-Correlation-Id: dc38df14-1bf0-4fce-ea83-08daf2431b94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 25a9XaN9MBHPo1VQUGfBMVRAnRu2zw3qyYLnjMGmK2eNlCJoWlTLH+eBCyadDTKhX8Q5NqmhG41rZ6wiGuwqxg3AWHGpUG2Vrt5F3GOPbFVlAC3pH6IOOR5a84IRhRuNQq/XDzIOBFjcXG3k7WY+2ww0+sov0Ic0pReG4kT49a96CJ73e93AcpA9Ndar6UpvQfIMyoc8czFb3Mkao2YOJGswu1mCS8HKXvEPvtB2ptM9uR9CJy99gpTmykHtTL9Q02ByYrCS0vgpdcbrzVu8rstBWsySmRX+qCjJz+ciZRWI6rj6TxUDVpCTjuptOcusUFUw56RUegj+PhtvTTbyzUwNQKwzOXVMyX6kCDil+3WMn4snocRzE7MlY9InH2ZjTx9eZpzCXdAYHbWm+Go+C+KAOxKohO6R5fRQ9fDfO/xK0GopAHEAXk/CuTGTEfxOhSe8PAjtAgU3QimVJwiZfEM/TwC1JB62Mx21dM1ap9mEjRE5HDvSZK9yQwSxP/WyKNd6HL1dmHhXLU4MRYDHxc1l9glnJw35kCP5l7NJrV3OR1JvHnh4brQJoqusg7i3FNfkbA4Km6RnP34LPGgWrR5pcCWf4/cb0JTMQT3LpgmLgWhZV+1NNonKd9E6FPK2hxWz2SvrYQ5b98p/N86SPiiFXXdc/VNUUQ2gIMkHyVO41fE4lGZ88Apjh61tRkSlx4Khk9kDjq6dkCOQctiM4d06MZm5V2GnRbibo9EZyRg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(451199015)(2906002)(44832011)(83380400001)(1076003)(2616005)(66476007)(66556008)(52116002)(5660300002)(66946007)(6666004)(26005)(186003)(36756003)(8936002)(6506007)(6512007)(478600001)(38100700002)(38350700002)(8676002)(41300700001)(6486002)(86362001)(6916009)(4326008)(316002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r2K+Ws1NHVvOkDDSLHtftVf36RYco5FuIj9wNkv77uTst1kI3UDwMYD+feYQqwzIDtpSxo9Z7xE1aPQT/uFRZomE1va6p4qh/GRF8wfac2PuA78uz6f6yBFZcUatQQRzJSRAX6HRllcUa2hHu8JSx2Cv84OYPlLaNMbRDNqARG2p6wlCYP3rka7rEufKUSgXrN8qLQF4lUIiykHb5He348/ipeLEI+vBYjKH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lEGVbUlW4T14EAKtcowcCj/s5aN/9dkdRoa46kqESHpdLkMJaWbIsQLVYaqO9vgxnZr68PsP4nlDkF7bkzBkbOlnb0cx8qjEbDdoQkDCGrBV6T0xEMKIOtJxdOJvM9zlLTLoY9n2JamaAicd3TyUqUs2g1Bvuvat/1iIyVkT96K+uUpbze0Z0Qtj+OpACFGgkMZZQzmIpPZ9H+5XIsKFp/1yZgtw14RXKPT8xZt590PT9A4CZ3UB/PSbCTAmNNM7euZ/fBa2McbWpTMWRbdkJVlGh4rTfNkCIloFr4LahRbA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc38df14-1bf0-4fce-ea83-08daf2431b94 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2023 13:12:06.8477 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CyWa4TPji7gO4rbEagJBCJ8ebbLuCbXYvHsN2JjTiR7DNjD1tTAa5Xq1x4Zhoqszpf+Pzmc+Tmrm2RNoXRJl2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9638 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754550851899853570?= X-GMAIL-MSGID: =?utf-8?q?1754550851899853570?= Copy the forced type casts from the normal MMIO accessors to suppress the sparse warnings that point out __raw_readl() returns a native endian word (just like readl()). Signed-off-by: Vladimir Oltean --- include/asm-generic/io.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index d78c3056c98f..587e7e9b9a37 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -319,7 +319,7 @@ static inline u16 readw_relaxed(const volatile void __iomem *addr) u16 val; log_read_mmio(16, addr, _THIS_IP_, _RET_IP_); - val = __le16_to_cpu(__raw_readw(addr)); + val = __le16_to_cpu((__le16 __force)__raw_readw(addr)); log_post_read_mmio(val, 16, addr, _THIS_IP_, _RET_IP_); return val; } @@ -332,7 +332,7 @@ static inline u32 readl_relaxed(const volatile void __iomem *addr) u32 val; log_read_mmio(32, addr, _THIS_IP_, _RET_IP_); - val = __le32_to_cpu(__raw_readl(addr)); + val = __le32_to_cpu((__le32 __force)__raw_readl(addr)); log_post_read_mmio(val, 32, addr, _THIS_IP_, _RET_IP_); return val; } @@ -345,7 +345,7 @@ static inline u64 readq_relaxed(const volatile void __iomem *addr) u64 val; log_read_mmio(64, addr, _THIS_IP_, _RET_IP_); - val = __le64_to_cpu(__raw_readq(addr)); + val = __le64_to_cpu((__le64 __force)__raw_readq(addr)); log_post_read_mmio(val, 64, addr, _THIS_IP_, _RET_IP_); return val; } @@ -366,7 +366,7 @@ static inline void writeb_relaxed(u8 value, volatile void __iomem *addr) static inline void writew_relaxed(u16 value, volatile void __iomem *addr) { log_write_mmio(value, 16, addr, _THIS_IP_, _RET_IP_); - __raw_writew(cpu_to_le16(value), addr); + __raw_writew((u16 __force)cpu_to_le16(value), addr); log_post_write_mmio(value, 16, addr, _THIS_IP_, _RET_IP_); } #endif @@ -376,7 +376,7 @@ static inline void writew_relaxed(u16 value, volatile void __iomem *addr) static inline void writel_relaxed(u32 value, volatile void __iomem *addr) { log_write_mmio(value, 32, addr, _THIS_IP_, _RET_IP_); - __raw_writel(__cpu_to_le32(value), addr); + __raw_writel((u32 __force)__cpu_to_le32(value), addr); log_post_write_mmio(value, 32, addr, _THIS_IP_, _RET_IP_); } #endif @@ -386,7 +386,7 @@ static inline void writel_relaxed(u32 value, volatile void __iomem *addr) static inline void writeq_relaxed(u64 value, volatile void __iomem *addr) { log_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_); - __raw_writeq(__cpu_to_le64(value), addr); + __raw_writeq((u64 __force)__cpu_to_le64(value), addr); log_post_write_mmio(value, 64, addr, _THIS_IP_, _RET_IP_); } #endif