From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.95.11.211 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796285433; b=5TVq9g9T4EaEgXsM3tP+z518ou8s26PmvF5/4lyEPH9poxWjLvbhxWOLFkjP37F7Rb2P m9IW8yZMAAUykFmwKbhUdlgPUYhuqdGmyYDiwrTZX2gbZ04Wbf9kjfRoTPk4ZygaRO3uY K/mTS+T9ioEXAmiz5WckTd4J3MNEXmb6bEaahjhylR4JfLIYZI4PUwbmD25Bk0a/gE/Hl 7Pp+XOIEjpfOHc6TVdTXi/kHitB519pw91nGtqNyuwMGih0i2k8c+rZkcybIdIDiHmA5L 9Y5Ivgwhr/oCtF6hb3Fw6WpOoOCqtL7GKoZuQpLTuL+iJ9ey5IFipt4Z28sjRYyau0Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796285433; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; bh=zw/kl/ewn1PFtoKqjpWxZBMqt5wka4Qp196m+sWTekM=; b=JCXpYJdZIQZXd75T9c3NymVpK1/R8WCZ9vY1+KCUlmlsMhV4A9QHUFgV141BM/kW+iP3 4exukZAxjXRnyjb1ZImVzTuRu/LKwDxoYgNEsNv5MlHhjMKU6bRVsUwCeI1LS/LTKcURq oDVOrCpb44dUIFNhyLhGm+AVEueonlvjjJEg8D4CufxRj+WgW8L/Ig5exkojOFPjfWccb Xg5M1snSR9wIE5q8VShFs5uhCSXCkYVAd/ART0gk5SBOobLw+l2cUmxh9O/ttglBN8mV+ UaoJPgj1OdCneLAiB5ljxzlzAXhqX/lPFz8+3wT3Dof9nkAWRDxHQ26Aw+dTwPvL5hA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.remote-ip=213.95.11.211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3153F606A322 for ; Thu, 3 Dec 2026 08:10:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3153F606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 6F0CF68BFE; Thu, 3 Dec 2026 09:10:29 +0100 (CET) Date: Thu, 3 Dec 2026 09:10:29 +0100 From: Christoph Hellwig To: Andrew Stellman Cc: Guenter Roeck , Keith Busch , Jens Axboe , Sagi Grimberg , Akinobu Mita , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-hwmon: clamp threshold input before Kelvin conversion Message-ID: <20261203081029.GB29763@lst.de> References: <20261202164956.49925-1-bugs@stellman-greene.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261202164956.49925-1-bugs@stellman-greene.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Dec 02, 2026 at 11:49:56AM -0500, Andrew Stellman wrote: > From: Andrew Stellman > > nvme_set_temp_thresh() calls millicelsius_to_kelvin() before clamping > the value. From reading the code, an input close to LONG_MAX > overflows in that conversion, so the clamp then programs 0 K instead > of the maximum. > > Clamp the millidegree input before converting it. Looks good: Reviewed-by: Christoph Hellwig