* [PATCH] powerpc/eeh:Fix some mistakes in comments
@ 2021-09-27 2:35 Kai Song
2021-09-30 6:31 ` Daniel Axtens
0 siblings, 1 reply; 4+ messages in thread
From: Kai Song @ 2021-09-27 2:35 UTC (permalink / raw)
To: linuxppc-dev; +Cc: ruscur, oohall, mpe, benh, paulus, linux-kernel, Kai Song
Get rid of warning:
arch/powerpc/kernel/eeh.c:774: warning: expecting prototype for eeh_set_pe_freset(). Prototype was for eeh_set_dev_freset() instead
Signed-off-by: Kai Song <songkai01@inspur.com>
---
arch/powerpc/kernel/eeh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index e9b597ed423c..4cd4acb049ec 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -761,8 +761,8 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
}
/**
- * eeh_set_pe_freset - Check the required reset for the indicated device
- * @data: EEH device
+ * eeh_set_dev_freset - Check the required reset for the indicated device
+ * @edev: EEH device
* @flag: return value
*
* Each device might have its preferred reset type: fundamental or
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/eeh:Fix some mistakes in comments
2021-09-27 2:35 [PATCH] powerpc/eeh:Fix some mistakes in comments Kai Song
@ 2021-09-30 6:31 ` Daniel Axtens
2021-10-07 12:55 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Axtens @ 2021-09-30 6:31 UTC (permalink / raw)
To: Kai Song, linuxppc-dev; +Cc: Kai Song, linux-kernel, oohall, paulus
Hi Kai,
Thank you for your contribution to the powerpc kernel!
> Get rid of warning:
> arch/powerpc/kernel/eeh.c:774: warning: expecting prototype for eeh_set_pe_freset(). Prototype was for eeh_set_dev_freset() instead
You haven't said where this warning is from. I thought it might be from
sparse but I couldn't seem to reproduce it - is my version of sparse too
old or are you using a different tool?
> /**
> - * eeh_set_pe_freset - Check the required reset for the indicated device
> - * @data: EEH device
> + * eeh_set_dev_freset - Check the required reset for the indicated device
> + * @edev: EEH device
> * @flag: return value
> *
> * Each device might have its preferred reset type: fundamental or
This looks like a good and correct change.
I checked through git history with git blame to see when the function
was renamed. There are 2 commits that should have updated the comment:
one renamed the function and one renamed an argument. So, I think this
commit could have:
Fixes: d6c4932fbf24 ("powerpc/eeh: Strengthen types of eeh traversal functions")
Fixes: c270a24c59bd ("powerpc/eeh: Do reset based on PE")
But I don't know if an out of date comment is enough of a 'bug' to
justify a Fixes: tag? (mpe, I'm sure I've asked this before, sorry!)
All up, this is a good correction to the comment.
There are a few other functions in the file that have incorrect
docstrings:
- eeh_pci_enable - missing parameter
- eeh_pe_reset and eeh_pe_reset_full - missing parameter
- eeh_init - missing parameter
- eeh_pe_inject_err - wrong name for a parameter
Could you fix all of the docstrings in the file at once?
Kind regards,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/eeh:Fix some mistakes in comments
2021-09-30 6:31 ` Daniel Axtens
@ 2021-10-07 12:55 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-10-07 12:55 UTC (permalink / raw)
To: Daniel Axtens, Kai Song, linuxppc-dev
Cc: Kai Song, linux-kernel, oohall, paulus
Daniel Axtens <dja@axtens.net> writes:
> Hi Kai,
>
> Thank you for your contribution to the powerpc kernel!
>
>> Get rid of warning:
>> arch/powerpc/kernel/eeh.c:774: warning: expecting prototype for eeh_set_pe_freset(). Prototype was for eeh_set_dev_freset() instead
>
> You haven't said where this warning is from. I thought it might be from
> sparse but I couldn't seem to reproduce it - is my version of sparse too
> old or are you using a different tool?
>
>> /**
>> - * eeh_set_pe_freset - Check the required reset for the indicated device
>> - * @data: EEH device
>> + * eeh_set_dev_freset - Check the required reset for the indicated device
>> + * @edev: EEH device
>> * @flag: return value
>> *
>> * Each device might have its preferred reset type: fundamental or
>
> This looks like a good and correct change.
>
> I checked through git history with git blame to see when the function
> was renamed. There are 2 commits that should have updated the comment:
> one renamed the function and one renamed an argument. So, I think this
> commit could have:
>
> Fixes: d6c4932fbf24 ("powerpc/eeh: Strengthen types of eeh traversal functions")
> Fixes: c270a24c59bd ("powerpc/eeh: Do reset based on PE")
>
> But I don't know if an out of date comment is enough of a 'bug' to
> justify a Fixes: tag? (mpe, I'm sure I've asked this before, sorry!)
It depends. If you think it's important that the fix gets backported
then you should add the Fixes tag.
In this case I would say no. The comments have been broken for years,
and it's a pretty obscure API.
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/eeh:Fix some mistakes in comments
@ 2021-10-01 1:36 Harris song (宋凯)-浪潮信息
0 siblings, 0 replies; 4+ messages in thread
From: Harris song (宋凯)-浪潮信息 @ 2021-10-01 1:36 UTC (permalink / raw)
To: dja, linuxppc-dev; +Cc: linux-kernel, oohall, paulus
Hi Daniel,
> Hi Kai,
>
> Thank you for your contribution to the powerpc kernel!
>
> > Get rid of warning:
> > arch/powerpc/kernel/eeh.c:774: warning: expecting prototype for
> > eeh_set_pe_freset(). Prototype was for eeh_set_dev_freset() instead
>
> You haven't said where this warning is from. I thought it might be from sparse
> but I couldn't seem to reproduce it - is my version of sparse too old or are you
> using a different tool?
We can get this warning when building kernel with 'W=1' .
You can refer to this: https://lwn.net/Articles/683476/
or this: https://lwn.net/Articles/440060/
> > /**
> > - * eeh_set_pe_freset - Check the required reset for the indicated
> > device
> > - * @data: EEH device
> > + * eeh_set_dev_freset - Check the required reset for the indicated
> > + device
> > + * @edev: EEH device
> > * @flag: return value
> > *
> > * Each device might have its preferred reset type: fundamental or
>
> This looks like a good and correct change.
>
> I checked through git history with git blame to see when the function was
> renamed. There are 2 commits that should have updated the comment:
> one renamed the function and one renamed an argument. So, I think this
> commit could have:
>
> Fixes: d6c4932fbf24 ("powerpc/eeh: Strengthen types of eeh traversal
> functions")
> Fixes: c270a24c59bd ("powerpc/eeh: Do reset based on PE")
>
> But I don't know if an out of date comment is enough of a 'bug' to justify a
> Fixes: tag? (mpe, I'm sure I've asked this before, sorry!)
>
> All up, this is a good correction to the comment.
>
> There are a few other functions in the file that have incorrect
> docstrings:
>
> - eeh_pci_enable - missing parameter
>
> - eeh_pe_reset and eeh_pe_reset_full - missing parameter
>
> - eeh_init - missing parameter
>
> - eeh_pe_inject_err - wrong name for a parameter
>
> Could you fix all of the docstrings in the file at once?
In fact, there are other warnings in this file, I will fix them and send a
new patch soon.
Kind regards,
Kai
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-07 12:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 2:35 [PATCH] powerpc/eeh:Fix some mistakes in comments Kai Song
2021-09-30 6:31 ` Daniel Axtens
2021-10-07 12:55 ` Michael Ellerman
2021-10-01 1:36 Harris song (宋凯)-浪潮信息
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).