Re: misc: bh1770glc: Use common error handling code in bh1770_power_state_store()

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

 



>> Adjust jump targets so that a bit of exception handling can be better
>> reused in an if branch of this function.
> 
> What is the benefit brought by this change?

Will you notice that the object code size can be a bit smaller
because the call of the function “pm_runtime_put” is specified at
two places in the implementation in comparison to three places before?


> Anyhow, are you seriously suggesting adding a goto to a label define
> within a if block?

Yes. - For this update suggestion.


> Is this somehow an Halloween related joke?

I hope not.

Another software design approach would be to move two statements from
the affected if branch to the end of this function. Such an adjustment
would have the consequence that the statement “goto unlock” will be
transformed into a jump to a backward target.
Would you prefer such an implementation variant instead?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux