Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp478793lqh; Thu, 28 Mar 2024 07:33:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiMhUVqmHzrXIgfMhkV1JZFsg5I/FEMXITVJa436DRiAzAFo81B+nIvmNelGmJqa641OlgYTBGuAqoPyS2bDm9/g+5W91guhJHYc0s7g== X-Google-Smtp-Source: AGHT+IHtE+9p1ILbKeGhVt9sIY7J+MMaxQOY3g32C6Sg/ZnGODZxDm645FHaLWkiXBZVKXSt1tix X-Received: by 2002:a05:6358:5913:b0:17f:5ef7:1579 with SMTP id g19-20020a056358591300b0017f5ef71579mr3059545rwf.12.1711636434027; Thu, 28 Mar 2024 07:33:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711636433; cv=pass; d=google.com; s=arc-20160816; b=cSzFB9p9Li3AvonmqDQMMEalVRrD+SjyeuKG1Li6SrpSIdTwRKEM/IqfJa9wAljVg0 vDaTXottcy25xwpoDfBD6iC2V2PPqQkMiP0DBmjw85QJ6wBTY89MDwjLq5uvN7nQzesr H8ioQILfR5eUxHn1hHaR6UcTUAPWgljzJgubrqVmvQQGLdmZMiye4hnEBJlbg2GotpYx Ug1HjJTKO68R4jIIV23dzyZjG0HJ6eSrywlHcLn98jhZfE1NqtJSUp/8Gpqo/MA/aEEo S+fkpYcKZd2REmcTAvVLNjVB7PK2rFBsEkk1Qf2EOE9PO5Z1t71WAILMQNv0/wNB9DuP K8Qg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IRxeomwazNJFK1HayCeAUxvuqWGcFvZTZgMDjY15jY8=; fh=lWun0edhMwSrp2DMz6XA1+1FI0utgT9scmkd8QhvWeE=; b=Zf52+uEO7+iyVW/njT47/mYJS73GhwtQXMffKki5Yug1QiDLyHW8wZIjkaFaVqFgKr iCYv676wCBzSQmXke5AegREU+u1jDebhl/Yxo4pRkpT1XyDpbG/gURSho9wQBHFWLS7N BXHrMq8CteyQGIaayb9n2pHN5xqF1bwBEyHheNtvs9GlHLPU+cvJugaK4b5OzoYMnFWs NIvz+LWgnZHkewBPg/Nn4vU35yV87LOMLT89FWNmxThoyFTzSzBJCNO/nTGavoy1rzoi QD1uLt8WzWO8AILkRy2dpDAmWrSaehqW5+7+sijano9Wi2x4nCbQQ2pX7PrXIw9e1Dhb 7xOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=liAm5gps; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bv185-20020a632ec2000000b005dc4ec48cb5si1487682pgb.641.2024.03.28.07.33.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 07:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=liAm5gps; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-123080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A5767292464 for ; Thu, 28 Mar 2024 14:33:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B41AB12E1C9; Thu, 28 Mar 2024 14:32:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="liAm5gps" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B8A62130E45; Thu, 28 Mar 2024 14:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711636320; cv=none; b=D+dT1TUN4HfcfLaedb4L3Hm0NXxqJkZyC69qaF01gV1/JaMi+Pd1abMZDe5qy7tlK+cfKxLQmxDLkaWwMXLYWQ9FmHKTgE7V1MdpZ5j547Ty1aC5tTKeeQlS0zyJ277jJIBjWolGkifOaRsHKgmGrS/m1h32dB07BrH5WVeidm8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711636320; c=relaxed/simple; bh=bQir+LnXysAhPZ396iMcqboZJXRv11Qwf6prsi0Igo8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tNOUi/TzKrMCQ7w9BMx05VwdgguSWHpqbnUPnrbRFB5DhPvXLiR3oAjwrku8qvYw88DxxoqF4xbBdhHDZhGx4w4yCn6bjOkNTsETH4G7oLgVx4epKzEA98f1g2D5a1Qp0eL4u7jP7iiV2ZT2eg4D3fS5MpZTq/8mpbGyPh7Ggl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=liAm5gps; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A30DC433F1; Thu, 28 Mar 2024 14:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711636320; bh=bQir+LnXysAhPZ396iMcqboZJXRv11Qwf6prsi0Igo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=liAm5gpsUU3TfhVsQ0ds/wY4LTN/URRYHe8wfWIMPMwve7nP8Tx0ppkFakNHWeFoG G9zUo7Xb9xSrzVNuWGM6AmS9LJ2h7SA/YK890UR7pm3ZCL3iHJ5ytr2vILOXZc6Pvy IvTi01GNrvQjFvVdEa+BmDvmrxSqIPitR/WoSyv5ZC9JVGWvwDMm8EhrwbnA+2esr4 8l0MIBo6tv0tvEFirVLddDTLvk+QRRamCltTRizGF5UEIXY7QpWF4mIpjgP2DEun7P zHwDYRs3rRoeSuUOXdxp4i5a2hYw29lh/0tbRmGPW4DyLFW/PfoBf8fsaSzyZRi+S7 jHCOTMtOeo9kQ== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Ryusuke Konishi , Nathan Chancellor Cc: Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton , Philipp Stanner , Christian Brauner , Jeff Layton , Thorsten Blum , linux-nilfs@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 6/9] nilfs2: fix out-of-range warning Date: Thu, 28 Mar 2024 15:30:44 +0100 Message-Id: <20240328143051.1069575-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240328143051.1069575-1-arnd@kernel.org> References: <20240328143051.1069575-1-arnd@kernel.org> 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: Arnd Bergmann clang-14 points out that v_size is always smaller than a 64KB page size if that is configured by the CPU architecture: fs/nilfs2/ioctl.c:63:19: error: result of comparison of constant 65536 with expression of type '__u16' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (argv->v_size > PAGE_SIZE) ~~~~~~~~~~~~ ^ ~~~~~~~~~ This is ok, so just shut up that warning with a cast. Signed-off-by: Arnd Bergmann --- fs/nilfs2/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index f1a01c191cf5..8be471ce4f19 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -60,7 +60,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, if (argv->v_nmembs == 0) return 0; - if (argv->v_size > PAGE_SIZE) + if ((size_t)argv->v_size > PAGE_SIZE) return -EINVAL; /* -- 2.39.2