lkml.org 
[lkml]   [2023]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] regulator/core: regulator_ena_gpio_ctrl: pull in ena_gpio state handling
On Wed, Aug 30, 2023 at 11:38:56PM +0200, Michał Mirosław wrote:

> - if (pin->enable_count > 1) {
> - pin->enable_count--;
> - return 0;
> - }
> -
> /* Disable GPIO if not used */
> - if (pin->enable_count <= 1) {
> + if (pin->enable_count-- <= 1) {

The goal isn't to write the minimum number of lines possible - this just
makes the logic harder to follow and for bonus points isn't obviously
related to the chnages described in changelog.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-08-31 13:14    [W:0.090 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site