[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/19] x86: Add missing pci_dev forward declaration in asm/pci.h


  • To: Alejandro Vallejo <agarciav@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Mon, 2 Jun 2025 12:40:05 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vDdKz5+HTZX2WoZC+WW4sTbm2S/2Jml6w9rzHsFx4YU=; b=LrNHmkBmITLuI6P/qfxuZ9UFO4bZYZ06xjr9VBRZs32xF4AYF5471QnWT7KqyIRRENiibrI14EGRcRuyVlrR72MkmzKBzSS9yYqUkFC0d8Lq2PVCxDJlNBQCju8qfP0OEX0k/Mo0r44PKEInfjeVYIoZj88xyUTkO5U1a4AFqGkQ7HQh+DcN+2WNFd0igbe/L0EkSwfpLr2NHSU+nAjCq93Zxnm56owWvRj0K0u2v1Q8y9J6F0xHmyd6DENN8IWmRreJ1oxvNe6OSAK98r31PVpZhv3WtJFB/ZCr01yHbA1xstcGGNccRvcWZSGBMxQb5SmRQ1qZEGznQs+uNOr8cw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wXzH5qATohfJvDhwr1ER5SWkh4U0/FJ9rPGOPPZwNDrhG/6eQeLEElkeX4/Mkyyam/XdGmH8+2iHhVmPHApcMkN8QtOJaAzkjw+W8s5JhU6AnmPSb+S63+cVLei5uBmQEzJTm6ufttyDVmNiIjojqYRVwGiXbsaG9GGkMZ/Vf9spaZmsSzZ3VgDG4f/BApevczkELaRdOsvkqbnWU48KwHNS2rF3inF665WB/wZlSqEUKwSPAJFxWyo3q8Gq0lM7JV9tUnJ3blfTiLy2DDnM1Hg+8a/n5KNTE4Oyrr3QHwebsB7MS9l8XiF0xE+aYNcIkxNJHxH0AfhWv6rBRtd6jg==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 02 Jun 2025 16:40:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-06-02 09:45, Alejandro Vallejo wrote:
On Fri May 30, 2025 at 11:04 PM CEST, Jason Andryuk wrote:
On 2025-05-30 08:02, Alejandro Vallejo wrote:
Not a functional change.

Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>

Some sort of reason would be good in the commit message.

"struct pci_dev is used in function prototypes within the header.  This
is in preparation for including (transitively) in device tree"?


... I'm guessing that is why.  Stating  it would be better.

Yes, but I'm not sure the second part of that explanation is relevant. Unless
specifically noted in the header, they are meant to stand by themselves when
possible and not require preinclusion of something else (in this case, 
xen/pci.h).

This patch would still be relevant (imo) even if I wasn't using the header for
anything.

Yes, this could be made as a totally independent clean up, and that would be fine. If this is a prerequisite for some later change, I think it is useful to highlight it. It would not otherwise be evident when looking at the history. Because I haven't gotten farther into the series, I don't know if this patch is an independent cleanup or a prerequisite.


With a suitable reason:

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Thanks,

Does this sound reasonable?

   struct pci_dev is used in function prototypes within the header, so it must
   be forward declared for asm/pci.h not to depend on xen/pci.h being included
   first.

Sure.  Or just:
struct pci_dev is used in function prototypes within the header, so this forward declaration makes it standalone.

My point is: we should explicitly state what the patch is trying to achieve. It helps reviewers and future git history readers.

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.