[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190506152039.GT2239@kadam>
Date: Mon, 6 May 2019 18:20:39 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Cc: linux-kernel@...r.kernel.org, phil@...pberrypi.org,
stefan.wahren@...e.com, Eric Anholt <eric@...olt.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, devel@...verdev.osuosl.org
Subject: Re: [PATCH v2 2/3] staging: vchiq: revert "switch to
wait_for_completion_killable"
On Mon, May 06, 2019 at 04:40:29PM +0200, Nicolas Saenz Julienne wrote:
> @@ -1740,7 +1740,8 @@ parse_rx_slots(struct vchiq_state *state)
> &service->bulk_rx : &service->bulk_tx;
>
> DEBUG_TRACE(PARSE_LINE);
> - if (mutex_lock_killable(&service->bulk_mutex)) {
> + if (mutex_lock_killable(
> + &service->bulk_mutex) != 0) {
This series does't add != 0 consistently... Personally, I would prefer
we just leave it out. I use != 0 for two things. 1) When I'm talking
about the number zero.
if (len == 0) {
Or with strcmp():
if (strcmp(a, b) == 0) { // a equals b
if (strcmp(a, b) < 0) { // a less than b.
But here zero means no errors, so I would just leave it out...
regards,
dan carpenter
Powered by blists - more mailing lists