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 5461E2853E0 for ; Fri, 24 Apr 2026 13:59:23 +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=1777039163; cv=none; b=Mldzlxuor1A5ZyrwMfdnsCduBgVuDOwLmk/ux6749iAzqfEkN1pGOebZbjyy0pC0SoEe61EAQU0BMhKxPFFu5D2O3I+0PDysaGuJDp5LAMsXpeZSuRhAoCkQd7Md/Ux9aq/qlUr4+PhWHIApoEPR2QLbb4boEhCSx4T3iMdYy+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777039163; c=relaxed/simple; bh=dsyws7C3QhcBRmW2Z2/iUvwv4W4KTJIf9m+Mb2UFwwc=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Ln5o2OShv88H1QSZrpFJi7rOF1ul6cLOyHcfz3FcP3cA9TihBN5X7kMZ+UfX/KjjLh1L5TNGHtzxEmVYJu8is2Ntf8L8VONkrRvPLssP5ByfMoCgZdeZ77gmWmrKyznFWF0QiWizRv0Pgo2JRlFrOvj9YKFwruWkoeCmlKrKvSY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=WlvPv58A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="WlvPv58A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6023C19425; Fri, 24 Apr 2026 13:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1777039163; bh=dsyws7C3QhcBRmW2Z2/iUvwv4W4KTJIf9m+Mb2UFwwc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WlvPv58AweyqBPSxt4rxt4S8hfGBb01CgFVUCOVtb4MtNjpjVZu2bQLlYQjlfYiuj GSfLtI4OgXKvGSt6nDqHhwNfEhFx7s3U++F40O1+uAce+xi+2RbKpWQe7pdD4ZORcV fhs+1Vw/P7oEsJALhdJqDp95v2E0CJ4j198ToQvc= Date: Fri, 24 Apr 2026 06:59:22 -0700 From: Andrew Morton To: Sunny Patel Cc: David Hildenbrand , Zi Yan , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/migrate_device: Cleanup up PMD Checks and warnings Message-Id: <20260424065922.5f15ca8c88eaf8a02847af17@linux-foundation.org> In-Reply-To: <20260419174747.10701-1-nueralspacetech@gmail.com> References: <20260419174747.10701-1-nueralspacetech@gmail.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=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 19 Apr 2026 23:17:43 +0530 Sunny Patel wrote: > Remove the odd VM_WARN_ON_FOLIO(!folio, folio) usage and replace it > with a simpler VM_WARN_ON_ONCE(!folio) check. > > Drop the redundant VM_WARN_ON_ONCE(!pmd_none(*pmdp) && > !is_huge_zero_pmd(*pmdp)). > > Refactor the PMD checks, making the control flow > clearer and avoiding duplicate condition checks. AI review might have found a bug in the surrounding code: https://sashiko.dev/#/patchset/20260419174747.10701-1-nueralspacetech@gmail.com