From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3210C43334 for ; Tue, 21 Jun 2022 15:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353059AbiFUPkl (ORCPT ); Tue, 21 Jun 2022 11:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353052AbiFUPk3 (ORCPT ); Tue, 21 Jun 2022 11:40:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34852BB28 for ; Tue, 21 Jun 2022 08:40:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F0DC61771 for ; Tue, 21 Jun 2022 15:40:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99EA4C3411C; Tue, 21 Jun 2022 15:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655826026; bh=0cWo2c/zm4WO9qVU6zetr7PwvaMjZ7v86/LilLir9l4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UhhR/jvf1BmEPDZt6K4zfAUu+RkhmRSSLKWrINgb3prFzDDq8qrS/f1DQuNQd3fLu V7bgl7KXH3MzObapmP/cgxbCW9iXWM7lgWrwkr5YY7pIoVaNUyRcg8N32SzhmJm2RY I2tMyQE2vN8SnsZkW0dx3j9A3OGVsLroFwVFRptVem2SHDiIYc/jTNOY08+znjwvZ5 G6QGgWhuA605hecgIEPrmYqSKF+Ap5Pum/69MctTYyYIjnhUqPGt+ViZEFlytSmoyg 1LseJLbH9WHszksClrtsTuAn17wvD1VxZaqLI/qIoLs12EA+VvgQADzXnVZau3qaPi QzoYW0rRX+hjg== Date: Tue, 21 Jun 2022 08:40:24 -0700 From: Nathan Chancellor To: Pavel Begunkov Cc: io-uring@vger.kernel.org, Jens Axboe Subject: Re: [PATCH for-next 03/10] io_uring: fix io_poll_remove_all clang warnings Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Jun 20, 2022 at 01:25:54AM +0100, Pavel Begunkov wrote: > clang complains on bitwise operations with bools, add a bit more > verbosity to better show that we want to call io_poll_remove_all_table() > twice but with different arguments. > > Reported-by: Nathan Chancellor > Signed-off-by: Pavel Begunkov Thank you for sending the patch! Apologies that I didn't do it but I decided to actually take a full weekend off for once :) Looks like Jens already applied it but just for the record: Reviewed-by: Nathan Chancellor > --- > io_uring/poll.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/io_uring/poll.c b/io_uring/poll.c > index d4bfc6d945cf..9af6a34222a9 100644 > --- a/io_uring/poll.c > +++ b/io_uring/poll.c > @@ -589,8 +589,11 @@ __cold bool io_poll_remove_all(struct io_ring_ctx *ctx, struct task_struct *tsk, > bool cancel_all) > __must_hold(&ctx->uring_lock) > { > - return io_poll_remove_all_table(tsk, &ctx->cancel_table, cancel_all) | > - io_poll_remove_all_table(tsk, &ctx->cancel_table_locked, cancel_all); > + bool ret; > + > + ret = io_poll_remove_all_table(tsk, &ctx->cancel_table, cancel_all); > + ret |= io_poll_remove_all_table(tsk, &ctx->cancel_table_locked, cancel_all); > + return ret; > } > > static struct io_kiocb *io_poll_find(struct io_ring_ctx *ctx, bool poll_only, > -- > 2.36.1 >