lkml.org 
[lkml]   [2022]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 05/10] PCI/PTM: Add pci_disable_ptm() wrapper
On Wed, Sep 07, 2022 at 08:28:43AM +0300, Mika Westerberg wrote:
> On Tue, Sep 06, 2022 at 05:23:46PM -0500, Bjorn Helgaas wrote:
> > @@ -42,6 +42,13 @@ void pci_disable_ptm(struct pci_dev *dev)
> > pci_write_config_word(dev, ptm + PCI_PTM_CTRL, ctrl);
> > }
>
> Since you export these, I suggest adding kernel-doc to explain how these
> are supposed to be used in drivers (pre-conditions etc.).

Currently there really aren't any preconditions, so kernel-doc would
repeat the function name and parameters without adding any real
information, but I think it would be good to add a few explanatory
comments. It always seems obvious when writing it, but it's never so
obvious without all the context ;)

> > +void pci_disable_ptm(struct pci_dev *dev)
> > +{
> > + __pci_disable_ptm(dev);
> > + dev->ptm_enabled = 0;
> > +}
> > +EXPORT_SYMBOL(pci_disable_ptm);
>
> EXPORT_SYMBOL_GPL()?

I don't feel strongly either way, but am inclined to do the same as
pci_enable_ptm() and pcie_ptm_enabled(), which are both EXPORT_SYMBOL.
We could change all of them at once if it's worthwhile. Currently
there's only one caller (igc) in the tree.

Bjorn

\
 
 \ /
  Last update: 2022-09-07 23:12    [W:2.291 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site