From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F5D93624BE for ; Tue, 3 Feb 2026 17:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770141321; cv=none; b=S+8tSB9XNp3aVVg+xd+5p7NvJdL8ODdlfjfovZl+aNlGzeOgYCWQQRRSlJ/KmjQAkUDNh1+4Cxyn0cYK0pVaKwMeEAuHplOGgM5iWMR3zxF9BoEMk03kyhro8dRmwcL8gEqndKhjAfjwXEfzEjl3XhvJpM7g5Bo9JMVqrs4NyHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770141321; c=relaxed/simple; bh=IFBQRGSFEvRtJaLkZrsaycC65Bren0/fF+Tm8JtaRAQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C6clhs/bpXzsPto7gUjxrGoljBDlT7w6F+Gvp/Yt8xFlPcBa0e4MzQtYFyox7bigJirnVTqOULAeYPuyl3k5umQCXrFOYYV4D+nx/hHNpqCTk6Oi7De9kfGUUIENhH7Zfyr5WhqlL9KxrMIkPReibOwnJJUZfF0IjOTm+ZJNYpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DB356339; Tue, 3 Feb 2026 09:55:11 -0800 (PST) Received: from arm.com (arrakis.cambridge.arm.com [10.1.197.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F1BE3F740; Tue, 3 Feb 2026 09:55:17 -0800 (PST) Date: Tue, 3 Feb 2026 17:55:14 +0000 From: Catalin Marinas To: Zhongqiu Han Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm/kmemleak: Remove unreachable return statement in scan_should_stop() Message-ID: References: <20260130093729.2045858-1-zhongqiu.han@oss.qualcomm.com> <20260130093729.2045858-2-zhongqiu.han@oss.qualcomm.com> 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-Disposition: inline In-Reply-To: <20260130093729.2045858-2-zhongqiu.han@oss.qualcomm.com> On Fri, Jan 30, 2026 at 05:37:28PM +0800, Zhongqiu Han wrote: > Remove unreachable "return 0;" statement as all execution paths return > before reaching it. > > No functional change. > > Signed-off-by: Zhongqiu Han > --- > mm/kmemleak.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/kmemleak.c b/mm/kmemleak.c > index fe33f2edfe07..fb0022f34393 100644 > --- a/mm/kmemleak.c > +++ b/mm/kmemleak.c > @@ -1509,10 +1509,8 @@ static int scan_should_stop(void) > */ > if (current->mm) > return signal_pending(current); > - else > - return kthread_should_stop(); > > - return 0; > + return kthread_should_stop(); > } Yeah, not sure how I ended up with this. Acked-by: Catalin Marinas