From mboxrd@z Thu Jan 1 00:00:00 1970 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 9DFA4C7EE25 for ; Fri, 9 Jun 2023 18:15:03 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BT7ee5bbCOxyBXqyoVISKXzkTmDXCEA46T0vnm8nBtA=; b=CBsmD1MUmrkf4n lHQbXVxPESSU2UpmOkCBmiyvYO29gKyJ0MtMrJ40/2GKQCk3x+6/KmFjnIHpmDk+Ic4uMsggyzWy7 SW8H903MZ3FW+2ELF5eNKKetTdpyZQv0tyKIKno2IATQWKc++NjM0Qq6wlw1A+2mGrXWft5Zv/Ums WML/j74eZw77bUVNn+lDF2mr5Q6CRg252ph0q9ZjqYvyj8XApmkQ/UHfCecrChpEyuj7vmIhdoQdS EF0X8DxpSGzVB6KPnlMGHxnmrSNeUMv0GPNddLZLiee0ngZIWC4eNyN924uwQvbO3ktN02D8nsVbV fLWeIEzbni3rklWKl7Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7gcz-00DoyS-32; Fri, 09 Jun 2023 18:14:25 +0000 Received: from mail-io1-f50.google.com ([209.85.166.50]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7gcx-00Dox0-37 for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 18:14:25 +0000 Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-77ac14ff51bso85597939f.3 for ; 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=PJ4nZjuLgpF8M/UV1M5OFGOmDmiVO1MJ0hRm24lcvaONVRmpaeANhpmGU00kQyScl9 H8nvy0TWdhFzUR28lsVNZV+s8VXYOHoOhd24O3nTMEO8S2ZaQ0z7ODiThc5UQfu/lJfS 9YOalbqx2vHmBDUpNchU7AbxyIuFzxSMvlvUR7OkweFgJxPN8Dm2Y/DGCZRRAt5MeBqx q7vA3Um2cg64F9dlMao0+BbD0niFQ6WQaa8lg7r9Xi/13iNQz+9+e2swGIU0f3/rx4ft Wb7kfuCHxfSLBRttiQ8ry6n5pxQvr2BYKUpKsR5jB1qNtpdEtyNeRehfEhso1ZfZ4Z7v zRsQ== X-Gm-Message-State: AC+VfDydv3j99TBoqisDFcmb19LfxrJRpF0BMjtV8HgYOVJefauXWgIz LLOBpWPrBZ7DUXnPPXasrA== X-Google-Smtp-Source: ACHHUZ7avp6M8UuFQ9TiyWiTQa1MXln3O/GpP7V72IkCtX4OMsKNx1Tat1zvWXXVbv5Ss/EtNsYBgQ== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230609_111424_001172_1B600517 X-CRM114-Status: GOOD ( 11.50 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel