Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10843462imu; Thu, 6 Dec 2018 07:38:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/URp1BIlhdo8YNykxlGkWuWQ9sXkEhPkwiyzA2NtV0u79616VaKcIg0GhJVTU9zjGYbQsMG X-Received: by 2002:a63:920a:: with SMTP id o10mr22492934pgd.141.1544110719274; Thu, 06 Dec 2018 07:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544110719; cv=none; d=google.com; s=arc-20160816; b=w7UGQT9K3E5ViMqX7gtNfknuwx8GiGdV22PoJYeOIpLgag7CavIdWpxvm0v2qOsgen ky7b9uUb29PVtc8zhWaSxvS+zIBnuKHSyR5vuT5L8VI+cZzVX1QjRAIQvQgyxAZpPz+6 59oAI6gAY50q4sHTF2AYkdSU/yYPp/PpXEerri/KxWykiHfgP2KEdS/Xvx8BHh4WPoqw Z3+LbPisXsrTDoRredD2MG1lcDeT99OvtoL0XRCi5UPZQnD+vSy5/DAqWZXT2p1XbeRZ DHFrpiumcBhcxRkMB7WDMARsXU+c+Ck645/Z0oPPTcmH+4vrFR14CSvY6DuxfMTi5kU6 DLyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=mv9YhifI6bSYhqeWcTB3+SwUu39m4Mgnv7ccFfMrIcc=; b=kXIoLJ71VN0oqBkCt6BqYwxlKoVUqHs2Dr4A7OGpbrCTLlLlhYclOp2AUnQLjrgoM/ qARC0p69TvQnHXp3iIN8e3zKoQIlyvfCkpfA8v3gLK2UiPJYuaJy5g0BDDif+5muzI38 ES9o3i96z/GgU2qMHtThLKkbEjsUq71213vCBYD4OtegDKlM1DP5B1Vc+xtDHUBqx/Bq kcjWVaHsQmNG+FigC3rvuQAquB8Bn00anTEhLK/FhlcXNDMgrKjXMqJkyUkS4zi6oN3u co8Ndn217tgzZHiDv5xZinmT9neXoiyY1HuO8SHQ6Q2GVfP50/dHI6UaThmDHvTfnPyO 95WQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si502183plt.111.2018.12.06.07.38.11; Thu, 06 Dec 2018 07:38:39 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726130AbeLFPhH (ORCPT + 99 others); Thu, 6 Dec 2018 10:37:07 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51280 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbeLFPhH (ORCPT ); Thu, 6 Dec 2018 10:37:07 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB6FYDFF083944 for ; Thu, 6 Dec 2018 10:37:06 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p74ddevg8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 06 Dec 2018 10:37:05 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Dec 2018 15:37:03 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 6 Dec 2018 15:37:00 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wB6Faxn541025542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Dec 2018 15:36:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2817911C058; Thu, 6 Dec 2018 15:36:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 898F211C050; Thu, 6 Dec 2018 15:36:57 +0000 (GMT) Received: from [9.101.4.34] (unknown [9.101.4.34]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 6 Dec 2018 15:36:57 +0000 (GMT) Subject: Re: [PATCH v2] misc: cxl: Use device_type helpers to access the node type To: Rob Herring , Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frederic Barrat , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, Andrew Donnellan References: <20181205191655.14612-1-robh@kernel.org> From: Frederic Barrat Date: Thu, 6 Dec 2018 16:36:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181205191655.14612-1-robh@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18120615-0008-0000-0000-0000029DE0EC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18120615-0009-0000-0000-00002208491A Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812060132 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/12/2018 à 20:16, Rob Herring a écrit : > Remove directly accessing device_type property and use the > of_node_is_type accessor instead. While not using it here, this is > part of eventually removing the struct device_node.type pointer. > > Cc: Frederic Barrat > Cc: Arnd Bergmann > Cc: Greg Kroah-Hartman > Cc: linuxppc-dev@lists.ozlabs.org > Acked-by: Andrew Donnellan > Signed-off-by: Rob Herring > --- > v2: > - Reword commit message as this change was using the .type ptr. Acked-by: Frederic Barrat > > drivers/misc/cxl/pci.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > 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++; > } >