From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 B4B3C81741 for ; Tue, 24 Sep 2024 06:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158691; cv=none; b=iDu++t0+tezQ7CaU6N9hi/oyeeDR5pBLY7HjDJSYqUc2VdSzN/+736jQUTCZg+srWXCNLN2WQCJ1xbtVIK1i7Y4UzAJSBYbhfQ823cuO4bVxYSjza7sIfZ/zZ6oa3M+iqbfwSMKjMpB83MPLKWza8dF0Y0b5WxPkJTD5Nco6H0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158691; c=relaxed/simple; bh=BYZ01WAhfG8PTdgaq/+vHJ+RA/m6/q8HB6ZoPYc7sh8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bcplKhaUpyC1/Nvvof+rN87y8Y/nfeoeT/oauwOTXo+331Lggr2dwi0ibspj8GAoE1TlanSs//UscGntF51M7q0IVOzXf/aHHj/UlYQtldyEyeWel3rDCuHPnhKv1q6i8Pb6HHtfxkerTjl84ILZltPwGRDTHz3AZALl9ShQAaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ssys3-0006SU-OQ; Tue, 24 Sep 2024 08:17:59 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ssys1-001892-NB; Tue, 24 Sep 2024 08:17:57 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ssys1-009LjW-21; Tue, 24 Sep 2024 08:17:57 +0200 Date: Tue, 24 Sep 2024 08:17:57 +0200 From: Oleksij Rempel To: Kory Maincent Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle Swenson , thomas.petazzoni@bootlin.com, "David S. Miller" , Eric Dumazet , Paolo Abeni Subject: Re: [PATCH net] net: pse-pd: tps23881: Fix boolean evaluation for bitmask checks Message-ID: References: <20240923153427.2135263-1-kory.maincent@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240923153427.2135263-1-kory.maincent@bootlin.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org On Mon, Sep 23, 2024 at 05:34:26PM +0200, Kory Maincent wrote: > Fixed potential incorrect boolean evaluation when checking bitmask values. > The existing code assigned the result of bitwise operations directly to > boolean variables, which could lead to unexpected values. > This has been corrected by explicitly converting the results to booleans > using the !! operator. > > Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver") > Signed-off-by: Kory Maincent Acked-by: Oleksij Rempel Thank you! -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |