From patchwork Thu Jan 4 16:19:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkat.prashanth2498@gmail.com X-Patchwork-Id: 10145127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 78FCB601A1 for ; Thu, 4 Jan 2018 16:19:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62652286E6 for ; Thu, 4 Jan 2018 16:19:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55885286EE; Thu, 4 Jan 2018 16:19:36 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 E7997286E6 for ; Thu, 4 Jan 2018 16:19:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753461AbeADQTe (ORCPT ); Thu, 4 Jan 2018 11:19:34 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34328 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeADQTU (ORCPT ); Thu, 4 Jan 2018 11:19:20 -0500 Received: by mail-pg0-f66.google.com with SMTP id j4so873850pgp.1 for ; Thu, 04 Jan 2018 08:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dW1xxejztC6JO7u5XUn6Hh3xpie3HtvIuNU4Th5X2w4=; b=uEuZrE9KHW9Gb+S7zjQ4VjNVVZJ1G3pgXhNwrqLxi+S6e7LwUJu8HSWvzJUXmCt9HZ nxXA5mvj50t7jR3AmC4BfYv34i5gcuNTC3tn7eF0odvZPKHCMskBQfp/TOCVjx7zDJHU 1huLozej5D97oDwm6Y1qTEVeDFch6Vc+BYjEE07kp28xWbT7+mjxMwTfBLx9TTq7oY+m PduYTFTdLDkSA5+ClmUDJ0y7NQq7jmJnmLEPti0VOsleHHj0ysr5aUk1oQxIz/qhtZFm njybkA/MRQJqxrN78XDEFv1Hk2J+OEPJcRBglwnQYuJHx3HDRKrdAA7rrYBkPtzZyRqg BNFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dW1xxejztC6JO7u5XUn6Hh3xpie3HtvIuNU4Th5X2w4=; b=TiQ+e8qLQbvzhJVmfJexyNAQlZKBwONqqMJwcuelcOIPwGMpKRV3wl/PY7o6ie+5OY N/R9i/7h+04HusT+HeD9FWaFep6gal9MUypiFHDob93XwH6XjP++2Ggvz7caJXCuBhyz rARYyyTFw9L11XmFgWviRCKattIH7uWXnhJhLociBbi4JHyzjvbQMGrvwuJWjVgNW75s b9CTWymmDBz2IGUHed9mBKC4E/EQInGWlAl6yWHfR9DVZl8ZgZhtrPnG3GGDwdt76jxh rIc6iq3r39SGw7w0PxEFNrfamf7LhnW7k/xzjntlUfmy1pIkzXBGCSEHL5ulSQu3gtND 0uWA== X-Gm-Message-State: AKGB3mLrXawdv7hhLfC9n08qWYxayM6fS4e3PEIqr0OpnlA+q2e2iknZ y0cFKCy3yppfdLu1X9QTSGvbQgF4YQx4JA== X-Google-Smtp-Source: ACJfBovsRCnUzpqUwHyS8yFgNaDSun8UCJO88yqvOIdZ6EVqscw0r/LbdceG6Hl/ZD4ot0AlscHgPQ== X-Received: by 10.98.36.69 with SMTP id r66mr80655pfj.96.1515082759517; Thu, 04 Jan 2018 08:19:19 -0800 (PST) Received: from localhost.localdomain ([117.243.18.17]) by smtp.gmail.com with ESMTPSA id i20sm9082809pfj.58.2018.01.04.08.19.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jan 2018 08:19:18 -0800 (PST) From: venkat.prashanth2498@gmail.com To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org Cc: knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, Venkat Prashanth B U Subject: [PATCH v2] Drivers:iio:dac: Remove unneeded conversion to bool Date: Thu, 4 Jan 2018 21:49:07 +0530 Message-Id: <1515082747-386-1-git-send-email-venkat.prashanth2498@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Venkat Prashanth B U This is a patch to the mcp4725.c file which fixes the following coccinelle warning: WARNING: conversion to bool not needed here Signed-off-by: Venkat Prashanth B U Changes since v1: ----------------- Instead of inadvertent removal of complete statement, only the conversion to bool is removed. --- drivers/iio/dac/mcp4725.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index afa856d..8b5aad4 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c @@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client, goto err_disable_vref_reg; } pd = (inbuf[0] >> 1) & 0x3; - data->powerdown = pd > 0 ? true : false; + data->powerdown = pd > 0; data->powerdown_mode = pd ? pd - 1 : 2; /* largest resistor to gnd */ data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4); if (data->id == MCP4726)