From patchwork Thu Jul 13 10:41:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Chen X-Patchwork-Id: 119778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1750538vqm; Thu, 13 Jul 2023 04:21:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+mEoVldUrVgLpviy7xfel66x2bZeGl5O9EETJ2T7z8GyM1kPGLwUfTvEDUU2tuwuF0md4 X-Received: by 2002:aa7:dad4:0:b0:51e:278a:3627 with SMTP id x20-20020aa7dad4000000b0051e278a3627mr1702711eds.7.1689247270007; Thu, 13 Jul 2023 04:21:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689247269; cv=pass; d=google.com; s=arc-20160816; b=FXfBuxFBv4sDPDBWlY1BKTQc6YPpT0RDbLTlM3EOhRWdI6u9l6QwNTeTqXvzOjFVbf /unknYz5cM5z5nVRVrADrgtA5XmZ9bAweJGeLK8TZfao/6kMzsgwLEOuA0Jq7IV7KMGX ZZGvxtLhFWV5ETxnpHoDY9xhRe1D0oefj2VjongIxNpg0chlokgbH/xQl8pLnQKDNYO8 yQvVo8Da9axO0g2Nsa1NyijHZysEx5GCVFyIEvyfn9K3ozGjiUrc0Lwt2fkzJQMTdLsq hc4lZ+S/Jd6rw9T0Jy9HMz6iHg/ibkEdRCMiwxOfJSpFwjcV4YWvGrWn0sVxW8qYBCSK 75ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:in-reply-to:message-id:to:from:date :dkim-signature; bh=lEvsxzz+qJghQc8kzyg734nbqEHR6EFKqv5AJo4kZ2M=; fh=lsAie8HY8ged6d5Qu8r57E29QixnmmgwbFmKnaHVf8Q=; b=aOX0kwj8yMfW3QGL1+//GTjifywFVpKmpMiizEiu57XcRfTgrpXRPzxHi+qBp5tkPR 4VABTt8qX4/9gF8vzzs6P64zU566AgXvMxF5nOL4bHNHuj1EofI56ZEQZH/wBxm1IWam S9YT2rhdiHZTM/faMYICRa7pMYf4HVHM4+UeOyEsXeSocbsk5V/t+I72Q8ytPXZAXtSG oLLBHYjbyHvHmjhpT2Eel0B0LhaggdZkI2rsg/STrnt12mfgSLnmCyLXr/BFqHf7j1Xm XsF0UE1igcFQZ2JjSQnjPldN74Svj9WM7FKQOK0G4nd/+hXdCLpIvSy144117BRzLNR5 fJ9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b="Zzr/IXD5"; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020aa7ccc8000000b0051da31b5da9si7584033edt.639.2023.07.13.04.20.46; Thu, 13 Jul 2023 04:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b="Zzr/IXD5"; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233369AbjGMKlw (ORCPT + 99 others); Thu, 13 Jul 2023 06:41:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232129AbjGMKlu (ORCPT ); Thu, 13 Jul 2023 06:41:50 -0400 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5471BFA; Thu, 13 Jul 2023 03:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689244904; cv=none; d=zohomail.com; s=zohoarc; b=HWGAHfq2NA0fA/S8+tFTf3PF3oHtqnKv6qYKTziQL6WfHGDgwfo6FWYHzCve15UCS1vMARGO0tiYKZBAzLey3lc+NZ78Z5hc5Tt0w66wd770MMBujs5XgWhkFCufdvgPd8+DYwjSqUmkATWhDpHBHrwAu9H2p8PPXELy8jMYQeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689244904; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=lEvsxzz+qJghQc8kzyg734nbqEHR6EFKqv5AJo4kZ2M=; b=eZeTPbCSWVujqjEwRZ4mKFVhgZGWpNPaerQlwncM2gObQP7K3bbRiwgh53gBVdPbxWH2prQG7mLg5EjEzhzujFJSefxgAZU8vytnz7Rj++Q64fAaFfSZu/5+HP09FtKhaEdZAa4nXp8GcG2zISbc2KGgRzN09YH/BNriJA34y1E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1689244904; s=zmail; d=linux.beauty; i=me@linux.beauty; h=Date:Date:From:From:To:To:Message-ID:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=lEvsxzz+qJghQc8kzyg734nbqEHR6EFKqv5AJo4kZ2M=; b=Zzr/IXD5lIGPVJUexUifXLTNgDhLmOoj/T+3Ub2XCvGUDK7opaP8gSjFThySbeMI R5fJj2Oqo73uPBfuIL7OQq5WrWdhPGOQ5r3ZT8jOSSrvjIXmTp85BlkT1UtTpnBs7Um QHVZWnNa253PfEaKH0Hj7MsqXvgFYNoblIDfKHuM= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1689244901917389.12497445346855; Thu, 13 Jul 2023 03:41:41 -0700 (PDT) Date: Thu, 13 Jul 2023 18:41:41 +0800 From: Li Chen To: "Rob Herring" , "Frank Rowand" , "devicetree" , "linux-kernel" Message-ID: <1894ed7a1a9.f5e49d5d141371.2744760538860302017@linux.beauty> In-Reply-To: Subject: [PATCH] of: property: fw_devlink: fixup return value check of strcmp_suffix in parse_gpios MIME-Version: 1.0 Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771304145397064190 X-GMAIL-MSGID: 1771304145397064190 From: Li Chen This commit addresses an issue where enabling fw_devlink=on was causing a PCIe malfunction, resulting in endpoints missing. After thorough investigation, it was determined that the root cause was an incorrect usage of strcmp_suffix in parse_gpios. Fixes: d473d32c2fba ("of: property: fw_devlink: do not link ".*,nr-gpios"") Signed-off-by: Li Chen --- drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index ddc75cd50825..261eb8f3be08 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1272,7 +1272,7 @@ DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") static struct device_node *parse_gpios(struct device_node *np, const char *prop_name, int index) { - if (!strcmp_suffix(prop_name, ",nr-gpios")) + if (strcmp_suffix(prop_name, ",nr-gpios")) return NULL; return parse_suffix_prop_cells(np, prop_name, index, "-gpios",