Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1914631rdd; Thu, 11 Jan 2024 13:14:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnXlCHZbl+mfnoH7ElUqs1B1Qy7KT13DmcX/kPN3DkTz+uucIN+pGSfKedLt51DOKxqPiZ X-Received: by 2002:a17:903:260f:b0:1d4:bcf7:b901 with SMTP id jd15-20020a170903260f00b001d4bcf7b901mr330461plb.27.1705007658439; Thu, 11 Jan 2024 13:14:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705007658; cv=none; d=google.com; s=arc-20160816; b=wtDe2THPNQhJ4q2IViin024REuZgTKD6p6Ts2EYlDoKk6orig5tMrFGNtTZCcagw1u SV4LMJN9txvujTCHOmWqVshdhZ79PVswTZmCK4q6S2Sv106O4Z9mE1CBd3UIZYBXwbu4 T1/61YRKRXkp22UIK3U2NL4scgopllPzkg1gRzvsV9LAtYjs+a12MaC8IuW8fSynIcYE BTRyoDlErSJxr+iyn5t9yUFQCiCK7eUGJnD3WCFRSfJJyLETCmQUl56JILIyhYw366C+ bIbotMXtsvIO6utG7X7jwG1QWvDBRShaqE21/+6sbFBzoXUFJcY/QbugBQRW7xFW5S8T vaMg== ARC-Message-Signature: i=1; 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 :subject:cc:to:from:date:dkim-signature; bh=fMNWxGLYarDxoCYeBLYO5leROVlCBrSrwjOxtBO8Zls=; fh=h6YVutj2giD+Sk5Qy0tquuCgX+7w9Ks6QiUiwck1nnM=; b=yGXaUuk9Wesmz9qYrJPr/mP8Ai77RqfyiMX92o3/UueSpSn4mCwR/RKX5Zra6UzWw/ YEdTDQV3zwvccGRqLmgYbAgQkqHWzh9ixYX+IQdE1hzDxBLtEuO4uVD7PTfUS9aOo5Ku rfZvBNzSSOM6dvl1I3yKmRLMDOfy/WZzmEzcqn6TLmN5uWopM0i+2eSTVoqEkxR5qnaw 0ucG/+3R5+m85r7T2BSbUKpfP6TRk3YU4McwVn1xig11BHX3MBjFXQW7dDCuQPM+peeH ODvB3nLwuDLMhJljgwtXUytevJxfRChOaPAND8Cl1IfdRtchbaWB5cwJmqLr47nLf9Mo CR9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=m20FhbrG; spf=pass (google.com: domain of linux-kernel+bounces-24077-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24077-linux.lists.archive=gmail.com@vger.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 mq13-20020a170902fd4d00b001d52198a844si1775831plb.614.2024.01.11.13.14.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 13:14:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24077-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=@linux-foundation.org header.s=korg header.b=m20FhbrG; spf=pass (google.com: domain of linux-kernel+bounces-24077-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24077-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 22125285532 for ; Thu, 11 Jan 2024 21:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A021558125; Thu, 11 Jan 2024 21:14:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="m20FhbrG" 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 B6BC958202; Thu, 11 Jan 2024 21:14:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C515EC433C7; Thu, 11 Jan 2024 21:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1705007646; bh=KluFjsv67Zzv4EJRU7xqsvgiJikPQyze7Cf8ZgqSCis=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=m20FhbrGGOqwjqsNEt1pNssDuYEn/rXR5ntOE7yUlw8vd+A18DdEIgwGCmySqsWmM HTwPiklqO90WP0flT96lpytIYRuz5r6zQQ8DR6byWK4Q5kLUJjTPdrmX5mgdu+005A InqTak3NQpyZOm/ZvA2N5W9ZuESSbJDhonGj5ulU= Date: Thu, 11 Jan 2024 13:14:05 -0800 From: Andrew Morton To: Muhammad Usama Anjum Cc: 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 Message-Id: <20240111131405.4b47521fb8884760d712e93d@linux-foundation.org> In-Reply-To: <20240111082039.3398848-1-usama.anjum@collabora.com> References: <20240111082039.3398848-1-usama.anjum@collabora.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; 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: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. 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'.