linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: "Michael Hennerich" <michael.hennerich@analog.com>,
	"Utsav Agarwal" <utsav.agarwal@analog.com>,
	"Nuno Sá" <noname.nuno@gmail.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iInput: adp5588-keys - use guard notation when acquiring mutexes
Date: Mon, 1 Jul 2024 15:51:43 -0700	[thread overview]
Message-ID: <ZoMy_8lcdS-NN76w@google.com> (raw)
In-Reply-To: <pdnij2qolnmbcwtvlsdvkvtua7s7yjw4ms4bc7zyk3tpdr5pou@sga4mhcztfiz>

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

  reply	other threads:[~2024-07-01 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 17:57 [PATCH] iInput: adp5588-keys - use guard notation when acquiring mutexes Dmitry Torokhov
2024-07-01 20:28 ` Uwe Kleine-König
2024-07-01 22:51   ` Dmitry Torokhov [this message]
2024-07-02  7:31     ` Uwe Kleine-König
2024-07-02  6:11 ` Hennerich, Michael
2024-07-02  9:50 ` [PATCH] Input: " Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZoMy_8lcdS-NN76w@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=noname.nuno@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=utsav.agarwal@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).