From: Tobin C. Harding Date: Mon, 13 Mar 2017 22:54:05 +0000 (+1100) Subject: staging: ks7010: move comparison to right hand side X-Git-Tag: v4.12-rc1~84^2~533 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7676b72;p=karo-tx-linux.git staging: ks7010: move comparison to right hand side Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move constant to right hand side of test, modify operator to ensure logic is maintained. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 648170dc53d5..78204401220d 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -2044,7 +2044,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev, } } if (ptr == &priv->pmklist.head) { /* not find address. */ - if (PMK_LIST_MAX > priv->pmklist.size) { /* new cache data */ + if (priv->pmklist.size <= PMK_LIST_MAX) { /* new cache data */ for (i = 0; i < PMK_LIST_MAX; i++) { pmk = &priv->pmklist.pmk[i]; if (!memcmp