OSDN Git Service

staging: ks7010: fix checkpatch CONSTANT_COMPARISON
authorTobin C. Harding <me@tobin.cc>
Thu, 9 Mar 2017 04:47:02 +0000 (15:47 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 13:06:46 +0000 (14:06 +0100)
Checkpatch emits WARNING: Comparisons should place the constant on the
right side of the test.

Move comparison constant to the right side of the test.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index bf77483..6522bc3 100644 (file)
@@ -2595,13 +2595,13 @@ void hostif_sme_task(unsigned long dev)
        DPRINTK(3, "\n");
 
        if (priv->dev_state >= DEVICE_STATE_BOOT) {
-               if (0 < cnt_smeqbody(priv)
+               if (cnt_smeqbody(priv) > 0
                    && priv->dev_state >= DEVICE_STATE_BOOT) {
                        hostif_sme_execute(priv,
                                           priv->sme_i.event_buff[priv->sme_i.
                                                                  qhead]);
                        inc_smeqhead(priv);
-                       if (0 < cnt_smeqbody(priv))
+                       if (cnt_smeqbody(priv) > 0)
                                tasklet_schedule(&priv->sme_task);
                }
        }