[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] drivers: net: xen-netfront: Simplify the calculation of variables



Fix the following coccicheck warnings:

./drivers/net/xen-netfront.c:1816:52-54: WARNING !A || A && B is
equivalent to !A || B.

Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
---
 drivers/net/xen-netfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index b01848e..5158841 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1813,7 +1813,7 @@ static int setup_netfront(struct xenbus_device *dev,
         *  a) feature-split-event-channels == 0
         *  b) feature-split-event-channels == 1 but failed to setup
         */
-       if (!feature_split_evtchn || (feature_split_evtchn && err))
+       if (!feature_split_evtchn || err)
                err = setup_netfront_single(queue);
 
        if (err)
-- 
1.8.3.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.