From mboxrd@z Thu Jan 1 00:00:00 1970 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 63C7B2FE58F; Mon, 10 Nov 2025 09:10:35 +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=1762765835; cv=none; b=lm/v4vud/ZtXSDzjmsFkCoY1AQG1egZwxGurmcrGh2oY4tG4+aehTjJLjzFIwg607CSeomrta2GawlleGRjTjce+LTrgZ5MQFW0jKJnmI8nM/3fD4z90JqbXoGH0d1CAEY7VKXSI2Fu2cAlAlUvo9sI2U2ETkUxC69k5szWi47E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762765835; c=relaxed/simple; bh=JaMbg32qNbhqE9b3hup1M5vDrFPhQ1dnIjspZzUhRNI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=r6eeI3dJ/NRDLME29Q6w4Kgr+iC/b+39quTq9H5cb+eURcb5IZqWEXinwK78DYGkbyXhoO2t1jlKkQbvWSCoDVTSgbhOS05AiR639WaQIDf7jAJA5s6PnAbU55fdjZRwTz3erbd5IYNLeMD4O5/P3u1jvwfBVV5cDJkB5gJ6jWI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cptu4PoA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cptu4PoA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E0ECC16AAE; Mon, 10 Nov 2025 09:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762765835; bh=JaMbg32qNbhqE9b3hup1M5vDrFPhQ1dnIjspZzUhRNI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cptu4PoAElCXw/Zsn0aH/kXbacdIMrfama9GATWjRk3szHMgRzqgqYav4DVAcYKAO +Ai7kcqViE9GRpWGNvC77I7Cgu1Pxn97HPad9JS61bhTd0lVHmXzhRPxACQFybqExe WBylyMYyK5QGkuXYpgVk3DxUUIPPNVZ1P8ZOegkgEJ1iS7yLmg3mGO4cc7iy9v2ONh wROi4fErM1J3Uu//Eq81YktEHuLCdKMTkj9H/K8ZdGWsf02UBmP+lUFCLqIK6J41w/ Z75xh9pDdLCX79oDp0JuFkooPrJQ977rIFInPleKWGmRCChskTWEL/XWL/5pF1zggT GK6F4Im+EGcqg== Message-ID: Date: Mon, 10 Nov 2025 10:10:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] selftest/mm: fix pointer comparison in mremap_test To: Ankit Khushwaha , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Shuah Khan , linux-mm@kvack.org, linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <20251108161829.25105-1-ankitkhushwaha.linux@gmail.com> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: <20251108161829.25105-1-ankitkhushwaha.linux@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08.11.25 17:18, Ankit Khushwaha wrote: > Pointer arthemitic with 'void * addr' and 'ulong dest_alignment' > triggers following warning: > > mremap_test.c:1035:31: warning: pointer comparison always evaluates to > false [-Wtautological-compare] > 1035 | if (addr + c.dest_alignment < addr) { > | ^ > > this warning is raised from clang version 20.1.8 (Fedora 20.1.8-4.fc42). > > use 'void *tmp_addr' to do the pointer arthemitic. > > Signed-off-by: Ankit Khushwaha > --- Acked-by: David Hildenbrand (Red Hat) -- Cheers David