Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp304638pxm; Wed, 2 Mar 2022 15:55:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/qZcNYMAdrq+gUWY2SsdszpljzdTuD4gL8tiqAm8nUXrVwIOAVO7dI5Knz5upKHtkLIk8 X-Received: by 2002:a17:902:ccd2:b0:14f:8182:96c4 with SMTP id z18-20020a170902ccd200b0014f818296c4mr33778948ple.67.1646265350298; Wed, 02 Mar 2022 15:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646265350; cv=none; d=google.com; s=arc-20160816; b=RoJi9bBEbhgGqWlV1SWFDBLZOlmt00S2uxLRte07U5euQ3MVtg10XXqF9GI0JEohOn RIAvB649FM5UsEXmrvGKF7gG0vkinsVVzXc41afoPzKnZ8dqPIcb4BhP4+ne9T57mMH4 T3W7JpUXQ6GfjRwKg+QVJk1X9XAQy7iZ9zXb3S4L7P/yZlIDn9Re7kpRqaTcGcSekRAY qJZjgpsQpPf5WIebe9IeGNRAIXu5HqrVp/D3U1CIA6mOu7h74UYCkvcBvryVem85TOiE ecYlClMwaho1lUSOL34V39dEE7rWb03uCOAWF+iFAeosQMp3VWFrBFebgyMyFX8RD7Uy PhDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=v11hfRoQu1fg39kUHDWK/6VsoIH8chBcL+taYJtpY1I=; b=HcMY8hpyY5d89PFDcsaDnmGPN7QWLznwu2sgIv37cuUycYh+GphGOmRJ1t7286fP4U hZVNbcCShWHEi7uPh3vEZN+71AeEB2MWVBXNIYYUixJeQ9+XfhDCIsCPMWjXsdPTabD6 9hmmNSLdVpOSVJ7wVccT1Mcd+fYyH79NsmRMPnat9XAjT3A/vaQUZZ/G/oKox9rW9+pe O/6/YbyLFdCr8yd6ZXIfMSdCbP7kgfJcM77jffExQCobgAIZjJByDyBthN+BPlucZnYE PiWZQHSw9eVFDvOGPL/1c+ZvQoCPX1tjDHqcz0E2o0jYP+GDgReJrbzBWYR9cA2Doj/c bA+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=b3jTeBOR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o12-20020a17090ab88c00b001bca18c3878si6461200pjr.127.2022.03.02.15.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:55:50 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=b3jTeBOR; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F0B418E3E4; Wed, 2 Mar 2022 15:16:25 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239469AbiCBEg3 (ORCPT + 99 others); Tue, 1 Mar 2022 23:36:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239448AbiCBEgJ (ORCPT ); Tue, 1 Mar 2022 23:36:09 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C8FAB0A47 for ; Tue, 1 Mar 2022 20:35:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=v11hfRoQu1fg39kUHDWK/6VsoIH8chBcL+taYJtpY1I=; b=b3jTeBOR8s3QCTWuv6CBHUmLf3 z8wzpzwVEvqyRVgCIutXhzOx5QfDKeAjnCt89HIcqvIQqDJNm+sZ1QteCpqUtIbo8NL7H1DjG6Bz6 GCM7oxChQdXVcUPnO7+iSBbI4bBEOk/E/cPD8J0thJ/vWo262jQupiPBg2OSz9/nEBMZheKaJbKw/ kfHz6QTx4zNTCIMHmmCV4wyXWtlYpBsbbZwGoh8vBtXVzZ7e91OtVY4TRNHNOzLLNJzyiavcO9Nnv XcLBluBhIXde8S5rcLsP54n8tyvpJwm4YlyJcSY6ioS1rvk/9Jt5vY3p5vlbSbXxf9ZVOANshyePc fRycxEXQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPGhS-00AF7H-GV; Wed, 02 Mar 2022 04:34:54 +0000 From: "Matthew Wilcox (Oracle)" To: Kees Cook , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Linus Torvalds Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 10/19] wait: Parameterize the return variable to __wait_event_killable_timeout() Date: Wed, 2 Mar 2022 04:34:42 +0000 Message-Id: <20220302043451.2441320-11-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220302043451.2441320-1-willy@infradead.org> References: <20220302043451.2441320-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Macros should not refer to variables which aren't in their arguments. Pass the name from its caller. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/wait.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 9089c8bde04b..524e0d1690a4 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -934,9 +934,9 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *); __ret; \ }) -#define __wait_event_killable_timeout(wq_head, condition, timeout) \ - ___wait_event(wq_head, ___wait_cond_timeout(condition, __ret), \ - TASK_KILLABLE, 0, timeout, \ +#define __wait_event_killable_timeout(wq_head, condition, timeout, __ret) \ + ___wait_event(wq_head, ___wait_cond_timeout(condition, __ret), \ + TASK_KILLABLE, 0, timeout, \ __ret = schedule_timeout(__ret)) /** @@ -961,14 +961,14 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *); * * Only kill signals interrupt this process. */ -#define wait_event_killable_timeout(wq_head, condition, timeout) \ -({ \ - long __ret = timeout; \ - might_sleep(); \ - if (!___wait_cond_timeout(condition, __ret)) \ - __ret = __wait_event_killable_timeout(wq_head, \ - condition, timeout); \ - __ret; \ +#define wait_event_killable_timeout(wq_head, condition, timeout) \ +({ \ + long __ret = timeout; \ + might_sleep(); \ + if (!___wait_cond_timeout(condition, __ret)) \ + __ret = __wait_event_killable_timeout(wq_head, \ + condition, timeout, __ret); \ + __ret; \ }) -- 2.34.1