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 EC72D311972; Thu, 28 Aug 2025 13:26:10 +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=1756387571; cv=none; b=opaVmolvhfTZ0ia/9+FHofZCUAJ81MFVw88ZRb0eYYBsxYCrvKnkI0ghb4uaR7QLQeyqi1dW0Pckg/6z0pJLfBYgIthusjOiGAJSRF0MqYTefQRreLmXEo2mj9d/ib5J+wPkY/JaIbRiuzO8SI1eUldPC5hXFYOZ274lC7WKR24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756387571; c=relaxed/simple; bh=i+5Oim/HXTglyokFAvo3qzr+eTdcCWXR7N4SxzM53Xk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rf88lIl9CQCa39NuOR/XcyrDnvCsHx56Uodfpy9qHFLWQjcYHD2H2n+qHvTxQ3HcIB4Xd+MtZdYjPF7YFZWs5IIXI+Wf83lgaqYkgyAFzgSEUC1p5+VVF0Ur4+n9YE2S1nlsVr1Lsx9BEIStQr6o5lu19tYay0VzkjlBx/NmcA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I9O30dWO; 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="I9O30dWO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74829C4CEEB; Thu, 28 Aug 2025 13:26:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756387570; bh=i+5Oim/HXTglyokFAvo3qzr+eTdcCWXR7N4SxzM53Xk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I9O30dWOUUevxK2fiLQpLX/weKtJM7lgQCSaSvqZKLvY4WCME85SyqPM8/RBScTi8 gCkvck458Ydx3B8xBv+prNU0JZHT6ZHiAO1cg6YrBrnN1+rqntGeqJFLYWpHW+kpGR b7Pl/KVmJ/n3957C8+9KexfmdApoa01CdWyyBuNNZ9WLiTI71pTWiqzWNMZhHH/XCV hk8KKTZIZeHD9EopC5B45VDA+XpDJ8pghmFzDdCOD/cRK6rOO+s24fK0nA1gYwNQR3 byRb8Yd9bbDjCfaRseFHnzzdIyxxEl/YMfLruTEsXH7DzeQsd/cRA3HHTTDnkxDyIy zM1xYIzbPXAZg== Date: Thu, 28 Aug 2025 14:26:06 +0100 From: Simon Horman To: Liao Yuanhong Cc: Sudarsana Kalluru , Manish Chopra , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER" , open list Subject: Re: [PATCH] bnx2x: Remove redundant ternary operators Message-ID: <20250828132606.GK10519@horms.kernel.org> References: <20250827101514.444273-1-liaoyuanhong@vivo.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=us-ascii Content-Disposition: inline In-Reply-To: <20250827101514.444273-1-liaoyuanhong@vivo.com> On Wed, Aug 27, 2025 at 06:15:14PM +0800, Liao Yuanhong wrote: > For ternary operators in the form of "a ? true : false", if 'a' itself > returns a boolean result, the ternary operator can be omitted. Remove > redundant ternary operators to clean up the code. > > Signed-off-by: Liao Yuanhong Quoting documentation: Clean-up patches ~~~~~~~~~~~~~~~~ Netdev discourages patches which perform simple clean-ups, which are not in the context of other work. For example: * Addressing ``checkpatch.pl`` warnings * Addressing :ref:`Local variable ordering` issues * Conversions to device-managed APIs (``devm_`` helpers) This is because it is felt that the churn that such changes produce comes at a greater cost than the value of such clean-ups. Conversely, spelling and grammar fixes are not discouraged. See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches -- pw-bot: cr