From patchwork Mon Feb 18 17:22:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Seiki Oshiro X-Patchwork-Id: 10818517 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 813CF17D5 for ; Mon, 18 Feb 2019 17:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65A9E2B684 for ; Mon, 18 Feb 2019 17:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63F652B751; Mon, 18 Feb 2019 17:23:24 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 18FBD2B739 for ; Mon, 18 Feb 2019 17:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391099AbfBRRWz (ORCPT ); Mon, 18 Feb 2019 12:22:55 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:33059 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbfBRRWx (ORCPT ); Mon, 18 Feb 2019 12:22:53 -0500 Received: by mail-qk1-f195.google.com with SMTP id x9so10433159qkf.0; Mon, 18 Feb 2019 09:22:52 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=8f/RQxPk8w5vx1KMybhUvbJejAVoWVDWzs9ol8JQZ1c=; b=D4Z4PeqmpMSIfmTDLPAvrbgJL/ta41Rym3oJMFZnKCdciMf5kXHCjoqqNvSnR4yMBv du07+VMTeIerJZ2HR5dg4HmIiDLSCID/ZHyYoSVoQhRSFa90YuUHpDmnISkuE0zDMFDj t5Nf2021PE0wglo8fXEQdq7czIdS+IDGY7tzh3wb4NZ5fwmWKD9Tr3mFXK2M8AsaKm+r xLp5F15Jcgjwih76PL2d1k8HyU9TYgfen9aWaPq8hhcd60HuRMLYIj302hMO7bQMDct8 VPtGZePJPsV/MzxYohqfWdKxFgqX63zOgvtpzlu1Y51E3+nSqrRW9Hl+ZInMF3R/sSOH 6KEQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8f/RQxPk8w5vx1KMybhUvbJejAVoWVDWzs9ol8JQZ1c=; b=kwYCzF2DFoRtbyILf+w7yG47cF2V1cnl0ngsS5SthFbGFy1n8O/7lDEk2PmOgIEBcA 6pJZ4zku5oLUPxGark267s2260nGT2DjU1xvy3eGyV3Qqq63PsUUoA+ky7xpPek+85VJ bc2RjsqjFtmz2yFALFDgTogoEyD/iTE4hXurlUlGkOqtFm4s3pXosrqxtciJF6t75y8R MqHvQuJyAWk0abcwHSbZiz2I+hfY+lCxh+6LCSF3cUycHVBWje29cNfEJ7h6gU4aXxAG vppSkxgWK7UOHpItsBVwP8hKrzF/Pu0C7QN5C17o6U+6QAs7AxXXXgc8KlKkZRuOyw+p siRQ== X-Gm-Message-State: AHQUAuaEAB9kMCSwzDp5NmztoQtcrb1qcolaDTSIHsfmmzNPuGEz74g4 tsrP025C5x05IjH41Xew1c0= X-Google-Smtp-Source: AHgI3IbPOfnDVF554JcRsmLOcrYo+jAVM2pH8PtN413oi8Cl1ObCViKRfQ78/aM+BOQ3qU2ZlPW0PQ== X-Received: by 2002:a37:6a44:: with SMTP id f65mr17961115qkc.244.1550510572615; Mon, 18 Feb 2019 09:22:52 -0800 (PST) Received: from wall-e.ime.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v18sm6525275qkj.13.2019.02.18.09.22.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 09:22:52 -0800 (PST) From: Lucas Oshiro To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis Subject: [PATCH 1/5] iio:potentiostat:lmp91000: remove unnecessary parentheses Date: Mon, 18 Feb 2019 14:22:32 -0300 Message-Id: <20190218172236.7781-2-lucasseikioshiro@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218172236.7781-1-lucasseikioshiro@gmail.com> References: <20190218172236.7781-1-lucasseikioshiro@gmail.com> MIME-Version: 1.0 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 Remove unnecessary parentheses on line 116, and solve these checkpatch.pl CHECKs: - lmp91000.c:116: CHECK: Unnecessary parentheses around 'state != channel' - lmp91000.c:116: CHECK: Unnecessary parentheses around 'channel == LMP91000_REG_MODECN_TEMP' Signed-off-by: Lucas Oshiro Signed-off-by: Anderson Reis --- drivers/iio/potentiostat/lmp91000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index 90e895adf997..03d277621861 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -113,7 +113,7 @@ static int lmp91000_read(struct lmp91000_data *data, int channel, int *val) return -EINVAL; /* delay till first temperature reading is complete */ - if ((state != channel) && (channel == LMP91000_REG_MODECN_TEMP)) + if (state != channel && channel == LMP91000_REG_MODECN_TEMP) usleep_range(3000, 4000); data->chan_select = channel != LMP91000_REG_MODECN_3LEAD; From patchwork Mon Feb 18 17:22:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Seiki Oshiro X-Patchwork-Id: 10818515 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 9DB931390 for ; Mon, 18 Feb 2019 17:23:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FC712B080 for ; Mon, 18 Feb 2019 17:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DB492B642; Mon, 18 Feb 2019 17:23:21 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 2053A2B74A for ; Mon, 18 Feb 2019 17:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728216AbfBRRW5 (ORCPT ); Mon, 18 Feb 2019 12:22:57 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41103 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391110AbfBRRW4 (ORCPT ); Mon, 18 Feb 2019 12:22:56 -0500 Received: by mail-qt1-f194.google.com with SMTP id v10so20023569qtp.8; Mon, 18 Feb 2019 09:22:55 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=wnd0daOjkL1mxcba7BCdyMifBpTS8qKynRF6o0d3oE8=; b=rlPuPyf5SrZuZepi5oNcgzAN3HM0ltOeom+SFnIPr/y8soDL1hzJQbB7GcuYQc77Wf x4b6JsXUOwiaGQWepP5d3RLM7P1WKfk5rluhNGMiewuoX+uq7mkM1uDZLPPQDbKkTP1B CAtqooVE2PLkoLQyduqQQBczFGMoiSzCxnGJrRxApX8DrLzidFzFM6thNwsu1ixq0iLw bRboTiC22fcIrQorc6BRPHtW9GEQe8tJGmo3t/xKQWbrWIhZLF4H+pVgglqZscZlyQVb +S38vW+GVwTqjUfek8tAz6iEuubht2EBVVF7SuKL+CnRxFFe/jwu+yq3gDary8WpZsOb Pxsw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=wnd0daOjkL1mxcba7BCdyMifBpTS8qKynRF6o0d3oE8=; b=RCyUFH5ynvF3nhP1m8C/EuZ9HXwaZPfVYz/WKB38BcrZWNd7Nd1jL0uqjjuDf/Ne4j rXgpSgQuaFqPkn6AesmfWQGlWloQ0e6/gL5GyXnFswzN5smG9dDwHBndEZjMpkCVn5/Z cUKl53bORfmyGm+fZ0WJulujtKkQVf4LvX4/2WSrSmTEHIrjdgaP3HNxOwh3B41hLC7p eZ6WzwjtpKHQHXMIswBNs9XDqRNXMSquFtuAQ9oD10KrP6PC3g96EbQwgxBeSDzZNey7 wZv1LAD+dc8v6U4O5gm4PQ5O7234IrGHvSC9o75gxlksXnND//uKGdmQMay7y3FTC3PA sSKw== X-Gm-Message-State: AHQUAuYm7iqivS/9X5PkeKk0AcSAzTiF/hkBLuvf8zHdoD+FzGJpxusF mAtE4OHG+GhWVH3NXOejVL8= X-Google-Smtp-Source: AHgI3Ia9fr1hBOPYc5iEnc1+POqVGP4rCPzxI7bxXNEIfCNbFICz8W1jVtw69lfFY9szRdPPD2jJ3Q== X-Received: by 2002:a0c:d1f4:: with SMTP id k49mr18582970qvh.164.1550510575386; Mon, 18 Feb 2019 09:22:55 -0800 (PST) Received: from wall-e.ime.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v18sm6525275qkj.13.2019.02.18.09.22.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 09:22:54 -0800 (PST) From: Lucas Oshiro To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis Subject: [PATCH 2/5] iio:potentiostat:lmp91000: insert braces around if arms Date: Mon, 18 Feb 2019 14:22:33 -0300 Message-Id: <20190218172236.7781-3-lucasseikioshiro@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218172236.7781-1-lucasseikioshiro@gmail.com> References: <20190218172236.7781-1-lucasseikioshiro@gmail.com> MIME-Version: 1.0 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 Insert braces around all arms of if statement starting on line 214, and solve these checkpath.el CHECKs: - lmp91000.c:214: CHECK: braces {} should be used on all arms of this statement - lmp91000.c:216: CHECK: Unbalanced braces around else statement Signed-off-by: Lucas Oshiro Signed-off-by: Anderson Reis --- drivers/iio/potentiostat/lmp91000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index 03d277621861..ca31be510940 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -211,9 +211,9 @@ static int lmp91000_read_config(struct lmp91000_data *data) ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val); if (ret) { - if (of_property_read_bool(np, "ti,external-tia-resistor")) + if (of_property_read_bool(np, "ti,external-tia-resistor")) { val = 0; - else { + } else { dev_err(dev, "no ti,tia-gain-ohm defined"); return ret; } From patchwork Mon Feb 18 17:22:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Seiki Oshiro X-Patchwork-Id: 10818513 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 4999017D5 for ; Mon, 18 Feb 2019 17:23:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DE822B684 for ; Mon, 18 Feb 2019 17:23:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BD182B74C; Mon, 18 Feb 2019 17:23:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 CDEE92B684 for ; Mon, 18 Feb 2019 17:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391167AbfBRRW7 (ORCPT ); Mon, 18 Feb 2019 12:22:59 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:41545 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391174AbfBRRW6 (ORCPT ); Mon, 18 Feb 2019 12:22:58 -0500 Received: by mail-qk1-f194.google.com with SMTP id u188so10387146qkh.8; Mon, 18 Feb 2019 09:22:57 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=IoNRB2cfdbuPFshdLkMNMZVGu5zP0AIBtVMGQjiPoXY=; b=Lq4QMI9rRek+/9QcyzCqdapx2/WPV+8+Vv/x8/xRMkcc9v1GtMzkrCH0gxBMLHq/Q7 g3QFb8POnQjW2AVYo5c/o5tj0B3qAyGFOquaQwEg1eID+0YhtxUCsogi7hqVCk93k5LO IkaMVD4r0v3RBjSNjCekkcoNiRPHIU0E9MAvKcK0pOPU3ZoIAA17kQogihqdFYk/5R5D IY6o68GivXqvPj9YcI3yzNEO+F7HT+nHv3iW4LaiP4nablIJ9XS3wXtUPRpI8mk97Plk fDQdU0VYiG3fAvnbgbf5kULwcYa7tFx9RCbJwOFNdL9hpaLMwP+3T8zZXYEYz0lOZRWy x6dw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IoNRB2cfdbuPFshdLkMNMZVGu5zP0AIBtVMGQjiPoXY=; b=X6epkZxi73xi3m3kwS+DFzdOQBXNSxW0kkaascVzOY535xfzGezL0K0L1d6kD4+tUF h7kjgUb9RyUaUB8L0BTaHB9nH2xIIR3YMjErWtWYi9P2C2ZMdKTWWLUNnO7Uf1gsDd+B J4596j4QOVCj4LfXdw26KgpeHNWGXC+2awcXa5E1RJ+9LyOFfCVQ60zgXoOLXRQaaRXd 4REWxefY2hb9iQLSigfWE6SKKtS5JnX6z7hLufyaJmT8nSe/qMFaz83N0WvJ+ao28suB pxQCKXucyIu3vXWy7ykLrwVYPexzOF4s9zPZx3BY7ixOaceS0ZifSaV/7rcYc5aAbvxp FjOg== X-Gm-Message-State: AHQUAuar4PBuy/PrihYnhFa8PQqALI6folMh8SZfZnG8rR8rhgDMWVO9 wBqxzTFj0esTAoe1R9sApCI= X-Google-Smtp-Source: AHgI3IawbGaSOlQENqHf85Fq9ZQ5P+0ya5DQmAQyl+Tz9vB9bhpODcwaKuCEiHUEQvjKtWaBFYg5GQ== X-Received: by 2002:a05:620a:11b8:: with SMTP id c24mr17778520qkk.57.1550510577661; Mon, 18 Feb 2019 09:22:57 -0800 (PST) Received: from wall-e.ime.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v18sm6525275qkj.13.2019.02.18.09.22.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 09:22:57 -0800 (PST) From: Lucas Oshiro To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis Subject: [PATCH 3/5] iio:potentiostat:lmp91000: reduce line width and remove blank line Date: Mon, 18 Feb 2019 14:22:34 -0300 Message-Id: <20190218172236.7781-4-lucasseikioshiro@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218172236.7781-1-lucasseikioshiro@gmail.com> References: <20190218172236.7781-1-lucasseikioshiro@gmail.com> MIME-Version: 1.0 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 Break the line 258 in order fit the line width on 80 characters. Remove the blank line 279, as the line before is also a blank line. Solve these checkpath.el WARNING and CHECK: - lmp91000.c:258: WARNING: line over 80 characters - lmp91000.c:279: CHECK: Please don't use multiple blank lines Signed-off-by: Lucas Oshiro Signed-off-by: Anderson Reis --- drivers/iio/potentiostat/lmp91000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index ca31be510940..6dba26121a62 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -255,8 +255,8 @@ static int lmp91000_read_config(struct lmp91000_data *data) regmap_write(data->regmap, LMP91000_REG_LOCK, 0); regmap_write(data->regmap, LMP91000_REG_TIACN, reg); - regmap_write(data->regmap, LMP91000_REG_REFCN, LMP91000_REG_REFCN_EXT_REF - | LMP91000_REG_REFCN_50_ZERO); + regmap_write(data->regmap, LMP91000_REG_REFCN, + LMP91000_REG_REFCN_EXT_REF | LMP91000_REG_REFCN_50_ZERO); regmap_write(data->regmap, LMP91000_REG_LOCK, 1); return 0; @@ -276,7 +276,6 @@ static int lmp91000_buffer_cb(const void *val, void *private) static const struct iio_trigger_ops lmp91000_trigger_ops = { }; - static int lmp91000_buffer_preenable(struct iio_dev *indio_dev) { struct lmp91000_data *data = iio_priv(indio_dev); From patchwork Mon Feb 18 17:22:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Seiki Oshiro X-Patchwork-Id: 10818511 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 BF5E81390 for ; Mon, 18 Feb 2019 17:23:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3DE32B742 for ; Mon, 18 Feb 2019 17:23:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9725D2B71A; Mon, 18 Feb 2019 17:23:17 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 3F4572B742 for ; Mon, 18 Feb 2019 17:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391110AbfBRRXB (ORCPT ); Mon, 18 Feb 2019 12:23:01 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37683 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391203AbfBRRXB (ORCPT ); Mon, 18 Feb 2019 12:23:01 -0500 Received: by mail-qt1-f196.google.com with SMTP id a48so20028257qtb.4; Mon, 18 Feb 2019 09:23:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=inBs+3iKjDTu7VeFonH5OLuJ3LxLJbSDrBJSJabl4kk=; b=GOH2WC6HAmQOLtoN+VxhtKSOFNMTphWQ9jQ2wZ6rHW4ASVls6ndTxWhbOskrsjFnK0 CM6VjBdgxyFMmgDksZ1FG8l5xAI0emQivOrUJTT7WZvyD4ZGkmSDYdeBca5EbIEN9fLq 3GyntPepAUIyzC7epbgK7maa43F/OAGlWpbK77sVavHtitsR8cZ4KJJg6aXSbMJ79aR1 leHnYv0TdTOsjVNmMi2iMQiHAcZWzgQmbSNSnpDh7hqjYx6xh3Rj3BfYBOfFX+U8mJal MVBlreCMDwSvv4HjvR6KUR00POgRKX0BKh7pLKu1b+RmMbHV6lbH2mH/h30AQ4FlcqkR cqJg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=inBs+3iKjDTu7VeFonH5OLuJ3LxLJbSDrBJSJabl4kk=; b=T2foVBzhPQtm+ZxeB3d+1/udhK79/CCDx2A/oi/QUF06iYgFhh4a4npAmA0mLiMSUF RtR4058hjYEJy5wE4yD75siMYqu69WOxJNGwJeeBIqXb9fE/ghs3Q4GnHBw9nqcJcGM4 dp2hNBeq67Frwn+yfgu6Y0iAjKggdJ7HjL+7svdcxI4eGawkgTMmZlHC6H2gY8cKk4sT gaKONUhDzOwKi0tx8CaJ5/k2uiWtsrSp6bzNMy1zl/xck5FS5VYSKeU4wUggB3AsU4eE l32wYQJba5VWYX69n+KzwMK2zH+sxSqVEqXAJxej4sZSx1apG7Z8D034Aq1qnb+2ESXv Jo4g== X-Gm-Message-State: AHQUAubkAzgh8zfnP1CGw90ZP/zSDZ3RN1Tzhhvn3Zb1TiwhiwYQm/kW XLL5wGcoPDxb3PCqOOC1KNw= X-Google-Smtp-Source: AHgI3IYEcfQDPE70DvMOsyKjBS2aFKDR5Ty3EvpQSI5ANYAKN6DAKHnbINWQgqi9sB7aupxCpPHDww== X-Received: by 2002:a0c:aff1:: with SMTP id t46mr18328036qvc.54.1550510580046; Mon, 18 Feb 2019 09:23:00 -0800 (PST) Received: from wall-e.ime.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v18sm6525275qkj.13.2019.02.18.09.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 09:22:59 -0800 (PST) From: Lucas Oshiro To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis Subject: [PATCH 4/5] iio:potentiostat:lmp91000: invert if statement Date: Mon, 18 Feb 2019 14:22:35 -0300 Message-Id: <20190218172236.7781-5-lucasseikioshiro@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218172236.7781-1-lucasseikioshiro@gmail.com> References: <20190218172236.7781-1-lucasseikioshiro@gmail.com> MIME-Version: 1.0 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 Invert if statement arms in line 214, in order to make the code cleaner Signed-off-by: Lucas Oshiro Signed-off-by: Anderson Reis --- drivers/iio/potentiostat/lmp91000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index 6dba26121a62..7229ef59590a 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -211,12 +211,11 @@ static int lmp91000_read_config(struct lmp91000_data *data) ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val); if (ret) { - if (of_property_read_bool(np, "ti,external-tia-resistor")) { - val = 0; - } else { + if (!of_property_read_bool(np, "ti,external-tia-resistor")) { dev_err(dev, "no ti,tia-gain-ohm defined"); return ret; } + val = 0; } ret = -EINVAL; From patchwork Mon Feb 18 17:22:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Seiki Oshiro X-Patchwork-Id: 10818509 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 64F131390 for ; Mon, 18 Feb 2019 17:23:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47DB32B727 for ; Mon, 18 Feb 2019 17:23:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4389C2B750; Mon, 18 Feb 2019 17:23:13 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 D9C5A2B751 for ; Mon, 18 Feb 2019 17:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388005AbfBRRXH (ORCPT ); Mon, 18 Feb 2019 12:23:07 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:40424 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403774AbfBRRXD (ORCPT ); Mon, 18 Feb 2019 12:23:03 -0500 Received: by mail-qt1-f193.google.com with SMTP id j36so20006623qta.7; Mon, 18 Feb 2019 09:23:02 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bpm4uv7ht7FRHap3/HLE7Hw5o+LrP45Gwqaa5tT8iVY=; b=BSynU4j7WSq5kg40pvVsfv/0dOdWzXwAAbhh1spJXKwhUKsupYqORZoFxefqHPO8oA QbImx0RefbX0sSH0OtQKkB6/ZwgJ92zFlKtWfKvYylR31FXSy45JJt33YbM3S7bCq2as R2/puNqxKYLW7TPzmoXj4DxCaL+ggpQ2NPUjXKS/KAdD7Bi7gwLpGdQs3hjEO2NKKkwv qaG5YwuZvHdF1jNTGrFAUtY0Qd0WER2xn2aCUtzzD/O/k+8rq2hqPMfIysIABzXiuL7T 3N5W26bBb3ToBAmbtQrwrBe4uSBx3xt/Z3GsfLpmv7cmOuQO/+H5tBzPFu7OoSEJSLvL MKpA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bpm4uv7ht7FRHap3/HLE7Hw5o+LrP45Gwqaa5tT8iVY=; b=DHJ+kMAmcTcQgZgOS2QCTNCZvO2pN/3/jfiwmIba/F19jeUYwp+NMh7VoD4jMBn5yN XjMeyinW3x5yYKbrQb0CanDKkd+S9tTVF/iiaZUtIzCXoADEKEjxhUA4Ix8xy5sK5AEp ZREhN5u8OemTw3kQL8uvIq5DBg7H1CgyO5supq2S6xRAqRbRUPAAaQfsUA7uKx9e5YfN f83OgQT6OgXwqYithvbjjjEZD0CS1dAxw0HCsWXugWbC53oQAseIlgYxAuuPMikZTAZJ RwVSRSnPlSiZPUzreAxMpL+OsE+LPP1Au+6/SYdEIid1tyvqlWPfiEzIVZP5dc7+Ahhs mi2Q== X-Gm-Message-State: AHQUAuZSG//s/VlIUkiwgyTMox4oiil/8XlJUx6m7Y0IZcLRG78aCvDR etidPdfNK+rRHaE8JLunsEc= X-Google-Smtp-Source: AHgI3IZ0DDPlDCNBTFxSGjJe6+FtcTQq2tiPOeCHMj4ocf3fVvzDFL57fUpFbAfID+15uochVFQJMA== X-Received: by 2002:ac8:34b2:: with SMTP id w47mr19513924qtb.112.1550510582324; Mon, 18 Feb 2019 09:23:02 -0800 (PST) Received: from wall-e.ime.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id v18sm6525275qkj.13.2019.02.18.09.23.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 09:23:02 -0800 (PST) From: Lucas Oshiro To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis Subject: [PATCH 5/5] iio:potentiostat:lmp91000: add '\n' on dev_err Date: Mon, 18 Feb 2019 14:22:36 -0300 Message-Id: <20190218172236.7781-6-lucasseikioshiro@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218172236.7781-1-lucasseikioshiro@gmail.com> References: <20190218172236.7781-1-lucasseikioshiro@gmail.com> MIME-Version: 1.0 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 Add missing '\n' at the end of dev_err message on line 215. Signed-off-by: Lucas Oshiro Signed-off-by: Anderson Reis --- drivers/iio/potentiostat/lmp91000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c index 7229ef59590a..aecdda757586 100644 --- a/drivers/iio/potentiostat/lmp91000.c +++ b/drivers/iio/potentiostat/lmp91000.c @@ -212,7 +212,7 @@ static int lmp91000_read_config(struct lmp91000_data *data) ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val); if (ret) { if (!of_property_read_bool(np, "ti,external-tia-resistor")) { - dev_err(dev, "no ti,tia-gain-ohm defined"); + dev_err(dev, "no ti,tia-gain-ohm defined\n"); return ret; } val = 0;