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_); }