From patchwork Fri Nov 16 22:11:02 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: 151384 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp958258ljp; Fri, 16 Nov 2018 14:11:20 -0800 (PST) X-Google-Smtp-Source: AJdET5fOLhYQyXGi7aKxUBFgjcQ+x9h952OwtFluMzBTKWV7K75IVYDcSBL0UHyZEfaYZ/77I8w9 X-Received: by 2002:a17:902:da8:: with SMTP id 37-v6mr12892274plv.12.1542406280825; Fri, 16 Nov 2018 14:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542406280; cv=none; d=google.com; s=arc-20160816; b=Jt8va2BFu0pD+EFOZuAZ0qClRrErx7kJ9WgW9zf9aYw6gAlRuBOu1RYJ6xzgo5lxI5 eIHeDbSm2Lt24tmFngPwraSqhi/iwywDI0ysz5IuZ6n7HlGm4oWqOv35ZsqMgniufvH+ WIC92QyttfzL60QCshS+P138FqM98A6VXVs9wvIrBG2GZp4Xx4NQIkDJy4tSLqc3sA69 ZHZEY0GVxC/LRqXegVfZKTX/LBIQKmf4xERiE78rGDIzhsgSZ79IIJai/vpsE4Jbvjsq yJEuIUL8Lj5d+kmhIAGafmXFF9fEwm0NoATayYy/rAGBpjFYwV4gE/5hX4eRhx8UGY5g v44Q== 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 :message-id:date:subject:cc:to:from; bh=/G7/uyz7QXf7tbLsILQzDHnS++eVzTBhhnns0VhMoTU=; b=QOsyfft4p+K7rkv2oVT2aU15xMsX2Ke6A63IKjcUYnbcmVPG+fBFQxgP47Di5yFWu5 B/XlT9P2P44/RVwnKwudX3JNZ9c1bzI7s449H9TyCamRF2A8n6fklZRsgQqJsnIkRpDf jmughhXhgBsImjP5NCIQP6o/LviKmI9nGpTuSbUptPcJfI1CGEv8o7demP3mzhwUPUxg IbFGv1ca9rFZZ/5RmFmnIbOvw168NMW/2WAl0DS/E2lY3UaxMUmdF09O41oKTZvXtgwW zNrjs44Hm0Ohbu10U/4yhIuH7JHWR2jOS++hFHaAXifTin0OOhI/0JeMEbj0s8oVPL2h zmLw== 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 r22si2284145pgl.537.2018.11.16.14.11.20; Fri, 16 Nov 2018 14:11:20 -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 S1730148AbeKQIZ2 (ORCPT + 32 others); Sat, 17 Nov 2018 03:25:28 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:43601 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbeKQIZ1 (ORCPT ); Sat, 17 Nov 2018 03:25:27 -0500 Received: by mail-ot1-f68.google.com with SMTP id a11so19077103otr.10; Fri, 16 Nov 2018 14:11:17 -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:mime-version :content-transfer-encoding; bh=/G7/uyz7QXf7tbLsILQzDHnS++eVzTBhhnns0VhMoTU=; b=i2BfIrzE3LCLUWGdBxBXe0o3Rh2p1OLGcVKifqyipq0LGzJv+Le7X6NrfTSLwEwzuB Mhu4j+5h3zrcv7K1F3dkw++Xl9CRs7EIsuoDUGdoD6O5gLxZqxfDmsTkLFZPM6dKDjsC O6X+JzZwNohwKpTmTv7GuQNjVOK21lWdPVFl53IFgJNKHGNLATttONBwGoqdfVVUfgPE lgRCWw/zq0Ehg6LiDmHSXmXLa9G7knBxZM5LitCJYUVRO24vHipIoXz37TbZs6fCMs9d efqYOa9egqfGA36NOQG3cQ4gr3B7I8DqsgBp0u9GACJA4P7ho0wXHOEHuVSOklPrXxfb GT7A== X-Gm-Message-State: AGRZ1gIf+cKUucH+cnJ9fdrsYu9e99S/z47ihY/XrTULHwlLNfp5X/cQ ffI+a9dQiFhH7NU7pPIgbQ== X-Received: by 2002:a9d:75da:: with SMTP id c26mr7966790otl.39.1542406276903; Fri, 16 Nov 2018 14:11:16 -0800 (PST) Received: from localhost.localdomain (mobile-166-173-57-127.mycingular.net. [166.173.57.127]) by smtp.googlemail.com with ESMTPSA id p204-v6sm12142631oib.25.2018.11.16.14.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 14:11:16 -0800 (PST) From: Rob Herring To: Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frederic Barrat , Andrew Donnellan , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] misc: cxl: Use device_type helpers to access the node type Date: Fri, 16 Nov 2018 16:11:02 -0600 Message-Id: <20181116221104.23024-6-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Cc: Frederic Barrat Cc: Andrew Donnellan Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- drivers/misc/cxl/pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.19.1 diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index b66d832d3233..c79ba1c699ad 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1718,7 +1718,6 @@ int cxl_slot_is_switched(struct pci_dev *dev) { struct device_node *np; int depth = 0; - const __be32 *prop; if (!(np = pci_device_to_OF_node(dev))) { pr_err("cxl: np = NULL\n"); @@ -1727,8 +1726,7 @@ int cxl_slot_is_switched(struct pci_dev *dev) of_node_get(np); while (np) { np = of_get_next_parent(np); - prop = of_get_property(np, "device_type", NULL); - if (!prop || strcmp((char *)prop, "pciex")) + if (!of_node_is_type(np, "pciex")) break; depth++; }