On Thu, 17 Jul 2025 11:33:58 -0700 Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > Exercise common setup and teardown flows for a sample platform TSM > driver that implements the TSM 'connect' and 'disconnect' flows. > > This is both a template for platform specific implementations and a > simple integration test for the PCI core infrastructure + ABI. > > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > Cc: Lukas Wunner <lukas@xxxxxxxxx> > Cc: Samuel Ortiz <sameo@xxxxxxxxxxxx> > Cc: Alexey Kardashevskiy <aik@xxxxxxx> > Cc: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx> > Cc: Suzuki K Poulose <suzuki.poulose@xxxxxxx> > Cc: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx> > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> One really trivial comment inline. > diff --git a/samples/devsec/tsm.c b/samples/devsec/tsm.c > index a4705212a7e4..b93396ca0c92 100644 > --- a/samples/devsec/tsm.c > +++ b/samples/devsec/tsm.c > > static void devsec_tsm_disconnect(struct pci_dev *pdev) > { > + struct pci_ide *ide; > + unsigned long i; > + > + for_each_set_bit(i, devsec_stream_ids, NR_TSM_STREAMS) > + if (devsec_streams[i]->pdev == pdev) > + break; > + > + if (i >= NR_TSM_STREAMS) pet irritation - why imply cases that can't occur. if (i == NR_TSM_STREAMS) > + return; > + > + ide = devsec_streams[i]; > + devsec_streams[i] = NULL; > + pci_ide_stream_release(ide); > + clear_bit(i, devsec_stream_ids); > } > > static struct pci_tsm_ops devsec_pci_ops = {