lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoMy_8lcdS-NN76w@google.com>
Date: Mon, 1 Jul 2024 15:51:43 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: Michael Hennerich <michael.hennerich@...log.com>,
	Utsav Agarwal <utsav.agarwal@...log.com>,
	Nuno Sá <noname.nuno@...il.com>,
	Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iInput: adp5588-keys - use guard notation when acquiring
 mutexes

On Mon, Jul 01, 2024 at 10:28:09PM +0200, Uwe Kleine-König wrote:
> Hello Dmitry,
> 
> $Subject ~= s/iI/I/

Oops, vim strikes again ;)

> >  
> >  static int adp5588_gpio_direction_output(struct gpio_chip *chip,
> > @@ -310,9 +296,9 @@ static int adp5588_gpio_direction_output(struct gpio_chip *chip,
> >  	struct adp5588_kpad *kpad = gpiochip_get_data(chip);
> >  	unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]);
> >  	unsigned int bit = ADP5588_BIT(kpad->gpiomap[off]);
> > -	int ret;
> > +	int error;
> 
> If you keep ret it's consistent with the other functions in this driver
> (at least the one you touched above).

This is part of my quest to have variables that hold error codes (i.e.
when we do not return them in case of success) to be called "error".
"ret" or "retval" is to be used when it is returned in both error and
success cases; before the guard notation we needed to use the same
variable in both success and failure.

> 
> Otherwise looks fine to me,

Thanks for the review!

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ