lkml.org 
[lkml]   [2022]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 4/6] staging: r8188eu: place constants on the right side of tests
    From
    Date
    On Wed, 2022-04-13 at 16:11 -0400, Jaehee Park wrote:
    > To comply with the linux coding style, place constants on the right
    > side of the test in comparisons. Issue found with checkpatch.
    > WARNING: Comparisons should place the constant on the right side of
    > the test.
    []
    > diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
    []
    > @@ -1997,19 +1998,19 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
    > else
    > pnetwork = &pmlmepriv->cur_network;
    >
    > - if (0 < rtw_to_roaming(padapter)) {
    > + if (rtw_to_roaming(padapter) > 0) {

    Do you think this change is the same test?

    What happens if rtw_to_roaming returns 0?

    []

    > - if (0 < pmlmepriv->to_roaming) {
    > + if (pmlmepriv->to_roaming > 0) {

    here too

    > continue;
    > } else {
    > rtw_indicate_disconnect(padapter);


    \
     
     \ /
      Last update: 2022-04-14 03:19    [W:4.093 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site