Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2454619rwd; Fri, 9 Jun 2023 11:24:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zgiKqge+SJQzuoTvrmw/fWkyqmbp1SQhs9OBgUIs6hgs9Ovg0PfsCrE4puGcHJo5jwnnr X-Received: by 2002:a92:d901:0:b0:33b:94d:b613 with SMTP id s1-20020a92d901000000b0033b094db613mr2027540iln.11.1686335093941; Fri, 09 Jun 2023 11:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686335093; cv=none; d=google.com; s=arc-20160816; b=cur6c0GpHtWuffNT0W3d7AQex5/HcIapJa8V6sLjMzmgN9FrnVXj+oO0vwkCQ7WccI C4r1hM5Rkpo2HjewgpScH0wCQ4Iai5GktolRkp4Wdip26Lo3ThbuF3BvcJWnXX2svJ3H fHSY9IdKaM0lEJH5Uq71pHEE/zuv0r4BGIn9Md4lH9Pbwz81jVVqH3eirQMUx99M9HUB B9F67xExg6grvsz1IF9wfPiUvayvPtOW9xhoLrflxlDm8UqfG3DqlhS3czHGB2vz7KHs J/PRI/yC6H1XN8wjYsJpY/E+bpxX0H3nbq2AzLW1FVbBaZkWNnuP3y0iYw/MwwYuum2O lfDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=wUoI1otyq64V4OASVoH2qZ32EO4bebljBzF+Ld6+3L8=; b=aDQthggtZlLZVqblJ8+05YZ23Lcw3E3LdAqmDB2I3oD9WDyrwtuoczycwSWP/XpFtS whzjfW6U6shgF2OSEdgEL4jvjDMVbE8XASJrzE4f+Io4Q7RQEUb2JV4rP2eSkSbIo2KV QNF+ovsIUBKBpT1VnWaQkjvdcvsIThjetDDGGFvXDBrIva4dzEJd6bY1uF7Zd6LuAQnC kwJRyIPDB5YzGzDeIolwludFdpH90GTPwTUjTQdZdDBKxiAmoRa6t02r4mnxLf6+gZ5R J7kwIzjMsqT1u2dIIim8V9m9+BCnRmhOPiHA7hVpQxPOVZmnNOVQQb0/0D4srNalXRms 87Kg== ARC-Authentication-Results: i=1; mx.google.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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a17090aad8a00b0024e3527e8e9si4623245pjq.9.2023.06.09.11.24.37; Fri, 09 Jun 2023 11:24:53 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbjFISO0 (ORCPT + 99 others); Fri, 9 Jun 2023 14:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbjFISOW (ORCPT ); Fri, 9 Jun 2023 14:14:22 -0400 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BEFD3586; Fri, 9 Jun 2023 11:14:20 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-777ac791935so85734839f.2; Fri, 09 Jun 2023 11:14:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686334460; x=1688926460; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wUoI1otyq64V4OASVoH2qZ32EO4bebljBzF+Ld6+3L8=; b=d/1ff/qxrBfChgRlwPEHKtWAbRXGBRI5VudXfeJGwRscwnN/zGO4P6/v/JRAhMfvk6 95JNXWQUreKajR2JugpIl/XhVYKK2W4Oik3blwh5oh9rRLeJ6U9MfUoHQfxOB+InROzP /RvrBFSMhiCyWLbMisJjV9G6uNlWHhiOyQOlXHhWN4piN12yG/Pl+mZ5PBSfnNOC4kmU 90lMut8A+4alQc0/m0NiN1/E4g7QjHcMDope+ax5ZSHMA/cLat0o9mi6OISM8e/xKHeC lZVjBe8gYDuPcp/yloLmS0kW8/6Ff71RxmJt6gJnZVvIIlM6P0nMabUt6LCJfehOUI9D x2rg== X-Gm-Message-State: AC+VfDwYiWluvl0ZUGlPjbC7xLk7DVVb4b2aGIxxhl+4SaOZnwnMn8Zd HNX5pXfinTaq85zQCjZMiQ== X-Received: by 2002:a5e:df0b:0:b0:777:b4af:32a3 with SMTP id f11-20020a5edf0b000000b00777b4af32a3mr2346005ioq.14.1686334459878; Fri, 09 Jun 2023 11:14:19 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id l18-20020a02a892000000b0040f9af9237asm1114745jam.41.2023.06.09.11.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 11:14:19 -0700 (PDT) Received: (nullmailer pid 1681135 invoked by uid 1000); Fri, 09 Jun 2023 18:14:15 -0000 From: Rob Herring Date: Fri, 09 Jun 2023 12:13:48 -0600 Subject: [PATCH v2 4/4] clk: mvebu: Use of_address_to_resource() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230327-mvebu-clk-fixes-v2-4-8333729ee45d@kernel.org> References: <20230327-mvebu-clk-fixes-v2-0-8333729ee45d@kernel.org> In-Reply-To: <20230327-mvebu-clk-fixes-v2-0-8333729ee45d@kernel.org> To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Replace of_get_property() and of_translate_address() calls with a single call to of_address_to_resource(). Signed-off-by: Rob Herring --- 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); } -- 2.39.2