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 X-Patchwork-Id: 80013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp694892vqo; Wed, 5 Apr 2023 18:11:55 -0700 (PDT) X-Google-Smtp-Source: AKy350ZTBxafDEx9NCx2XfFO4NHEi+SakewuMnqbFd+g+A9HSt96opbKrFzBqLSf98TJsZOiREIw X-Received: by 2002:a17:906:3c06:b0:947:f4e2:ad6d with SMTP id h6-20020a1709063c0600b00947f4e2ad6dmr4368148ejg.72.1680743515666; Wed, 05 Apr 2023 18:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680743515; cv=none; d=google.com; s=arc-20160816; b=Hxz3MH/CaRLghrvuA+d/Zng6hYsir8PabG/FJK+8zPYEKGiD4gEhsPlti6k3jtXJ5w K4ldZe/+9B3G62HdTR1xB0YNPQGjG2vYrIkIpouUQEQUBhiP42uP0omlaZ54sYvHOwcG 191Le9jsgl4vqGfkkwQougIvL9jH3eeU7D/yXsNEbEtQwP/5tebldDkzA5rQal1+KOIi 1llzYb+q89gnIhMvRTwXwVWEd/kNBW+MQSiX+shetjpLOE3Yl7TzdLSmOFfPYdYwH+Aa FyT6RHCQnFZwCYcUrp0ACQ8O2T7iokdMu9u1cUwd5xECqwpvP+UM4BSHnFDklLox8Ue7 Bsbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yFesBBHzxWYkEFkum0aSO7GPX9U9Sjvp2fw545n6LzU=; b=S7yL1CVOydGI1DgyKKt5Gf9T8OvI6pk17nlq6n9w1tQlow9HPFAzfEh4AedmZP+xGh wsKCtwkUaR7B/yKh3oJam1FjhjsBT+eyzjnShtfCCStit8tMh42/J8OhWj3fg2DDPO8W 0HkN6fxVh6VN7gRESw1+5KGpy8J9c4GrtZxjAzDANWl2x21A7CeumI4eX0R+KbXFfsIP oIouhemdT3lNAyfNjAcv7dBzIoEb+4tGiPxfNQyVmo8fRysSlAmJ+djlLEMEcZveDxJY CZOJYyhUyO2O2W8VhdlVUHBk7LRmdg4DpJUC1XIrFZpaRQ014C++DO7PjggKUpCnxTNu eq0A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a170906591500b00947ae261df0si148679ejq.326.2023.04.05.18.11.31; Wed, 05 Apr 2023 18:11:55 -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 S231444AbjDFBK1 (ORCPT + 99 others); Wed, 5 Apr 2023 21:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDFBKY (ORCPT ); Wed, 5 Apr 2023 21:10:24 -0400 Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BDB57281; Wed, 5 Apr 2023 18:10:22 -0700 (PDT) Received: by mail-oo1-f53.google.com with SMTP id f7-20020a4ab647000000b0054101f316c7so2539423ooo.13; 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=j4fD+ppDMpm3QSjq+Jr8yxpVOyIZRkZ2Bhwq/s3OUHSdGB1SmrioEY+jo1Q0Ua8oqm QgKoPwwgl09FODQbpaNQS9PmzYT10qTbCfZtfXratpiApXyobRpTOnspEjqDJdcXEAdZ gY66kywJDleAWxrFsriYWGOxgpxTJ7SSXxXI4g7myTNJ54+en9tPf4T4lVVPZ7NbIKT+ cZMSL9ksWeHNTtaUgu+sNTklCOmZfuTm0nOIFAvvaf1TjIdAxMfqMPhxRgkAI7UNmeo8 3PW994sls3I6WcS0XNpxqI9cVEhyCYabiFNvqj2siGl7Q1ug9eSn/NMeQKm7xf6EyIr+ It2w== X-Gm-Message-State: AAQBX9dvwWw32DUPUlFV9UDt4CPLiKwGevFyNL3ygrpATp4hfr0DhprU b2B3e1rqCCVv+iJmwzh7G+YrCDFhmQ== 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-Spam-Status: No, score=0.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762387312424930900?= X-GMAIL-MSGID: =?utf-8?q?1762387312424930900?= 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); }