From patchwork Sat Apr 6 09:45:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 10888107 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B25D1390 for ; Sat, 6 Apr 2019 09:51:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 020A728AFF for ; Sat, 6 Apr 2019 09:51:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE94F28B22; Sat, 6 Apr 2019 09:50:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C46228AFF for ; Sat, 6 Apr 2019 09:50:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbfDFJuy (ORCPT ); Sat, 6 Apr 2019 05:50:54 -0400 Received: from www.osadl.org ([62.245.132.105]:59644 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfDFJuy (ORCPT ); Sat, 6 Apr 2019 05:50:54 -0400 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id x369oZOp024651; Sat, 6 Apr 2019 11:50:35 +0200 From: Nicholas Mc Guire To: Adham Abozaeid Cc: Julian Calaby , Ajay Singh , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH V3] staging: wilc1000: drop explicit conversion to bool Date: Sat, 6 Apr 2019 11:45:27 +0200 Message-Id: <1554543927-13038-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the expression evaluates to a boolean anyway (relational and logical operators) conversion with the ternary operator is not needed here as coccinelle notes (boolconv.cocci) Signed-off-by: Nicholas Mc Guire Reviewed-by: Julian Calaby --- V2: sent out the wrong version - the commit message was longer than 75 chars - only change here is the commit message wrapping. V3: dropping the superfluous outer () as suggested by Julian Calaby scripts/coccinelle/misc/boolconv.cocci warned about: drivers/staging/wilc1000/wilc_wlan.c:14:48-53: WARNING: conversion to bool not needed here Patch was compile tested with: x86_64_defconfig + Staging=y, WILC1000_SDIO=m, WILC1000_SPI=m, WILC1000=m (checkpatch, sparse and cocci clean otherwise) Patch is against 5.1-rc3 (localversion-next is -next-20190405) drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index c238969..6c9fd3a 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -11,7 +11,7 @@ static inline bool is_wilc1000(u32 id) { - return ((id & 0xfffff000) == 0x100000 ? true : false); + return (id & 0xfffff000) == 0x100000; } static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)