Re: [PATCH v7 2/9] PCI/IDE: Enumerate Selective Stream IDE capabilities

dan.j.williams
2025-10-29T23:55:40Z

Jonathan Cameron wrote:
[..]
> > diff --git a/drivers/pci/ide.c b/drivers/pci/ide.c
> > new file mode 100644
> > index 000000000000..aa54d088129d
> > --- /dev/null
> > +++ b/drivers/pci/ide.c
[..]
> > + if (val & PCI_IDE_CAP_SEL_CFG)
> > + pdev->ide_cfg = 1;
> pdev->ide_cfg = FIELD_GET(PCI_IDE_CAP_SEL_CFG, val);
> will give more compact code. Entirely up to you.
>
> > +
> > + if (val & PCI_IDE_CAP_TEE_LIMITED)
> > + pdev->ide_tee_limit = 1;
> likewise, could just use FIELD_GET() to save a line.

I like it.

2: 8c22a857d384 ! 2: 3ed9e3c6372d PCI/IDE: Enumerate Selective Stream IDE capabilities
@@ drivers/pci/ide.c (new)
+ return;
+ }
+
-+ if (val & PCI_IDE_CAP_SEL_CFG)
-+ pdev->ide_cfg = 1;
-+
-+ if (val & PCI_IDE_CAP_TEE_LIMITED)
-+ pdev->ide_tee_limit = 1;
++ pdev->ide_cfg = FIELD_GET(PCI_IDE_CAP_SEL_CFG, val);
++ pdev->ide_tee_limit = FIELD_GET(PCI_IDE_CAP_TEE_LIMITED, val);
+
+ if (val & PCI_IDE_CAP_LINK)
+ nr_link_ide = 1 + FIELD_GET(PCI_IDE_CAP_LINK_TC_NUM, val);