Skip to contentSkip to conversation

powerpc/eeh:Fix some mistakes in comments

PATCH Harris song (宋凯)-浪潮信息 1 participant 1 message Oct 1, 2021

lore
Share & tools
lore
#0 lore raw

Hi Daniel,

Quoted 11 lines

Hi Kai,

Thank you for your contribution to the powerpc kernel!

Quoted 3 lines

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/

Quoted 32 lines
Quoted 10 lines

/**
- * 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

Quoted 7 lines

- 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