[{"id":3686941,"web_url":"http://patchwork.ozlabs.org/comment/3686941/","msgid":"<20260506101651.D6FD6C2BCC4@smtp.kernel.org>","list_archive_url":null,"date":"2026-05-06T10:16:51","subject":"Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include","submitter":{"id":93311,"url":"http://patchwork.ozlabs.org/api/people/93311/","name":null,"email":"sashiko-bot@kernel.org"},"content":"Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:\n- [High] In `dw_plat_pcie_probe()`, `pci_epc_init_notify()` is incorrectly called on the error path if `dw_pcie_ep_init_registers()` fails, falsely notifying EPF drivers that the EPC is ready.\n--\n\ncommit e1010c1890e8eeb7c02639fb9293500993fe3d21\nAuthor: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\n\nPCI: designware-plat: Drop unused include\n    \nThis commit removes the unused <linux/gpio.h> header from the\npcie-designware-plat.c file since its symbols are not used.\n\n> diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c\n> index d103ab759c4ee..7d896752d43cd 100644\n> --- a/drivers/pci/controller/dwc/pcie-designware-plat.c\n> +++ b/drivers/pci/controller/dwc/pcie-designware-plat.c\n\n[ ... ]\n\nWhile reviewing this file, I noticed a pre-existing regression in the\nerror handling path of dw_plat_pcie_probe():\n\ndrivers/pci/controller/dwc/pcie-designware-plat.c:dw_plat_pcie_probe() {\n        ...\n        ret = dw_pcie_ep_init_registers(&pci->ep);\n        if (ret) {\n                dev_err(dev, \"Failed to initialize DWC endpoint registers\\n\");\n                dw_pcie_ep_deinit(&pci->ep);\n        }\n\n        pci_epc_init_notify(pci->ep.epc);\n        ...\n}\n\nIf dw_pcie_ep_init_registers() fails, execution falls through and\nunconditionally calls pci_epc_init_notify(pci->ep.epc) rather than returning\nan error.\n\nWill this falsely notify all registered endpoint functions that the\nendpoint controller was successfully initialized?\n\nEndpoint function drivers react to the epc_init event by attempting\nto allocate memory, set BARs, and configure hardware registers. Because\nthe memory windows are destroyed by dw_pcie_ep_deinit() when it sets\nnum_windows to 0, could these operations lead to failed memory allocations\nor synchronous external aborts when writing to inaccessible registers?","headers":{"Return-Path":"\n <linux-pci+bounces-53848-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=UVKOJLKD;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-53848-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"UVKOJLKD\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9Wb00nVcz1y04\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 20:19:40 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 1D29A301411B\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  6 May 2026 10:16:56 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9E2653EF64D;\n\tWed,  6 May 2026 10:16:53 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id C81AE3EDAD9\n\tfor <linux-pci@vger.kernel.org>; Wed,  6 May 2026 10:16:52 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id D6FD6C2BCC4;\n\tWed,  6 May 2026 10:16:51 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778062612; cv=none;\n b=T14T6QWiDlsaE/nfSr6NRu4TFnhx9HFNfdIiK03/R0FD5bUYt3RZks/078i5mW7DANBf98FAMemOqX/b63z/SUORhnjpqcNFXe4rLaHqCSi7o8MgmGXCrvwuiv9PM02wloy/uYbDCFIrozO9J+4+7Ig131CV7Tk02gCo1yAYPK4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778062612; c=relaxed/simple;\n\tbh=SLfg7joRG5hRwP6syfByopiDQZ95QBTu3wGgkctjz2A=;\n\th=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date:\n\t Message-Id;\n b=ggLVvecJQuKt6gOnnwnLxNPVsxiGaL2lzXXJhEkcGOeZu3MxjhrywMYTfD1au8/4xb72cOIVOYYLn0EEeqUz0fXfRPX+nxNPFpm+1lkof3JVU5kkrvHOQEn2IkWdZ5/A2CTI4cS6WbSrmiKWvIVjhUgLef2FhvbtuVisKENN8xI=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=UVKOJLKD; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1778062612;\n\tbh=SLfg7joRG5hRwP6syfByopiDQZ95QBTu3wGgkctjz2A=;\n\th=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date:From;\n\tb=UVKOJLKDiyoISr8GrKGKpZcSgXKSxxyaB8FxHaz5dt0wFeSmEgUFvA1Q/BbjaAZ8g\n\t qDV9AYVtNvRluthVpblUo1VoKkqaEVFibIi+BiBugc5CzmrC7hPfsAbly0pM8awVyK\n\t xjPyT7z2cDn2fxXy+B2yz4Av+EVKvJ6DTJ2nEnY0tllwna1gg75E2YzD8PN2xYv1ZR\n\t w2bblY/YEZg/PxKUPGB4J//tzjlG27i0yWisN7XfK6m+V9C/Rffeu1d95bIzVGTT2d\n\t /1qLKqMxnOCsnSBceHmRwa8MfJKKv+yIIZRzbayPSSfidn4SHkU70GD0g7UE1pQdF7\n\t u1Wgjb20YMT/g==","From":"sashiko-bot@kernel.org","Subject":"Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include","Reply-To":"sashiko@lists.linux.dev","To":"\"Andy Shevchenko\" <andriy.shevchenko@linux.intel.com>","Cc":"linux-pci@vger.kernel.org","In-Reply-To":"<20260506084858.867884-3-andriy.shevchenko@linux.intel.com>","References":"<20260506084858.867884-3-andriy.shevchenko@linux.intel.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Date":"Wed, 06 May 2026 10:16:51 +0000","Message-Id":"<20260506101651.D6FD6C2BCC4@smtp.kernel.org>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>"}},{"id":3686945,"web_url":"http://patchwork.ozlabs.org/comment/3686945/","msgid":"<afsWdYkh-aMlpjcT@ashevche-desk.local>","list_archive_url":null,"date":"2026-05-06T10:22:45","subject":"Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include","submitter":{"id":8583,"url":"http://patchwork.ozlabs.org/api/people/8583/","name":"Andy Shevchenko","email":"andriy.shevchenko@linux.intel.com"},"content":"On Wed, May 06, 2026 at 10:16:51AM +0000, sashiko-bot@kernel.org wrote:\n> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:\n> - [High] In `dw_plat_pcie_probe()`, `pci_epc_init_notify()` is incorrectly called on the error path if `dw_pcie_ep_init_registers()` fails, falsely notifying EPF drivers that the EPC is ready.\n> --\n\nNice, but completely unrelated to the scope of this mini-series.\nWhoever knows better the code and wants to address that, please do.","headers":{"Return-Path":"\n <linux-pci+bounces-53849-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=f1IOon+Q;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-53849-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"f1IOon+Q\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.11","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.intel.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9Wh21GGrz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 20:24:02 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 850FD3002B62\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  6 May 2026 10:22:53 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 824584014A4;\n\tWed,  6 May 2026 10:22:50 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [198.175.65.11])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 62D353FFAD6\n\tfor <linux-pci@vger.kernel.org>; Wed,  6 May 2026 10:22:48 +0000 (UTC)","from orviesa005.jf.intel.com ([10.64.159.145])\n  by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 May 2026 03:22:48 -0700","from abityuts-desk.ger.corp.intel.com (HELO localhost)\n ([10.245.244.183])\n  by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 May 2026 03:22:47 -0700"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778062970; cv=none;\n b=Sh0RSeQ8l0UyLmwliRH0ySl0gn/rOVdrymI2VOnnWez8LzKSq3uAKZ9SnIM3sC0BB2vs1r0HzolXT3cRgHSSPrDk2lTSs531qQdrPlDP20YdKXDr9FEqwxPXyzbXGMn4dtjri0DxW5nMzrxDi+6w11lJZFdgyONBHqeXzHxQdas=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778062970; c=relaxed/simple;\n\tbh=EIPDHOj0tbJ9LOh36kG1JvSGPwJjQct9wKcW54ISabA=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=YoLG5Go450tKbamh+pIpDWF+eYxf3EUseDYVNBH0icH3Yb7/q2vAqAwSScT3BuF1zJhwUlw66pB9RPW4ymJqh4kCbBC7Yr3IGBNbHgujfzV5INzARIqGfrW1dNsLSTfQgbNRzYDs2W3tbz9Pc4CspwXw1p618muQYaS9+YyWleM=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n spf=pass smtp.mailfrom=linux.intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=f1IOon+Q; arc=none smtp.client-ip=198.175.65.11","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1778062968; x=1809598968;\n  h=date:from:to:cc:subject:message-id:references:\n   mime-version:in-reply-to;\n  bh=EIPDHOj0tbJ9LOh36kG1JvSGPwJjQct9wKcW54ISabA=;\n  b=f1IOon+QS9AeBGhebMeauB2lBjuI1WDaIxvxloyjCT1YD1+Q9yMw+v3t\n   XatSpHGQV0InB7SPhZblcqaesZUiJ/8+JqZZD9pqYM5CLcDYZmG2ZvdDl\n   EtEri6kQgtW8VX2QYOBNUiSclMmeklB/8kYEHiRPH3K9jYvKyUjEzlxRU\n   zNPt6fuZA4hp+NCXMdh3J9GpakNT2+Tb7ZYqITGEEGrfSlJp3mJhmSwLt\n   +xlrZ/nH3vhFquk4K+THKTPGtXwLjfihW3lcMLAnSXk5DtDxrroLCEP2H\n   ndFwVqJdHGRhkNW4IqtdZwCe8gWh/SvvKyDvixzdj82snM9il/esjIwN+\n   g==;","X-CSE-ConnectionGUID":["Kta7VTZtRvG34whbtlMcNw==","WIR2gwUtRni1MYxxF9yvvg=="],"X-CSE-MsgGUID":["PWX+dmd2T526bvSwViqOCA==","9cgHl3cmRtW7jiW+T/zTgQ=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11777\"; a=\"89298446\"","E=Sophos;i=\"6.23,219,1770624000\";\n   d=\"scan'208\";a=\"89298446\"","E=Sophos;i=\"6.23,219,1770624000\";\n   d=\"scan'208\";a=\"241109438\""],"X-ExtLoop1":"1","Date":"Wed, 6 May 2026 13:22:45 +0300","From":"Andy Shevchenko <andriy.shevchenko@linux.intel.com>","To":"sashiko@lists.linux.dev","Cc":"linux-pci@vger.kernel.org","Subject":"Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include","Message-ID":"<afsWdYkh-aMlpjcT@ashevche-desk.local>","References":"<20260506084858.867884-3-andriy.shevchenko@linux.intel.com>\n <20260506101651.D6FD6C2BCC4@smtp.kernel.org>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260506101651.D6FD6C2BCC4@smtp.kernel.org>","Organization":"Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6\n krs, Bertel Jungin Aukio 5, 02600 Espoo"}}]