From patchwork Wed Aug 29 20:02:21 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: 145469 Delivered-To: patch@linaro.org Received: by 2002:a2e:5d9b:0:0:0:0:0 with SMTP id v27-v6csp9256lje; Wed, 29 Aug 2018 13:02:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbcVQvQALFAFmPaHZRu9nbKG6BwDL/Du0IocJih9+8gPw8ln7JNhFzGw0wKNA5IRrdyb/DS X-Received: by 2002:a63:6385:: with SMTP id x127-v6mr6975899pgb.413.1535572954761; Wed, 29 Aug 2018 13:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535572954; cv=none; d=google.com; s=arc-20160816; b=IJ2XADsdEv3Ci8mFMagcqqaY74+yoGVMs6qVzxGRZvI6V5crUwXC3+vmYmgXmpH26u LZHeP2LTyaOsWUp4wu7tt1qe1RYrleeVyYwTk/oKi0kPLvECA6RRIESYqT84TI9is9Ui xc9ZVWlHGbSyx4LS+tXwi6P61PyI0q3TxRYEpOD46ytOVAuaJnMXrMl2u1uCe6tfev/Z IvvrcIWEtuUptS+ZeSd6TqljAWQvPEwMQwyPFcKqXpR8o5sqfIy6pligbkCR6hjInxem V65pC4Sr8avpMtI70469MyTLv6i72cHxCa/KpGp+IDK8R9gWEnIqfCB1rq0awErCdXwn CBWQ== 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=6acmOIf814fWqqK/f7NGrp54JZdrio6ld6qbrfdmrXo=; b=BQMhBZWwOFowyHk66NGMBUJvFjv0y15/ZOCDW9T3oSDEDI0hm1kxm4bDuxTReAbIIe Fm4NZbfgcuqJeR+otYqk+MEF7p58+KSK81ySe5paezfsi3Ij1XZ15cxEp9gb6WvXlv5K AugdhkAx2gtAHFO1A7lLrDqIx+tVVOOKgm526ELQmAKL9L9KFRkYW9fFB+pvsuCkwn5x q6SJl4YwGu9d8tiQ7oho6plj2mDid56IPuKypgnBMicdUbbEWRVAVyE5WbUDIEWPjgcJ Nk4u1VAvHNQmeEbcmAI6wtkGMCeJsY+xushGOtJ68lESmVRRErWmBm9kX/vRGVwNzofv Jk8g== 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 k20-v6si4532362pgb.115.2018.08.29.13.02.25; Wed, 29 Aug 2018 13:02:34 -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 S1728011AbeH3AAu (ORCPT + 32 others); Wed, 29 Aug 2018 20:00:50 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:42482 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727245AbeH3AAu (ORCPT ); Wed, 29 Aug 2018 20:00:50 -0400 Received: by mail-oi0-f67.google.com with SMTP id k81-v6so5272979oib.9; Wed, 29 Aug 2018 13:02:23 -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=6acmOIf814fWqqK/f7NGrp54JZdrio6ld6qbrfdmrXo=; b=VaPCRhrByb6TaflxTLtJp0Cgm9hbPEj92JLwHkSciCwi1b/Z0VFbgPofu+SA5mmi2c jqENhng89Mg9YG5ppvXDiKgJCz/ohSt8TOGiNh+BQJwmInBraBh+XdGYGhRY5OMaBP6t oc6nBXtejJs+oRa1368089sMaoJDk4HfE3qoI78vMffAV6baa+cR3HeXH+9fK0+vJp6q 7Pw59hPc93xTM6FvZpuGBBHKWvjnB2MgScdBT5JJbs04+5pMXj/sCQVGwRM0fOO6EJK5 MgsrTR46nLFuGpz60hrSs+p+9jz0FZP7jhmAXbc8l9VP3JSLMyfKTNtILRBUow9G+6X6 kdLw== X-Gm-Message-State: APzg51DgIpbhpoaKkYoc+2IpMDYQ4mejsRd62FQjpAClfGHOXBOa0XVt a+5KDLO8tC7NnQWfa+0laQ== X-Received: by 2002:aca:e30b:: with SMTP id a11-v6mr4442626oih.303.1535572942865; Wed, 29 Aug 2018 13:02:22 -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 n84-v6sm3002331oif.23.2018.08.29.13.02.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 13:02:22 -0700 (PDT) From: Rob Herring To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, Jean Delvare , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-hwmon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH] hwmon: drop unnecessary OF name NULL checks Date: Wed, 29 Aug 2018 15:02:21 -0500 Message-Id: <20180829200221.13492-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 Checking the child node names is pointless as the DT node name can never be NULL, so remove it. Cc: Jean Delvare Cc: Guenter Roeck Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-hwmon@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- drivers/hwmon/ibmpowernv.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.17.1 diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index 4935897f1527..0ccca87f5271 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c @@ -458,9 +458,6 @@ static int populate_attr_groups(struct platform_device *pdev) for_each_child_of_node(opal, np) { const char *label; - if (np->name == NULL) - continue; - type = get_sensor_type(np); if (type == MAX_SENSOR_TYPE) continue; @@ -589,9 +586,6 @@ static int create_device_attrs(struct platform_device *pdev) const char *label; enum sensors type; - if (np->name == NULL) - continue; - type = get_sensor_type(np); if (type == MAX_SENSOR_TYPE) continue;