From patchwork Sat Jan 6 14:53:29 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: 10147863 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 200B860153 for ; Sat, 6 Jan 2018 14:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F6EF289B9 for ; Sat, 6 Jan 2018 14:53:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02855289C5; Sat, 6 Jan 2018 14:53:45 +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 9F232289B9 for ; Sat, 6 Jan 2018 14:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340AbeAFOxp (ORCPT ); Sat, 6 Jan 2018 09:53:45 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33274 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261AbeAFOxo (ORCPT ); Sat, 6 Jan 2018 09:53:44 -0500 Received: by mail-pf0-f196.google.com with SMTP id y89so3423530pfk.0 for ; Sat, 06 Jan 2018 06:53:44 -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=VFSS5qkzobMtFJHeM0hrmuChs0FrkkYNMXYQUxUTbWs=; b=XC61+/UYk9l3S5yPqnzhl4PzNyDQmE6ZVmbUDH8ghPZ1xg6U/KYHh8xkPYwPlPSrox AinwYQLOjMMJEM6Vdm16Qs+Q2e9JQSMYm2CGe6hy5ogUyVxgbStyvsOUxCCCGHv7tlFd eaEBGSPQujNlOHpRrxkkBUkfFLpaVG1Fkbcc1rHxNtpT3u05sA3ZGnWiRz4TekqseDCd BaLIsctrSz6GJ0w9lLUbRO7nJCiPoypz9ZDR3nt2tfxv8cWMNh86c2/sUjvNWD8EndQC Qrp0198+S/4W2i4JTpUyPjgy6H6zhe9JVV0qXMGajNfzJ5PN27jRkLaMZN09fEt8xzDJ HdCQ== 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=VFSS5qkzobMtFJHeM0hrmuChs0FrkkYNMXYQUxUTbWs=; b=jh3u5NH10zAVi0URHcCtd1BONsG0GabhdV1a5uXQNyNzgih9ReSj75ZjHU53P/NhWz sy3txESMTCPPjYN20yIIoHOQWAX7bihJFichEvYDpdiy0EdyNd/G8lUeue4qbFd6sE3k LAJq9RkoG1741nPgO7iZ27lv+yYhQXSDgFXid+PumFRhNzkPJTm8R65V/cCaiYcNW+Vc mlCUwMtxUJSeVBCmk4WXujvoWUlmf7a3goJEF+ZAAr9ogaeqqijR6/+57Bi3jSsqdDV2 gnPX4G9eIzt5iAKeIB5NJ64qXGTFWVjUE62fDwIuaIK4x5lS9I9MuDWz8mAMHazSQ+0t jK/Q== X-Gm-Message-State: AKGB3mIyzTjkn4+LG09gtbURu3e0wrCasZ2ktfRq3FOtLya/5kDm4xbT mxkh0PJhzQgC1v1bDrwwjw4= X-Google-Smtp-Source: ACJfBouA6TG3LcOm+yoVTJZ27FWbXApOOI8biTuvXhxiD1tnjXbKKD/ZpOW2jHvUGWD3G81oYzJrEQ== X-Received: by 10.98.91.193 with SMTP id p184mr5997966pfb.16.1515250424004; Sat, 06 Jan 2018 06:53:44 -0800 (PST) Received: from localhost.localdomain ([117.202.244.51]) by smtp.gmail.com with ESMTPSA id e9sm19289743pfl.138.2018.01.06.06.53.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Jan 2018 06:53:43 -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 V3] Drivers:iio:dac: Remove unneeded conversion to bool Date: Sat, 6 Jan 2018 20:23:29 +0530 Message-Id: <1515250409-3240-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 --- change log v2:- Fixed version log issue. change log 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)