Re: [PATCH 00/17] MMC/SDHCI fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux