Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5318242rwb; Wed, 9 Aug 2023 02:06:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHU20cm/1S110w7lMRU5ixk+J4gPfs/Sng9NB2hqhNqXikssa7c/GHXn8X2dMTPWk9PQE9q X-Received: by 2002:aa7:d4c1:0:b0:523:38f5:c5ad with SMTP id t1-20020aa7d4c1000000b0052338f5c5admr1791545edr.20.1691571989896; Wed, 09 Aug 2023 02:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691571989; cv=none; d=google.com; s=arc-20160816; b=gl8z6VjHPwVe9UlsMCsfyheCJ6HSRlZAih7ZC40VG3dHRHFATsBL2rBdFtexuQ8pn1 HgnLpOtHAU/RtG3p2AsxTBZAUsKhZXx10Ud8oVZQICGwg+LU66p9+KQLuZ7AU42h0qRb s8IHT4a7kzriJeWvmgyaiKY0t6nLq2bL2agMYsv16ihunYq9Y8HTKvIDq5twTDKQi+JJ fGerKaqqy+UYJyGe4lt21ugUet83LqTX+2JcqT9il0aZozmlPf4X8hdRRJJwkTMr18pZ 1DWmS0cSX6FaDm+rmvmHUnD5fBZXQNElxZO8M5Qw4LrIE5GEqq1tFJpaBvm9ROmstal4 wr/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=/POtGoXxFGh/QREkHtBMWRDqd8iLqkrUnCKRL9clRsw=; fh=U9aMXhC4C3vp50RpX5/W/je1e0oxyhy5HPsCZC8XORg=; b=sRazzF7mYIr2SeuY6cZ8an/38p1lfMiZ8aVeOj606PsE1ebo2MhgpSmSmqFn6ACVZB OUThfNlS6HQLjZ1s+IqBZRs60V5bDQ+iZ4DU7of18Bf59kFq1r0zBxdsRrdd/HxUZXky vM6Ry3n+cEgMx1qFWPMSx/twar7mfvoDNPk3c4LU/PU+hslDGJ0iBfxTW2aSaboDw8zW CfoGIqILpAx/72hIXTwZYWws0Glv9as27xiixVrbvPFkpewxiuPur/662Tqzn87Nxv43 F5wXUJU58U6RqnSBE+Hd0h8gsUWiPIJwCRN6Ut9M6F0ACg/et+iGCFV/owiPWSrNqHJY WJeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fdKionpM; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo17-20020a0564020b3100b0052322c9465asi7212946edb.528.2023.08.09.02.06.04; Wed, 09 Aug 2023 02:06:29 -0700 (PDT) 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=@linaro.org header.s=google header.b=fdKionpM; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbjHIIOG (ORCPT + 99 others); Wed, 9 Aug 2023 04:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbjHIIOG (ORCPT ); Wed, 9 Aug 2023 04:14:06 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EFF10FB for ; Wed, 9 Aug 2023 01:14:04 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe85fd3d27so153085e87.0 for ; Wed, 09 Aug 2023 01:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691568843; x=1692173643; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=/POtGoXxFGh/QREkHtBMWRDqd8iLqkrUnCKRL9clRsw=; b=fdKionpMUm0u6uiYhFl9Oc3nrINpFaoTuD+h0OSD2iXv1RbP3YpyCgehFgaLu4IcA4 JDdhdgU2NLXuazckybostbzHkabIgdce5zuAWvu32iZpC0Hn3Zgd2VKG7Ew9ls/nus6d MFfPT1Qg48u6jK1AQAavOa3739LDp2lCBXRbVunA5ZQIDL9N7hkUAlHq1+W5I5hxbXQQ 23re7bob1P6YXH/HuLbTU87z58ohetX6FJp1LPl3KZuk6fGpB5ksa1CeqiVaNvAw2qED RuXLuZ7zsS8cr3ZhJfXxhZcHIgM1eTC0/JVYfxezEVvkPIt6HDNdpwky6H8Iz5HCovW9 KyTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691568843; x=1692173643; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/POtGoXxFGh/QREkHtBMWRDqd8iLqkrUnCKRL9clRsw=; b=T3HYpJN1afMKNz8byTGXl/5ilCP7F0tu4c0ppnsJ8NlCazKH4ldZfRLsc3WyjdrrXD O1Q5/fDWT2XjyQqYPv3nWxBXW+HkmOwAyUWMt2M3ExH3Yibd+Z4gG84LCL0Lcj++wWy/ GxdYFwTkXS6fHXZGGhFMU3xJHunRQv8jrfTDvSDNO5V9veA1rHRuZ37rLF2MRy8ftJkH pW1nqyBK2wg221ITkdmqqv1TPQoIY0+eEQi0yGOjnP8u5u/JhiMEvRXlKXxYMoXRTd6A b43xC4rOz7Df+gM7zevAWUqdhBXQk2Mw6y515fO/I7nWwc89hJj0H70hmc1nFNJA+ZeZ Akbg== X-Gm-Message-State: AOJu0YyQ+P/r1XW+C3bYuEUvb7gvwLCwrvVAC+xxHthuguhVDx5HaXX3 +s5kbavVGk6NW0UAyhHgEE+s/A== X-Received: by 2002:a19:6457:0:b0:4fb:81f2:422b with SMTP id b23-20020a196457000000b004fb81f2422bmr1300289lfj.54.1691568843022; Wed, 09 Aug 2023 01:14:03 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id w12-20020ac25d4c000000b004f84a92ba75sm2196916lfd.65.2023.08.09.01.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 01:14:02 -0700 (PDT) From: Linus Walleij Subject: [PATCH v2 0/2] csky: Convert memory accessors to static inlines Date: Wed, 09 Aug 2023 10:14:00 +0200 Message-Id: <20230809-csky-virt-to-phys-v2-0-2697c93f60cf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMhK02QC/32NTQrDIBBGrxJm3SlqFtqueo+SRfAnDi0xjCINw bvX5gBdvgff+w7InslnuA8HsK+UKa0d1GUAG+d18UiuMyihRmGEQZtfO1bigiXhFveMozPCSq2 kDDfou419oM/ZfE6dI+WSeD8vqvzZf7UqUeBstdLBOB9UeLxpnTldEy8wtda+K4neDrMAAAA= To: Vineet Gupta , Guo Ren Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 This converts the virt_to_pfn and pfn_to_virt macros into static inlines so we get proper type checking on the pointers passed in. Signed-off-by: Linus Walleij --- Changes in v2: - Fix compilation error on pfn_to_virt() by more casting. - Return const void * rather than just void * from pfn_to_virt() - Link to v1: https://lore.kernel.org/r/20230808-csky-virt-to-phys-v1-0-ac727f8def2f@linaro.org --- Linus Walleij (2): csky: Cast argument to virt_to_pfn() to (void *) csky: Make pfn accessors static inlines arch/arc/include/asm/page.h | 2 +- arch/csky/include/asm/page.h | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) --- base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 change-id: 20230808-csky-virt-to-phys-3d80c17211f9 Best regards, -- Linus Walleij