Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp184805lqc; Thu, 29 Feb 2024 14:14:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvFQrWp0ZT7fRSDu4YHjY4HCNYcj4gcr4gPXDWMu7Ev0yOmS7+EL9xWRmI/vkR0KX4rnG3HCkTy3kX3YskslWhsN0ONAqTeG4BGYwEgQ== X-Google-Smtp-Source: AGHT+IHo63Ntpgw/aetRianDHslCfgLBuCjYRC63Pw35A/pUnUeNzQJ/8UARBAhOPUwZpxo14h8J X-Received: by 2002:a17:902:a9cb:b0:1db:edb8:35d8 with SMTP id b11-20020a170902a9cb00b001dbedb835d8mr2716863plr.34.1709244887675; Thu, 29 Feb 2024 14:14:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709244887; cv=pass; d=google.com; s=arc-20160816; b=pdfd4lm4rRf9vTYw2Mq8j9hTZM2JgDeV/y0U+fvjYKSaymlN5oQQdx2mHdb9ONm4Qp 560UWyw6JcTv1HDOtSdQqNhqIa/9lKz5jPQdpgmUcZHgqdHpT48+w+p5b87gJR7/fPRm Yfomi71QBVW2IibbfUO5i/e8ozRscyhO9mwhnps/8lmsEqThf0ovy8a4eU0Q8dlLs5NO 1clHcK7Z9Nf904ZYK8+Qtopk69RHcEdSTPg4SNjdMQParezcBUj/SF/t3O++IUw5x9UE v9JMpv1pDCZYVVOhnxPzsUVn/2WXz8x5olVLgC3W+AAULIX1jw//Mg7IcdYU39rlLVmI 5qhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=1WeRi85DTX5lSTK6mlOcymKvnVy6AoW4RjHw5tld64Q=; fh=+zSAgiqXK4ZohAE//S9oQEtPiTaVZ5WO+Hn7dz8+Rrg=; b=vaV76YNXPCgZY32OOizW2CFsD+HrwFCegyVt8kBAN/G5InuR+CrNW+At4W6VraTBuj Gb2g6OG0QE2QEI73U7aCG8N1Yz6mRG3gymlzFijf60rROLlH3o/NPO7T8oHE9IbmdO8H EbZXUdHzOcEQs4+Xmy6XoXAZXqzBh/yXU09oa7msA3JWEGANxlDN7XlxRsHO1cYLf+Wu Ev5yxb7wKTGbMLv/tQqtjmcfa6obhk+Fq6tQd5J2G4E9oUidkkhig6GmKFsuXEstvErB hNaUbyylCO53Rg+nuqoFUtI0ZnUSlYToi5SKEJCAhCNEHUlqr45Wgh56gCIT6tdKxSbw bVbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=G4Yg9EHh; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-87366-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87366-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 m4-20020a170902f64400b001dbe26ae64asi2240079plg.38.2024.02.29.14.14.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 14:14:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87366-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; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=G4Yg9EHh; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-87366-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87366-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 83DE9B22F63 for ; Thu, 29 Feb 2024 19:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 206C413C9E5; Thu, 29 Feb 2024 19:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b="G4Yg9EHh" Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 77C0C13C9E8 for ; Thu, 29 Feb 2024 19:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709235707; cv=none; b=h+uaGM6aExbPRaKCh3G/YPotyQe7jT+xCsypB0s+BSD2Sx2HvNqv/Dpz9tdwRJPHhyiWpfRLsChEunRFpIC256ZBRPTYQH6cPTvZxiWsO6OeDZY56XOw5ep6JtYVC1ErnbdS68+QFoyQ5k9cd08Bbg37kgtF44OX9vTAjYulhc4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709235707; c=relaxed/simple; bh=1WeRi85DTX5lSTK6mlOcymKvnVy6AoW4RjHw5tld64Q=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=BBYxu482MdoZa/HX/KeiSWaPOICRWrz1bJaIc2cKpcDL36dFBexuJHtvGM9EcBFaGNalIb6lO5fnwL2PPKHVXpEPmH6RkLGcftT0tIRT4QpyFxP1liYnkPqBVqMQNYQrMFT2YTuwmJ6g+NmsFaY4Pu10cg87uJ3dO0+X74g/Xrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com; spf=none smtp.mailfrom=toblux.com; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b=G4Yg9EHh; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toblux.com Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a3ddc13bbb3so413323566b.0 for ; Thu, 29 Feb 2024 11:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1709235704; x=1709840504; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1WeRi85DTX5lSTK6mlOcymKvnVy6AoW4RjHw5tld64Q=; b=G4Yg9EHhQaMtTfrL2N4vtrib1wEkvhZiBq3QLw/DBR3fCyzaQYGikMN5C7nDEtrMli ZjSgqEaecxu+AS4NymYOnIYHSN/DU04wQGB55cwLb1YrpaRXt5iwz32PtD2Y/G1bNt3U VXFm4cBy0heTcLmv+P9Ka28sw7uHNHw0F150sbgv1iexcWNKTM10yvsHvMH82EiIh1pz IAaI9+lW5iBmx/zknPpHtgidYQEguk1CVbgYts9deGZ5xOgg59wQgvMkwIbhv5BUK07x sb3y6loJdXv2Z41oxUVz+aqAwJqFnpPghbP3XgQFGZ3HS7wi6BeHAuSA7PE1S7HSjRhE 4NqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709235704; x=1709840504; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1WeRi85DTX5lSTK6mlOcymKvnVy6AoW4RjHw5tld64Q=; b=RKzNLQ8b1yzg/NiPQ2ekiNOVo7aDPlRTJyCV/egEvwiORwnZyv/4jThA8YTUdubL1Z IObwBIO3eHWyLZPWcWniRSAU5gtLmenlfDODwh/20OaSXb1XdshR6YxOO8N5KarOAZ4K n/oNNqlFz6ogkeU+xPAnQ608Dk5dJNMqsQACboI2lb20+OEF7Wirugm+PlgWS9Z671gW of6ksLQBBaGBw0a87/dr64IE6+9xB2Vixhx/iXtly2NWz/0K18B6wbPRB3brZHKQLTAv zixBVik5r9Jp/y89X9MGBBwYvnfbsouo10N9Zl//UcVD+rCcJNkLSTukt8NfNIUHXwLt HaPw== X-Forwarded-Encrypted: i=1; AJvYcCXmzyur78x/XPPfeusNPxiJ5XtfH+38ZMGufYGpj0wKMsa/Phb1rNbEfpXwgg5HicPMDL0+eAA7FIIcpbL2IctrWycZRCKvdhJ7R/oZ X-Gm-Message-State: AOJu0YydZwNksbefibwlJhiq4LmjhVSw0bxEc64WpKbzUNgbdn0fGVla PRklpCW4/QAh/kVa38sBif4lVlUjm1u0zJyZ/T6qOz7QbNOb3wrwNMW2o/iFr4o= X-Received: by 2002:a17:906:ce28:b0:a44:591:a3d8 with SMTP id sd8-20020a170906ce2800b00a440591a3d8mr2030486ejb.31.1709235703096; Thu, 29 Feb 2024 11:41:43 -0800 (PST) Received: from smtpclient.apple ([2001:a61:1069:f701:6c1a:d05d:ad7c:b80d]) by smtp.gmail.com with ESMTPSA id tj7-20020a170907c24700b00a413d1eda4bsm976623ejc.87.2024.02.29.11.41.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Feb 2024 11:41:42 -0800 (PST) Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: [PATCH] nilfs2: Use div64_ul() instead of do_div() From: Thorsten Blum In-Reply-To: Date: Thu, 29 Feb 2024 20:41:31 +0100 Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <19910196-DFF3-4F94-B6D3-B9BF722DF8B8@toblux.com> References: <20240229121650.33983-1-thorsten.blum@toblux.com> To: Ryusuke Konishi X-Mailer: Apple Mail (2.3774.400.31) > On Feb 29, 2024, at 19:45, Ryusuke Konishi = wrote: >=20 > All of the fixes in this patch seem to be correct, but this doesn't > cover nilfs_resize_fs(), nilfs_max_segment_count(), and > nilfs_sb2_bad_offset(), which also have do_div() that doesn't use the > return value. I just tested this, and Coccinelle didn't report nilfs_resize_fs() or nilfs_max_segment_count() because both divisors are fields of a struct. = I will refactor this and submit a v2. For nilfs_sb2_bad_offset(), where the dividend is u64 and the divisor is = u32, we would need a dedicated function like div64_u32() that doesn't calculate = the remainder, which doesn't seem to exist. What do you think? Thanks, Thorsten=