Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp368590lqi; Wed, 6 Mar 2024 22:21:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWg+F7PA2DfJo/NJIRwoeBqWo7IzngrnP2a78Ufz30OI9rcYMhvUJcUYlWn22bNO4u13dnxX0jsf61u/xmZSvtZVkGMVtFpIuR3JMrjIQ== X-Google-Smtp-Source: AGHT+IE/jr6EU1qQy629i9XiRY2gKwWJXBYzEUu3nwnKcYssT+/BhZzDb4FXxN9XBLQen1GPKWWE X-Received: by 2002:a05:6a20:c312:b0:1a1:4519:fab3 with SMTP id dk18-20020a056a20c31200b001a14519fab3mr5842643pzb.34.1709792461338; Wed, 06 Mar 2024 22:21:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709792461; cv=pass; d=google.com; s=arc-20160816; b=TQ605EeuxMPAjz1BBY/WzmUNfkWOxtxo77fXBFk3mG5Zg8KXcSdPJFmhIhrWO4JA2D VTmwj+1Db/dysKTmKer1UyPgbrlhiR6xFYHgWJ/VijNgF3/QybYmPO1pFou/fbxFXmKe TnSWgH+MIRRRlpA8JCqGRsEQDemzOJOKeP8QgOLXcbK4NYWnb560+821L863rwGovsAG 4WRuGccuyWeWG5e4utOPHrcv4uo66MCUTWqgOVii3W/bBksXEKVspPfRiRLtJ8/YBqoj jjKZ5d49xwz5GjyOnmEWPAGjj2vAMTQsMpOxyLfcq/JsP7R0iQMiBHt0qf/+EfLXrrdS BFNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:organization:references:in-reply-to:message-id:subject :cc:to:from:date; bh=TR07HplWecDy6r/VQpS8WfHvECzHr3uQqMqMiwWLE44=; fh=54Jp2ef4dlzjzyBSdsoD3zZyp3M+VD1JYFNr7xuKQK0=; b=cP4SPnHcl3NMlVPaYgwUmQCuGNOqGmkS/2cw0phOEIZZ+YF1vH2Us0j3cuW+T/k2mj KyQVmYodhqA3W8v1KX3WvGtDGgSbwWhBgibsGLKObvjMgW6QvT78q+ocbujZd45gC3Fh dX1ZwCOT+kjhszk25DRUKzpMT1UULCO1Wih39DO3SH76mwpGAa0xNNM2U7n60W6iNHO7 VPa9I2C8MHKa7xUfguznsNLw3EWcWHqMWgOOdZxoa0q81nhKT+yqxQCQyiR6FJRTOzGw 4TQc8i1Nn6JgnGCKlCfBj500J7fpf377Py7a3aKP40H3443CJXHh640QE1j8vyRFRPd8 A1Hw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-kernel+bounces-95001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95001-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e8-20020a170903240800b001dbcfb509fcsi13589387plo.63.2024.03.06.22.21.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 22:21:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=uniontech.com); spf=pass (google.com: domain of linux-kernel+bounces-95001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95001-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8EEB3B23202 for ; Thu, 7 Mar 2024 06:20:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B955F1BF47; Thu, 7 Mar 2024 06:20:11 +0000 (UTC) Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B9A4DF55; Thu, 7 Mar 2024 06:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709792411; cv=none; b=BZWejaFx5AjoqhJJhNEFCMHmcW+zhQhbigUYnv2cFMR/qF05hciHEwQxEtcboapeWEnQvQCl9c4cqmCgWOU/9TDNkXyBBYk5p0ztkrIxv7wDyjftVPse1Pp01IYbG5i3SUAOztB4pij4RVLAwlc3xZutTo6BZr/ZPDzpcpwJaoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709792411; c=relaxed/simple; bh=j3yWuejBZBKKlxe3rNUKzA09kOU9/6mpjPimlFDFC5E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i+KWAeasaikzF7H9R74BqSx3ffS26gREnuho6/XwkUwoz0OGJkC8XHXPZfGm6k5+rZvA8DL5g4Sukepwdn3gZZaS5Ca5Sfx9nwAHkn01j9YcLvR/zeHUenQzN4MAEZGOuHxRiqp/V710Jt0jHmj+j2KdimEirG6lp87O+ZdEI1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; arc=none smtp.client-ip=54.254.200.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com X-QQ-mid: bizesmtp89t1709792319t5ocxlui X-QQ-Originating-IP: u3EQS7kP8U3VDMCXVn7nsuBT8nJ4UIZUTBPGzRxAsQc= Received: from winn-pc ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 07 Mar 2024 14:18:38 +0800 (CST) X-QQ-SSF: 01400000000000I0I000000A0000000 X-QQ-FEAT: 5q30pvLz2if4oetgJCutpIv/qq/dnVqK4xyUbWJFUwvV8Cf8vAh+aMwKSMdQ4 teTUb4wiFyu8Rzhn/1BfxkvIMD+o6bLVbyyj71OGDR4gM/ohmZHrc8/LsJuhhlIE9QQPgDh U3XIHaKYj5m+yaCBlfSUC9QbaNtTSwHEk+lKGyrh35mAC274FVs27opvAwNadWByaaJnDm+ Q8OzEPn+HgyokixphNjKC4+rrzlD4CvDIar64tJCnGn6SavsBfZv3iNClpu0z+UrGC6EQub C++GEBNX2+uPjKOAArZKJbFNenmN2VBbZwk5whT6qs8JVotkxpQLi03Jst6NVWqBkoG4Gm7 zSksAHez1GuA4q5ZKBXvjnBGC/zkgyjKJPJExgdd7XFGjpG0GsZYQfWCuSpB4lR9SAeM/RK Tsv3JlIRBTQ= X-QQ-GoodBg: 1 X-BIZMAIL-ID: 6209662112908991544 Date: Thu, 7 Mar 2024 14:18:37 +0800 From: Winston Wen To: Stephen Rothwell , Jan Kara , Peter Zijlstra Cc: Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the ext3 tree Message-ID: In-Reply-To: <20240307110717.50b64fe9@canb.auug.org.au> References: <20240307110717.50b64fe9@canb.auug.org.au> Organization: Uniontech X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/EEmQMRzKmMSEPIz7proBNED" X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrgz:qybglogicsvrgz6a-1 --MP_/EEmQMRzKmMSEPIz7proBNED Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, 7 Mar 2024 11:07:17 +1100 Stephen Rothwell wrote: > Hi all, > > After merging the ext3 tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > In file included from include/linux/sysctl.h:27, > from include/linux/fanotify.h:5, > from fs/notify/fanotify/fanotify.c:2: > fs/notify/fanotify/fanotify.c: In function 'fanotify_get_response': > fs/notify/fanotify/fanotify.c:233:48: error: suggest parentheses > around arithmetic in operand of '|' [-Werror=parentheses] 233 | > TASK_KILLABLE|TASK_FREEZABLE); | > ^ include/linux/wait.h:283:11: > note: in definition of macro '___wait_is_interruptible' 283 | > (state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ^~~~~ > include/linux/wait.h:935:9: note: in expansion of macro > '___wait_event' 935 | ___wait_event(wq, condition, state, 0, > 0, schedule()) | ^~~~~~~~~~~~~ > include/linux/wait.h:958:25: note: in expansion of macro > '__wait_event_state' 958 | __ret = > __wait_event_state(wq_head, condition, state); \ | > ^~~~~~~~~~~~~~~~~~ > fs/notify/fanotify/fanotify.c:231:15: note: in expansion of macro > 'wait_event_state' 231 | ret = > wait_event_state(group->fanotify_data.access_waitq, | > ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors > > Caused by commit > > 3440e7e55ced ("fanotify: allow freeze when waiting response for > permission events") > > Though, I guess, you could argue that the ___wait_is_interruptible > macro should parenthesise the use of its "state" argument. > > I have used the ext3 tree from next-20240306 for today. > Sorry I missed this warning. And agreed! I can add parentheses on the call side, but it may be more reasonable to add them in the macro. Hey Peter, Could you please take a look at the patch attached at your convenience? Thanks! -- Thanks, Winston --MP_/EEmQMRzKmMSEPIz7proBNED Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-wait-add-parentheses-to-state-argument-in-macro.patch From 17bdb67492823e90e77f4e3159d631efc4cdd865 Mon Sep 17 00:00:00 2001 From: Winston Wen Date: Thu, 7 Mar 2024 10:59:59 +0800 Subject: [PATCH 1/2] wait: add parentheses to "state" argument in macro Now if we use macro wait_event_state() like this: wait_event_state(waitq, condition, TASK_KILLABLE|TASK_FREEZABLE); we'll get a build warning in __wait_is_interruptible because of: ((state) & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) Parenthesise the use of "state" argument to avoid this warning as it's very common to use "TASK_*|TASK_*" as function parameter in kernel. Signed-off-by: Winston Wen --- include/linux/wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 8aa3372f21a0..a4e57865aded 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -280,7 +280,7 @@ static inline void wake_up_pollfree(struct wait_queue_head *wq_head) #define ___wait_is_interruptible(state) \ (!__builtin_constant_p(state) || \ - (state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) + ((state) & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags); -- 2.43.0 --MP_/EEmQMRzKmMSEPIz7proBNED--