From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 EA1822C324D for ; Wed, 3 Dec 2025 09:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764753207; cv=none; b=FIrRl7MuVKgdKs54mcix4Cd9tpaSIvnQWwf12JzE9TxH8yGEAPJGBrNUPZe6RZ4Ub6onj5tERQvP7NmjSLRXoULyq85POkDdhEBr8SxcfwdyMHxEXZz+xKfpDmHUCm7LDuMBENPANQmLodEaIU5RUPU8r6akbWyqO/WyJ+QQ4EI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764753207; c=relaxed/simple; bh=UUD1OLyM2Ax+l380jE/ssjm10RpjkDe2gN87hpUY77A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N+r7JRlx6Ah0j/RcEvhbvq4XdCOiDAoZzvRNtCgxl3w6niGoe2GVw4mOAo2rCWOufONPSdDADmhaaRs0wj6L9dp209FM6EGG++utJhGGclDgtbXJ/Tr6iC4bntEOtiUed+lLXoigSE8SCg7XOE9Gae0IqBOPRqolJZmrUULBY1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=AKDIX9il; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="AKDIX9il" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tQsErUR7Kwwd1IYSoLyg96UK8QslBLFbepqPwo8NIrc=; b=AKDIX9ily0dMNXxVY+ebPuvfpO GXzZh7/DTzkX3E0aOLLiovw+u2rONB/anBAvUWxUfiLkgpc1knhO92IR/EsxL/HURTDvUYZLmuVQJ 5Dzwh7JhPNYBSo/IJ7RtMf5zOdsCZhFhhGnplGmc7Rn1NiUXE2qx/TXkk1xW2/gT3eXsMta4sfahi 8Np6+4khfVEeMb2tn2v70XEbLRxdStVXfYRI/01Xih8nhN2LBDZXij4Z/E/KLu0BLj2AS9eGPf0bh 4IxqesptHdBIWWm9uKQjW2K0UaCFdTfRAXn4vojReXdUbTz8gA4eYBckOcNGwFwtZy3NPIdwwdT1b 3chHALnA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:37070) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vQivK-000000002Oj-2Mwr; Wed, 03 Dec 2025 09:13:22 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vQivJ-000000008Kn-19Jc; Wed, 03 Dec 2025 09:13:21 +0000 Date: Wed, 3 Dec 2025 09:13:21 +0000 From: "Russell King (Oracle)" To: Haotian Zhang Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org Subject: Re: [PATCH] adfs: Fix incorrect unsigned return type in adfs_f_getnext() Message-ID: References: <20251203065120.652-1-vulab@iscas.ac.cn> 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: <20251203065120.652-1-vulab@iscas.ac.cn> Sender: Russell King (Oracle) On Wed, Dec 03, 2025 at 02:51:20PM +0800, Haotian Zhang wrote: > adfs_f_getnext() stores the return value of __adfs_dir_get() into an > unsigned int. Since __adfs_dir_get() may return negative error codes > such as -ENOENT, these values are converted into large positive numbers. > > Change the return variable to type int to correctly preserve and return > negative error codes. > > Signed-off-by: Haotian Zhang The real problem here is the unsigned int -> int conversion, which is implementation defined in C. int -> unsigned int itself is well defined. Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!