On Mon, Dec 21, 2015 at 11:46:32AM +0100, Ulf Hansson wrote:
> Related to patch1, I noticed that the callers of
> mmc_of_parse_voltage() don't check the return value. Adopting my
> suggested change to patch1, would enable them to be able to check the
> return code.

I disagree with that, because you make the "no voltage-ranges specified"
case appear to be successful.  What if a driver wants it to be mandatory?
You force them down the complicated path of checking the resulting OCR
which is horrid.

It would be better to return some other error code if it's missing, or
maybe return zero for "no voltage-ranges specified" and one for a
successfully parsed "voltage-range" specifier.  This would allow these
cases to be identified by users of this API.

I've gone with that, new patch series will follow when I get a moment
to prepare it, thanks.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to