From patchwork Wed Aug 29 20:04:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 145473 Delivered-To: patch@linaro.org Received: by 2002:a50:c01b:0:0:0:0:0 with SMTP id r27-v6csp35911edb; Wed, 29 Aug 2018 13:04:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYYukUNt48vkItGU6Tf2ZOGkDTVGgK1Hvt+/ZwKpRWwHLxxxo635/smPjHVozWK22d79T5h X-Received: by 2002:a63:e056:: with SMTP id n22-v6mr6801945pgj.205.1535573082958; Wed, 29 Aug 2018 13:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535573082; cv=none; d=google.com; s=arc-20160816; b=DzSn2a7ciFFFTuSv2kUZ6NJbx8bSK5ZQcswJAmLU3qYueR6idUP9B8+Ky64jZfwIeu gNdCT19fhORUt07I4k8SdevZ0X2hSmfHWep7Pa/dN+o3mUYhZOyLYGoKdiu8zxRMQsn0 FqkRZYUdNyj/Zc0j0IudGx6sDeWbl18ZfSO74+WS9Yzh9rEf4xUlLbAMyMVYuG7bMw4J XtDbNS2wRcj/zzRpWXFPTDPPrU27HnxCE6bu0317AWbUzvVyUOz12e4+UK9k2t5QHVZL W4+DKWrsYZjwJq55VfpRlJlGDVXsXl5hoflrldfE5orOeF4O9VKXTB15DzS6405OgMhE EXKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=+neBZzp/eGDF4FA7URUSDthpXSzrccxub2oIhsNm1bs=; b=Z5+znE0GUZaa2I57SPD9YFmgiTZBEE3rDs2XEs5TlbxnFSjiehQVZRDkmuWs/paQzs FEYUd3abhshq7uueYajLd5TICpstt73VSJbforeVcjJOxvnVvgZ3tWE8ftsMmSeD/K5/ 9poZaoF9mc6A6KYsDE918x9wR95Jue+y3zI7X27rlZjfY9MGz8Hic0qwd6CD0w5N/AJA DyUY4S6KquHQd3K9zRHNroACe6RGoPv+zJaMjvkhGR/vduwIKqYwBmL/yeUuKMTSmpB3 4AARPUdXZj/0dgB315MJpuaG0Ai9POVUTBseGaFmIFKj4DtkJPvINTCr2Rvw7RhRq5VB q2fw== 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 e3-v6si4702434pgh.385.2018.08.29.13.04.29; Wed, 29 Aug 2018 13:04:42 -0700 (PDT) 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 S1728639AbeH3ACy (ORCPT + 32 others); Wed, 29 Aug 2018 20:02:54 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:42765 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbeH3ACy (ORCPT ); Wed, 29 Aug 2018 20:02:54 -0400 Received: by mail-oi0-f66.google.com with SMTP id k81-v6so5283598oib.9 for ; Wed, 29 Aug 2018 13:04:27 -0700 (PDT) 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; bh=+neBZzp/eGDF4FA7URUSDthpXSzrccxub2oIhsNm1bs=; b=tlqQjlZM+043voaWHPCPMJ1NISv+c+LKrpEOE5BddEx58Q3fNs/f2jU+qjoNNi9+ie L1LnbbAZQRYVqFDszpgKh+0MahSVzL9VYMnz+C7lxYt3XcrkgfmefroLe0oSA0EjvoY6 98KzaBYIf9CHNTqpdsHRSZFACYQtp3JfwsnvD6fkruv3db/a4YLd3fAZb8mtU/3h6gMM hD3ecPOWCh8ciPRpSux9CnPItZK5aLvt5enHmlTKeRZtC22pGyryvtPheT3EFh/n4wZc YXhbsXPy5IBlDkjq3DF2fqCRb/oMo1CrYioNy16n4HkeQdqp+CGCjlSDRzGm5E77cl49 yPsQ== X-Gm-Message-State: APzg51BTwg05++WCGLqISxGf8A2C0wtlq/rCde+El7megVKRam0rwnx1 GNwUAhoEyV8rWsFl5H52Ug== X-Received: by 2002:aca:4c92:: with SMTP id z140-v6mr4052794oia.318.1535573066913; Wed, 29 Aug 2018 13:04:26 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id r10-v6sm5349969oif.37.2018.08.29.13.04.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 13:04:26 -0700 (PDT) From: Rob Herring To: Qiang Zhao Cc: linux-kernel@vger.kernel.org, Li Yang , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] soc: fsl/qe: Use of_get_child_by_name helper Date: Wed, 29 Aug 2018 15:04:25 -0500 Message-Id: <20180829200425.16435-1-robh@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the of_get_child_by_name() helper instead of open coding searching for the 'firmware' child node. This removes directly accessing the name pointer as well. Cc: Qiang Zhao Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- drivers/soc/fsl/qe/qe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.17.1 Acked-by: Qiang Zhao diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 2ef6fc6487c1..612d9c551be5 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -588,11 +588,7 @@ struct qe_firmware_info *qe_get_firmware_info(void) } /* Find the 'firmware' child node */ - for_each_child_of_node(qe, fw) { - if (strcmp(fw->name, "firmware") == 0) - break; - } - + fw = of_get_child_by_name(qe, "firmware"); of_node_put(qe); /* Did we find the 'firmware' node? */