From patchwork Fri Nov 16 22:05:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 151377 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp953395ljp; Fri, 16 Nov 2018 14:06:07 -0800 (PST) X-Google-Smtp-Source: AJdET5fdWulw6cCMuhQrSerOz9D7ARK7wPrjIxsRrWPMTWK6FkwTm8UUwLY//Vyj2lSh8gQISKRm X-Received: by 2002:a63:e711:: with SMTP id b17mr11219759pgi.363.1542405967770; Fri, 16 Nov 2018 14:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542405967; cv=none; d=google.com; s=arc-20160816; b=HRneMPjEZQjp/yRRPzdVpq9kp5xAF88+Vosbk/CVO7Oi+4GhLDf8s22XpKX142gu/H aXMVaWO2GTz9TG2frOOsgXJeme9oHgwlcDOeYCbl6x/N3/DspUmpXJnLyINrlF9m2Rsf HDwH82malio+n2MKy6pVClU8HkC8RBAKR4MpXV6Bald0K/8ayRhf6P1z/Ohkh0MraNwR RJgTvgvg9fO7GQGMgqf8RLReYeopZoGaBzQcvkSR++o9Hccji0m3J2npUmalJSuqR/TR +ZbTFG1y50lf48/Lkebwm3WYGC1FwbtQUPh4uSb2htBYCY4Z6qESOQcjpod/+P3rJ1YW J1EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ix8cP0wCHZeC/8dXIYOuLIsYXZGQ5ByO8TLiKaNRW6A=; b=gjO/WtES6nl+Dr/X+0iK7/8mKmC46UEFqLqI/Fe7MyY5/SdHmEJHOyC6nRFg+/xwdE EXWhg27hjQm/eENnAloIT+B47ymvMiauqnalFZ9XA8m6WaK0xuGIqT1QwT4sRohhZTY3 kE9fXGtUM7/OrP2bF47HFuiH2TQK0KXR4JS3Ory8Riw+SW6bgQjTkwbbHmFoNNFK8F4T qujFBwt7lYmRBY8vKvtPuUCBWCM79KE2OfyPGLXGRxesDcXTJpPP5ppppPsz0qL52jok cbJj/kSyXb1utAIrz7btCuQjGquaMw1h1CJaqGAqpOX7IFUZmxbOaTaDSdaMX5fzhJcD m8cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si14432823pll.384.2018.11.16.14.06.07; Fri, 16 Nov 2018 14:06:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729643AbeKQIUH (ORCPT + 32 others); Sat, 17 Nov 2018 03:20:07 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:37047 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbeKQIUH (ORCPT ); Sat, 17 Nov 2018 03:20:07 -0500 Received: by mail-oi1-f194.google.com with SMTP id y23so11771535oia.4; Fri, 16 Nov 2018 14:05:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ix8cP0wCHZeC/8dXIYOuLIsYXZGQ5ByO8TLiKaNRW6A=; b=F9jeuVVMR2GAzVHVOTrj1eKT3eYDjzgnBDjasl3+sA8ESqRggt8USYme4vOWfQqt+t 4GYMRhMFcMPb5EYIQRWb02aethDpFYYO+iqT5l6E9fZU9zzVnkzUkHgeUDWlxMUUUb2v dLbnq/MIX/Q3wc5Rhp4DlxZ+kmsa8y/jDwc9Ab882NZrfHF9RZsD+Hei/rk2ZIiOK1PU +itxNMEWGUDaSEpMobgvtjoK6qCEzmVJZwywFQeVbIg26r+9sIEupyAGWARJcqhMNhu7 wgHFHXRoGN9gQPU9tIHTOJpa1tTbcljW8gZZMnhymPhtqW1LQ2fFzQoFf8iKnNoW9IOn MtOw== X-Gm-Message-State: AGRZ1gKuKIplTJdxNpaT6KYmIPC+QzTNoIMLnbkPFgFHsBwDyb5Fn3/3 iGRw8/n4dyhnPqRxsPcC+hfspwFs2A== X-Received: by 2002:aca:4202:: with SMTP id p2-v6mr1888048oia.41.1542405957801; Fri, 16 Nov 2018 14:05:57 -0800 (PST) Received: from localhost.localdomain (mobile-166-173-57-127.mycingular.net. [166.173.57.127]) by smtp.googlemail.com with ESMTPSA id w5sm2316587oif.48.2018.11.16.14.05.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 14:05:57 -0800 (PST) From: Rob Herring To: Michael Ellerman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] macintosh: windfarm: Another convert to using %pOFn instead of device_node.name Date: Fri, 16 Nov 2018 16:05:39 -0600 Message-Id: <20181116220540.17222-3-robh@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181116220540.17222-1-robh@kernel.org> References: <20181116220540.17222-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Convert the open coded iterating thru child nodes to for_each_child_of_node() while we're here. Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- drivers/macintosh/windfarm_fcu_controls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.19.1 diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c index fab7a21e9577..2b3ca628a650 100644 --- a/drivers/macintosh/windfarm_fcu_controls.c +++ b/drivers/macintosh/windfarm_fcu_controls.c @@ -425,18 +425,18 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv) { "CPU B 2", "cpu-fan-b-1", }, { "CPU B 3", "cpu-fan-c-1", }, }; - struct device_node *np = NULL, *fcu = pv->i2c->dev.of_node; + struct device_node *np, *fcu = pv->i2c->dev.of_node; int i; DBG("Looking up FCU controls in device-tree...\n"); - while ((np = of_get_next_child(fcu, np)) != NULL) { + for_each_child_of_node(fcu, np) { int id, type = -1; const char *loc; const char *name; const u32 *reg; - DBG(" control: %s, type: %s\n", np->name, np->type); + DBG(" control: %pOFn, type: %s\n", np, of_node_get_device_type(np)); /* Detect control type */ if (!strcmp(np->type, "fan-rpm-control") ||