From patchwork Thu Apr 6 01:07:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13202761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ADE95C7618D for ; Thu, 6 Apr 2023 01:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=6M2o0jR2QpvjJ7VaINcyRqXOf3lAzBbETG4Gh3KvS5I=; b=QjusbOtkJFV6A0 Sqe3j/nQJ82zW6hegj6T6WN3ERDEHtiAHj/CAlofI/29nY8Mp47XkiXWkyJJ4r4rhfq5BkIKNI2Dg RZjMPdLoOgctxau6ODOJIpgjHSCf544IZMDYe15tkvEuiONpmU15HenvWqQ57K6dkeWiTGZm00CE3 p0Ink+UV7ZwgtpFynlrZV1C+YVMUa+tha43Xml3czRI2nrRAsBjDM/glY/cTfF7mkSeXxKt6+FvYS +0FWYCiJCLJkB2RqkrN+XrLNnof5nCj+LlAaMiRI4cNMaohenxafk6PYLCRIIrgz3/7hy+proP/f0 yyO5BI+vLt6v+KdHSzHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkE8y-006154-0J; Thu, 06 Apr 2023 01:10:28 +0000 Received: from mail-oo1-f52.google.com ([209.85.161.52]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkE8u-00614I-2O for linux-arm-kernel@lists.infradead.org; Thu, 06 Apr 2023 01:10:26 +0000 Received: by mail-oo1-f52.google.com with SMTP id c17-20020a4aa4d1000000b005418821052aso165757oom.6 for ; Wed, 05 Apr 2023 18:10:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680743422; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yFesBBHzxWYkEFkum0aSO7GPX9U9Sjvp2fw545n6LzU=; b=qmfaPjoehL67wh5L4gLm4hwUMou4iJ+Iae0mCw0rIdD/zw9pl8/HS7BTs6bqZK9/wu TKgIGSEM9JZ/N7mFkC+aVxVmSJV0UVL1U9tEs21M1YZ+jrbhS9LA4Wsx+kVRxO6xKc3e PczKSJomKajIO0FK0U6ZqJbHRfGSJJDVnFe1qITuAMFuFPrXraNrpWlcR6XVtOeBDrV5 WgJWyaK3EIVeMUCwY3sUfuATayebo+Hac2C3Cqmhx4J8KxqJJbjWbuvlY5b5E9EkMRji QPt2wvpzhGtYcf5cCslA+MT1/pJtTBD8mxQEch3PBPFRPlRIJUGwj3MiQk5jNON8dsvb V2rw== X-Gm-Message-State: AAQBX9dIHFvUn9RLxCyk5OKNVNHfsun7cG8C5B/ryFtMWr4PGORBZA2x W7XGTr6ZSR/3YJRxTFLpoQ== X-Google-Smtp-Source: AKy350YufB0TmW8MSkABr7bePEAyAYrEhMD25kHeSFMvJDktSVM+1U+1hLzbkaUAJZjOf6Ky2ey5Ig== X-Received: by 2002:a4a:4542:0:b0:536:a65c:12d0 with SMTP id y63-20020a4a4542000000b00536a65c12d0mr3768416ooa.8.1680743421844; Wed, 05 Apr 2023 18:10:21 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id a4-20020a4aae44000000b00524faf3d2d7sm7344838oon.41.2023.04.05.18.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 18:10:21 -0700 (PDT) Received: (nullmailer pid 1296695 invoked by uid 1000); Thu, 06 Apr 2023 01:10:20 -0000 From: Rob Herring To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: mvebu: Use of_address_to_resource() Date: Wed, 5 Apr 2023 20:07:38 -0500 Message-Id: <20230406010738.1269781-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_181024_778125_801D2E2F X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace of_get_property() and of_translate_address() calls with a single call to of_address_to_resource(). Signed-off-by: Rob Herring --- One more to add to the prior series[1]. Though there is no dependency and this isn't for cpu nodes. [1] https://lore.kernel.org/all/20230327-mvebu-clk-fixes-v1-0-438de1026efd@kernel.org/ drivers/clk/mvebu/armada_ap_cp_helper.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/clk/mvebu/armada_ap_cp_helper.c b/drivers/clk/mvebu/armada_ap_cp_helper.c index 6a930f697ee5..e7005de66327 100644 --- a/drivers/clk/mvebu/armada_ap_cp_helper.c +++ b/drivers/clk/mvebu/armada_ap_cp_helper.c @@ -16,15 +16,13 @@ char *ap_cp_unique_name(struct device *dev, struct device_node *np, const char *name) { - const __be32 *reg; - u64 addr; + struct resource res; /* Do not create a name if there is no clock */ if (!name) return NULL; - reg = of_get_property(np, "reg", NULL); - addr = of_translate_address(np, reg); + of_address_to_resource(np, 0, &res); return devm_kasprintf(dev, GFP_KERNEL, "%llx-%s", - (unsigned long long)addr, name); + (unsigned long long)res.start, name); }