Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp571788lqh; Tue, 7 May 2024 07:46:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxh3Bz2USGFDWV8QCnZY+C804xiPc2hPjmXTonj/a8y31tbgVEiRxKn9QeWa3GjRL9tPQvJ6PMo5zSg2cABQctzDX16BWUx2p0x5BiDg== X-Google-Smtp-Source: AGHT+IH7/5Lj9dCT89mXyg36+6+CSPBZKujEKCjceS1ngDqOaiuWQN3RYzr4TJCSevkDIflxIfZR X-Received: by 2002:a17:902:f648:b0:1eb:828:9a71 with SMTP id d9443c01a7336-1eeabfa2b27mr284345ad.31.1715093215598; Tue, 07 May 2024 07:46:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715093215; cv=pass; d=google.com; s=arc-20160816; b=FuHvJeuxZdGZcbIxkrB/EQYdcE5r0sg6EIZtT5YLOfGx+0GIF+2fm8mqGuAnafRt61 8J1soKKuCgs8761m5yX9Z/W4x6ey2uzv1lYHxWKxTMnIBGQrw7viREzYQGFFmApgzlLD UGWezhk6+FvLmQfKi2mPoo9X8S+eNeMQgw33FrpQYj/1eYeDMVj0htMMetiHoLaAbWeH 9Itd/i2fTrfagrpda1RbYEt296986QV6ucPyAPDfpSRV6A5Q1L1n3jPJbcRUBFRf+yJY 9tBl3brI5bPsZOXGkf1sHNR3zlWquKhFVPck/N6R9hxMwTpLGtHkG5TAbuD/C02Mp+lO Vcmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=mLOr8T9rn6W4Mui4y9GmHNfyW1LxBncW4ibg3T7qe5A=; fh=2muNAHEPrwa9TeTroBlPsk8bY6FpHyPD/DZOV5jTCWg=; b=qBzvsrCI2AUn3M1M+9cR6d3EFLLJY1tJ4tPxF7ObGT5OA94UA3Ba12x8NaidtslRjv anaeuUDYiOZEO5TL6Je+13ApXKxiSiQ2BolvEK2m/d3ke6B0EMLiYQZaYHvL5A1Gl5Vd lviJ7yB47EUVZM9XVMYL1A91mxW8VUDrrnor91XA/Tdo/bqPHMpEIHjjMx7cgpM/vZYJ Av2SVADrF/KSF3IykCjI3k0Y3qxADBbxLHbf73eYr11UojgabKjFvrK8ZgiR/Atic4pe bt21tp+9MlKfX4bxugIHIrOdcPKpCPnv9IkFh6ddahNmjlE6SQ81pXIEghyO3NVpPT9v gPjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XIS9Otwf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-171568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u4-20020a17090341c400b001e4ea3583ffsi10486321ple.552.2024.05.07.07.46.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XIS9Otwf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-171568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E414C28E434 for ; Tue, 7 May 2024 14:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41B3D15FD11; Tue, 7 May 2024 14:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XIS9Otwf" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D72815FA79; Tue, 7 May 2024 14:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091903; cv=none; b=r0qMSguAZCYStmLcbJ88Aipwc0tW2JNi8iHpwSdkrOf6lezdOE0sNVE4Lsp4g73S6gv4UzngykjbageFumwTDcOjqxB5aFn9+2LqZlcf6/HeibeyY2NG02TjTpnvQFZUrbYCaD5lmX5mh3OJ82GoyvS1MhVnX0469c2wjD/JbEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091903; c=relaxed/simple; bh=+IdeP0WxTQxueZFiufonTCIn4CaPWcqXKf2H5nxLy3I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=izY62xA5OFQU2kFqCIPkEbZtKuy/Ei0+P4iJzG5nYDSa8kMoHtdA1WKsmWmgYpDstxuNVhAwe2fyyg592WFeR5whaj3xOeCfgwfT/H+O4COARVrvW3VaLb1UzuF+rBvKV8rBxmcR8jwfWZgF0/t8rybL3zivewNsWV2j2HGDhs0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XIS9Otwf; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1ed012c1afbso24420215ad.1; Tue, 07 May 2024 07:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715091901; x=1715696701; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mLOr8T9rn6W4Mui4y9GmHNfyW1LxBncW4ibg3T7qe5A=; b=XIS9Otwfbg6X+kxGOul8PxBtEZErKGVz/ENeM18Jqr5hqhuJF+DcgzmTCy2mRUD248 cTqKyYtbSYIY1OcLaBc1xaClCC0te2IKob1gpfhmBlR9u+mvAi1BYlL8JU5u0Jz9jNvP qnYamVZk1l/efbID56gcx9iTkKwrHjNxE/FDmHhbS4AL3xAjPwymxF/91OyNb/cRBASy 0hWzhR8f5s6u/KLFCIwZjSuq5c58eDyCzI4GtqFOkjOjOpt8WhqKx3vmSdcIBYBB7nnz sKfsekTIgNHN2ndH4f+o7dPKeyLn60qrwljd6QyLc1Ax/KGQJ3/pWL+nWUzpJuAgtSij oE5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715091901; x=1715696701; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mLOr8T9rn6W4Mui4y9GmHNfyW1LxBncW4ibg3T7qe5A=; b=LbTDAnXWaWVKZ4+TouY1CTnj+ZuiF1t5N3XwuVNwqvIO6QMRFWs6j095L99G8P9j2Z 6FWKQgTy5vz6Ij8aO6HiArPFG7ofY3UND+nLwDSPiPDl0zSL6kNqHO7s7uPjfgOq7BNA 4wnjUZGCwwdq2+bCsJqDCd4MGG3uGlbB6J2QpcnZnbGPtnMRmlSFlQPo0IsV4kgaUq78 +A8gOUNKBXmov8keA63hcTp0zXjOKEkyhGsclJCYSRf0JpE8xXy5XpGPPdBqqia7T90o ViJKKmo6fvzuX8nvOfTTfNI6GxpyTgSlI7RYTCeNkB3UyCwuM2aFacy6+IKsOk1j9Lnq yAdA== X-Forwarded-Encrypted: i=1; AJvYcCV8hOnqskuVSHD0779wpaVi0QT5Dm6siIhXn5VRBzSL60OCExqk8wjI6irba8zkJyUkkTH48oMvHSxzHuSZhVJdHbteYpYAPq77NBBf X-Gm-Message-State: AOJu0YyHjyZqCAwROtLdxHC1KoKqRP1Q8mKIHZbwVRmnrJMrqT5DWsF3 u2uSSA+OVkMc3Dnp1sA62QWFYIM1fjJIMBPwmq6GQ3HHoMj/PFOVgcd1fg== X-Received: by 2002:a17:903:41cb:b0:1ec:25d3:7335 with SMTP id u11-20020a17090341cb00b001ec25d37335mr3998626ple.26.1715091901185; Tue, 07 May 2024 07:25:01 -0700 (PDT) Received: from carrot.. (i222-151-5-6.s42.a014.ap.plala.or.jp. [222.151.5.6]) by smtp.gmail.com with ESMTPSA id u3-20020a17090341c300b001e245c5afbfsm10075091ple.155.2024.05.07.07.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:25:00 -0700 (PDT) From: Ryusuke Konishi To: Andrew Morton Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org, Bart Van Assche , Linus Torvalds , Rasmus Villemoes Subject: [PATCH -mm] nilfs2: Use __field_struct() for a bitwise field Date: Tue, 7 May 2024 23:24:54 +0900 Message-Id: <20240507142454.3344-1-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bart Van Assche As one can see in include/trace/stages/stage4_event_fields.h, the implementation of __field() uses the is_signed_type() macro. As one can see in commit dcf8e5633e2e ("tracing: Define the is_signed_type() macro once"), there has been an attempt to not make is_signed_type() trigger sparse warnings for bitwise types. Despite that change, sparse complains when passing a bitwise type to is_signed_type(). It is not clear to me why. Follow the example of and suppress the following sparse warnings by changing __field() into __field_struct(): fs/nilfs2/segment.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/nilfs2.h): ./include/trace/events/nilfs2.h:191:1: warning: cast to restricted blk_opf_t ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t degrades to integer ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t degrades to integer Cc: Linus Torvalds Cc: Rasmus Villemoes Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401092241.I4mm9OWl-lkp@intel.com/ Reported-by: Ryusuke Konishi Closes: https://lore.kernel.org/all/20240430080019.4242-2-konishi.ryusuke@gmail.com/ Signed-off-by: Bart Van Assche Signed-off-by: Ryusuke Konishi --- Hi Andrew, Bart has completed a patch that fixes the sparse warnings related to event trace header, as he kindly shared the link with you earlier. Here is the patch (I added a few tags), could you add this to your tree queue? I'll send this via email just in case since we don't usually exchange links. The patch "nilfs2: use integer type instead of enum req_op for event tracing header" that I sent is no longer needed, so I will withdraw it. Thanks, Ryusuke Konishi include/trace/events/nilfs2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/trace/events/nilfs2.h b/include/trace/events/nilfs2.h index 8efc6236f57c..8880c11733dd 100644 --- a/include/trace/events/nilfs2.h +++ b/include/trace/events/nilfs2.h @@ -200,7 +200,11 @@ TRACE_EVENT(nilfs2_mdt_submit_block, __field(struct inode *, inode) __field(unsigned long, ino) __field(unsigned long, blkoff) - __field(enum req_op, mode) + /* + * Use field_struct() to avoid is_signed_type() on the + * bitwise type enum req_op. + */ + __field_struct(enum req_op, mode) ), TP_fast_assign( -- 2.34.1