On Tue, Mar 8, 2011 at 13:10, Paul Walmsley <paul@xxxxxxxxx> wrote: > On Tue, 8 Mar 2011, Varadarajan, Charulatha wrote: > >> Do you really want to return 1 in case of invalid powerdomain pointer? > > Sure, that's why I wrote it that way. It seems less risky than returning > 0. Do you have a proposal that makes more sense, given that this is going > to be called immediately after a omap_{device,hwmod}_get_pwrdm() ? Well. This means that it is the caller's responsibility to verify the powerdomain pointer before calling this function. Otherwise, this function assumes that the powerdomain looses context. I thought that it would be appropriate to return an int value, with which, the func would return an error in case of pwrdm ptr error, return a zero if the powerdomain can ever loose context and a non-zero value otherwise. What do you think? -V Charulatha > > > - Paul > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html