From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: ACJfBotXyoDqT3fPtQOTAYSd0ItI4jLBVF0NmMf8DDPTk/ZyJaDe/P9nTMbcxGQrmFrLgefoXIT2 ARC-Seal: i=1; a=rsa-sha256; t=1516335711; cv=none; d=google.com; s=arc-20160816; b=S3pjgEHUM9ycInpvTwaLSBP3D7/RoqbOkcHmkC06iNbRpnaoEwyynOt6w4+8wTSXtd mwe3SYMC6rXNiaWn+X4QXu9UF4zISB78l3eBvB5ctGOfWoP75XDtGfzdEduiIBLp68tc 3lIIqQ8lmTnzqx9KiohEDnNH0y47QufBfznlvkSmPc3Tbbl4I2DMBtRp6I0l+Q4Cmeqh qhZIP3fgKOHa46bAXNLaaUbu9bR1WKxpSPLY7G3aRd0wR4/Gdamys4wpYGQSNzWU7CK0 BjTswbUNsaebZNj0IhB8NRySZxR1OmvKiY0g9U+NHMznvTJo2VhEJ+pk4JrF6FvjdwNU OUxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:references:in-reply-to:subject:cc:to:from :date:content-transfer-encoding:mime-version:dkim-signature :dkim-signature:arc-authentication-results; bh=NTptuU2NEcHcFIiqCdJYIzy4YcbeBLAX3ojt42n+JCQ=; b=BFQBXWN3Mcd7s2RF7emnniyZRz/4bUQNM5ll1hOYRJ8VMsmGBq2Y8h/XXYU/O5blFf z95aERZLBAxA6W02Cb6tHkqzD8iutestPSX3rxl8EGqPQzLJOOToQikVGEpXP/0lhYOv LelH3Pn4mxtRx29e5NdWQolFahZI/CVrmXwfLe9DS2G9qbqavtr62e79ZeRwCMmmOGuS 8o2nV/J+cmuYE3YDfMJ7FDWlpxTU2aZxDTwyEZCFHTvFKUL+0w0Ei6clEWtbkWgGtUMT 5NyKHjqwH6a2RJo9hIwLEIXt+RzwWYJBkz3rZLPc5TuT2ZitNYuTgGCFKPeTz6pbwP4E byqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=dgVRCUyw; dkim=pass header.i=@codeaurora.org header.s=default header.b=VFkE+P6e; spf=pass (google.com: domain of poza@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=poza@codeaurora.org Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=dgVRCUyw; dkim=pass header.i=@codeaurora.org header.s=default header.b=VFkE+P6e; spf=pass (google.com: domain of poza@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=poza@codeaurora.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 19 Jan 2018 09:51:50 +0530 From: poza@codeaurora.org To: Keith Busch Cc: Sinan Kaya , Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Wei Zhang , Timur Tabi Subject: Re: [PATCH v5 4/4] PCI/DPC: Enumerate the devices after DPC trigger event In-Reply-To: <20180119014310.GA12043@localhost.localdomain> References: <1516185438-31556-1-git-send-email-poza@codeaurora.org> <1516185438-31556-5-git-send-email-poza@codeaurora.org> <20180118025615.GF7562@localhost.localdomain> <153733e36c151d2a549b814e4232c0df@codeaurora.org> <1629ca15-81f6-f5f4-8f9c-d0a575272dd6@codeaurora.org> <20180119014310.GA12043@localhost.localdomain> Message-ID: <532771673b80ab147fada349d61b26f4@codeaurora.org> User-Agent: Roundcube Webmail/1.2.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1589835695085239135?= X-GMAIL-MSGID: =?utf-8?q?1589993235121764039?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On 2018-01-19 07:13, Keith Busch wrote: > On Thu, Jan 18, 2018 at 11:35:59AM -0500, Sinan Kaya wrote: >> On 1/18/2018 12:32 AM, poza@codeaurora.org wrote: >> > On 2018-01-18 08:26, Keith Busch wrote: >> >> On Wed, Jan 17, 2018 at 08:27:39AM -0800, Sinan Kaya wrote: >> >>> On 1/17/2018 5:37 AM, Oza Pawandeep wrote: >> >>> > +static bool dpc_wait_link_active(struct pci_dev *pdev) >> >>> > +{ >> >>> >> >>> I think you can also make this function common instead of making another copy here. >> >>> Of course, this would be another patch. >> >> >> >> It is actually very similar to __pcie_wait_link_active in pciehp_hpc.c, >> >> so there's some opprotunity to make even more common code. >> > >> > in that case there has to be a generic function in >> > drives/pci.c >> > >> > which addresses folowing functions from >> > >> > pcie-dpc.c: >> > dpc_wait_link_inactive >> > dpc_wait_link_active >> > >> > drivers/pci/hotplug/pciehp_hpc.c >> > pcie_wait_link_active >> > >> > >> > all aboe making one generic function to be moved to drives/pci.c >> > >> > please let me know if this is okay. >> >> Works for me. Keith/Bjorn? > > Yep, I believe common solutions that reduce code is always encouraged > in the Linux kernel. okay, I will work on this. Regards, Oza.