Bjorn Helgaas wrote: > On Thu, Aug 07, 2025 at 03:37:36PM -0700, dan.j.williams@xxxxxxxxx wrote: > > Bjorn Helgaas wrote: > > > On Thu, Jul 17, 2025 at 11:33:50AM -0700, Dan Williams wrote: > > > > Link encryption is a new PCIe feature enumerated by "PCIe 6.2 section > > > > 7.9.26 IDE Extended Capability". > > > > > > > +++ b/drivers/pci/ide.c > > > > @@ -0,0 +1,93 @@ > > > > +// SPDX-License-Identifier: GPL-2.0 > > > > +/* Copyright(c) 2024 Intel Corporation. All rights reserved. */ > > > > + > > > > +/* PCIe 6.2 section 6.33 Integrity & Data Encryption (IDE) */ > > > > + > > > > +#define dev_fmt(fmt) "PCI/IDE: " fmt > > > > +#include <linux/pci.h> > > > > +#include <linux/bitfield.h> > > > > > > Trend is to alphabetize these. And I think there should be more > > > #includes here instead of using other things pulled in indirectly: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submit-checklist.rst?id=v6.16#n17 > > > > In this case I think it was only missing a: > > > > #include <linux/pci_regs.h> > > > > ...but more includes are needed in follow-on patches. Added those and > > alphabetized. > > I assumed dev_fmt was used by dev_printk(), but didn't go back to > look. Yes, but it is interesting from a "include what you use" perspective. This file is only using pci_info() defined in pci.h. It just so happens that pci_info() is a wrapper for dev_info(). So it is a bit of a layering violation to know that dev_fmt can be used to prefix pci_<level> messages and must be defined before any include. I could add a pci_fmt, but it would need to accommodate these too: drivers/pci/pcie/aer.c:15:#define pr_fmt(fmt) "AER: " fmt drivers/pci/pcie/aer.c:16:#define dev_fmt pr_fmt drivers/pci/pcie/dpc.c:9:#define dev_fmt(fmt) "DPC: " fmt drivers/pci/pcie/edr.c:9:#define dev_fmt(fmt) "EDR: " fmt drivers/pci/pcie/err.c:13:#define dev_fmt(fmt) "AER: " fmt drivers/pci/pcie/pme.c:10:#define dev_fmt(fmt) "PME: " fmt