Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2119820rdd; Thu, 11 Jan 2024 22:50:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4RgEzVbuUsPWYG1sJtT1B5fdWdg3itvVrGJF397RtnglKbplwnPlxK39F6leTGfuhiMp3 X-Received: by 2002:a05:6358:101:b0:175:6496:5e10 with SMTP id f1-20020a056358010100b0017564965e10mr1701756rwa.40.1705042246837; Thu, 11 Jan 2024 22:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705042246; cv=none; d=google.com; s=arc-20160816; b=zjByrK28OPd77rEE9v28wXzu/e/FX1y731zJOQSEHU6U6YmfCcmrSuRELSlRZU1mC9 I6+TLU2uwua1OyaBxr2ujwRQGV5qLDEGnpZws20yXrhZYhVDDd4SefEiWyGdK7xAAnyO 84QVvnwxMg78vD3qCA6zzrzAXIZib+Lj19Ko/u49kjs9Zel9YykpD8C49XxY634o94SR TRh3C0CcQVIHgDCW/h+5thWDerOBvz005SOgo4jI0o9r10wfo4VSLkMxqUSs/lSHIaIL Q7wSqmrtRm4DtROzru1SaX2qMKVidlie57GVvIcoDw9ExTKsfNwNJFsd8AytXPDYpa91 avRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=MlwSyou2modxkJptQsGCaqFAJ4RumG9kIorw0KBq3N0=; fh=8LNRalGirpbwFBj1d+u0I5y8tTaTgDIG4fzZVGIV4fI=; b=O/S4ijYOrHVtP0mQhrNCXEx7J5J2nGDCA/brXcmsVGjFvmF9iVhQcjT4mEklIBCO5E BSmSerytCpPvGPZnby+2cEpRpT/+3mShBKZ8xlymVJLEy7dHKauTf3790SUxkp6MIRXJ Qms4xAwdK/q2abeybit43zXHjl1sGfmf1Goip/4N1ePpDRcRuXSesWNISRHk/7mrop7o ZPk3ie/murUkYZQlKvFsNKmKViugDnT+M2ddRvJxkgGyn4v2axx0DJMIipdFeFosh8MD CPc8vSXBn8636reodRUWOOo9bitPRT2e4G9rcXcIiqvzctB+M4pGk3UUg5WwZoISiSs0 IaXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4lNpPT8A; spf=pass (google.com: domain of linux-kernel+bounces-24344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id jo6-20020a056a00908600b006d9e15d5e38si2730880pfb.21.2024.01.11.22.50.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 22:50:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24344-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=@collabora.com header.s=mail header.b=4lNpPT8A; spf=pass (google.com: domain of linux-kernel+bounces-24344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E4A5CB25600 for ; Fri, 12 Jan 2024 06:50:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 331375C8F4; Fri, 12 Jan 2024 06:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="4lNpPT8A" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 ED51133067; Fri, 12 Jan 2024 06:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705042228; bh=rXcbu4QY6UCu3qy4gvXw+tpopWxC0tsBqLnsgFqfj/Y=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=4lNpPT8APDolfFCTLwh0woAmpgkpMjWjRiAcuOwGVtOmZHgPQJPjDY1i+rTrdB2jo rcLq9g8koWFxvFcoNPA6t6zy4fOxXySsLwmAPgXM0FD+11scWCGX3MGaDgD/FZ1CyV KMRCqOYoCxQQrN7fbTlRVoBgBdkE8c/9sFm7cHxjIzhxP8nr1tEn51VGbVZNWvbg+K 4oJveuu99TmvFwQj7tp1/wpHPw+/4BsCoOMl2XjIJnulTxtFHOxzY/6EDeQhnuBn9A rPAyhbTVZdGvr+4haE6jnHKRaXNN9G779HKR2d3cHiwmg9/1Zji3GKx+wnSwFBsOeZ A7PSHbMh2Jijg== Received: from [100.96.234.34] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id EC6403780624; Fri, 12 Jan 2024 06:50:25 +0000 (UTC) Message-ID: Date: Fri, 12 Jan 2024 11:50:33 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , Shuah Khan , "Joel Fernandes (Google)" , Lorenzo Stoakes , kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/mm: mremap_test: fix build warning Content-Language: en-US To: Andrew Morton References: <20240111082039.3398848-1-usama.anjum@collabora.com> <20240111131405.4b47521fb8884760d712e93d@linux-foundation.org> From: Muhammad Usama Anjum In-Reply-To: <20240111131405.4b47521fb8884760d712e93d@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/12/24 2:14 AM, Andrew Morton wrote: > On Thu, 11 Jan 2024 13:20:38 +0500 Muhammad Usama Anjum wrote: > >> Fix following build warning: >> warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long unsigned int’ >> > > Looks good to me, but... grumble. > > `i' is an integer. That's just how it is, Blame Fortran if you like. Didn't know this. Thanks for sharing. I'll send a v2 by using two variables. > Discovering that someone used `i' for an unsigned long long is like > seeing > > struct inode *page; > > It is surprising, and readers shouldn't be subjected to surprises. > > `i' is used in two ways here. Twice to iterate across threshold values > (as a ULL) and once to iterate across dest_preamble_size, which is an > int. It would be better to have two different variables for the two > different uses. Ones with more appropriate names than `i'. > -- BR, Muhammad Usama Anjum