[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d12bede2-4b76-fcdf-60c1-38616fab7ded@lwfinger.net>
Date: Fri, 21 Jan 2022 12:29:50 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: htl10@...rs.sourceforge.net, Luiz Sampaio <sampaio.ime@...il.com>,
Herton Ronaldo Krzesinski <herton@...onical.com>,
Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 19/31] net: realtek: changing LED_* from enum
led_brightness to actual value
On 1/21/22 11:12, Hin-Tak Leung wrote:
>> - if (brightness == LED_FULL) {
>> + if (brightness == 255) {
>
>> - if (brightness == LED_OFF) {
>> + if (brightness == 0) {
>
> NAKed. I haven't received the other 30 patches in this series so I don't know the full context, but I don't think replacing meaningful enum names with numerical values is an improvement. If the ENUMs are gone from a common include (and why is the ENUM removed, if drivers use them??), and the realtek driver still have such a functionality, it probably should be defined in one of the rtl818*.h as RTL818X_LED_FULL and RTL818X_LED_OFF .
>
> My $0.02, based on this one only of the 31.
I agree. Substituting magic numbers for enum names should not be done. NACK.
Larry
Powered by blists - more mailing lists