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 961861FFC68; Tue, 4 Mar 2025 11:50:28 +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=1741089028; cv=none; b=sE6260TrivJEn3cxD6ZTbssXYXYV/W1qxINZhb9ZxwfPhsdEEUqIb2KWQ4YrW+qRQ2OUXjGl7tw0Hoc74swhQivjrwG8kZGXXWJghY0y6eQvHwUxI7mwZGoomzplCiVRHPK7rgmN0FjTha+bnUbsnE+VGcO554A4OTrkTqm4Ydc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741089028; c=relaxed/simple; bh=kmomjaiI3c2VGNM7oWwROpYWTIS/k9TkBJGFHrTSAeQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kKMm/amFbSqF4JTL+HNXr8GZCkWiEttbad0MWtnDzo+G/zDV171raQ570tDedKJlDrxMgrR6nhU3gMg2XajipXA7GJk4a3LV20JY35/ASS1DmR2ekOKLFyN31M8Sl/ROQBsMoehRNaJA4VRYt95cCnJ1ketMLVnX6+i/iNLqvwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D20TNwTK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D20TNwTK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2918C4CEE5; Tue, 4 Mar 2025 11:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741089028; bh=kmomjaiI3c2VGNM7oWwROpYWTIS/k9TkBJGFHrTSAeQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D20TNwTK7KVFhQq1NmArBDPe4rQlX8/WvrpJFFgqMR0rG1pyCZibVccsp83IIzacO RstbbvOSgYHkKA68NOPU8/tqoSuceilz9wLwtZuYWNnMFrgDg5LdHkUka8M7hkyhZQ NNHND9WXIvgl6C5ouNJEwgQ2+zMulJHbIHDWLGBuWXhvWTFtV3oMuDqNao0YVT+Mue xE6Q5y/Gy1j1U9uCHuq6cusMFA3bzv+0P5F9XY2WtcRJo/Fh9FiLxEOoDi/7B+BbSc lAD0eFmwI7JFA4zgCG0LDVf1+FRPWJjBSA5GtdCmAlpyFCNmYKJY47kPLfn9zsgLxe PTtZ0XI2l4bLA== Date: Tue, 4 Mar 2025 11:50:23 +0000 From: Simon Horman To: Breno Leitao Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Shuah Khan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH net-next v2 2/8] netconsole: Make boolean comparison consistent Message-ID: <20250304115023.GB3666230@kernel.org> References: <20250228-netcons_current-v2-0-f53ff79a0db2@debian.org> <20250228-netcons_current-v2-2-f53ff79a0db2@debian.org> Precedence: bulk X-Mailing-List: netdev@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: <20250228-netcons_current-v2-2-f53ff79a0db2@debian.org> On Fri, Feb 28, 2025 at 04:50:18AM -0800, Breno Leitao wrote: > Convert the current state assignment to use explicit boolean conversion, > making the code more robust and easier to read. This change adds a > double-negation operator to ensure consistent boolean conversion as > suggested by Paolo[1]. > > This approach aligns with the existing pattern used in > sysdata_cpu_nr_enabled_show(). > > Link: https://lore.kernel.org/all/7309e760-63b0-4b58-ad33-2fb8db361141@redhat.com/ [1] > Signed-off-by: Breno Leitao Thanks Breno, FWIIW, I 100% agree with this change. Reviewed-by: Simon Horman