[2/9] powerpc/hv24x7: Remove unnecessary parameter

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Tue Mar 24 09:17:20 AEDT 2015


Michael Ellerman [mpe at ellerman.id.au] wrote:
| On Tue, 2015-17-02 at 22:00:27 UTC, Sukadev Bhattiprolu wrote:
| > Use pr_notice_ratelimited() to log error messages and remove
| > the 'success_expected' parameter.
| 
| I don't understand how this is equivalent?

They are two unrelated changes that I should have separated.
| 
| The current code uses success_expected to indicate that once it's done the
| request once and found that it works, it then expects the request to continue
| working, and if it doesn't then that is an error.

The current code is using success_expected to _not_ log an error if
that initial request fails. i.e we silently return -EIO here.

I think the 'success_expected' parameter is not really necessary.
We can simply log the message even for that initial request.

And we can log it a lower priority than KERN_ERR since the message
is mostly for developers rather than users who would use event names
(which encode/abstract the domain and offset values).

| 
| Using pr_ratelimited() will do the opposite, ie. the first failure will print a
| message, but that may not really indicate an error, it may just be a badly
| configured request.
| 
| Or at least that's how I understand it, please convince me I'm wrong :)
| 
| cheers
| _______________________________________________
| Linuxppc-dev mailing list
| Linuxppc-dev at lists.ozlabs.org
| https://lists.ozlabs.org/listinfo/linuxppc-dev



More information about the Linuxppc-dev mailing list