Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6946080imb; Sat, 9 Mar 2019 10:47:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwwC6l/zFuKJGw8WszP8KI7Aby3fpMPoo5eCgBKJ1VmTivgqhlS6zyfB6+AHI6yKYc4fmyJ X-Received: by 2002:a62:be08:: with SMTP id l8mr24673359pff.162.1552157251288; Sat, 09 Mar 2019 10:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552157251; cv=none; d=google.com; s=arc-20160816; b=XTMMXXwxYMorXYKPZIlEXUE++RYOLh7mzNYnbt2n7cjNq6lpegOHDwbN0hZc5upKZn 9ra9VKuo8dk9cGRCnMFBEr62NIQjei5mtyqpadqYwx5FpWOYXmWBCBoN//jk5XWQkGVo Oltt4CJfvVYx2W4uSTzWD9bNo3oiJWAnxhFxMQjjTLq7ViChTYwpDE5w3Sz6y9+6a5zl OPItLQfsSmiB0cZ7T3uqMzIAOGfCJ0sfKVQgrTpYxSQvQbrJUv3Tuzb8bVTwWOblJIJX 7ZT+0gkNe1p8Bk9DJeXIKsIjMo7r6Jm2otP/2gOVnCPIpc0S/PSxIDPpWtkg26viHCC5 jWBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=GsnvFIyPBQpvrigTtg6TMytskaBcyhmVM+/ax3Cxroc=; b=dpI/JlIi1UbtYrE5XQbCKTBxvpSCj9NKB9iy3z3+aF2mzWirbrr6gEqrClvo8yhp2+ Y6Kmaed9KKuPHUOfGAToYOJA/Q12Pt9mNaE/5EoUoq0eAIWoDMfUdLcuK83f4sndwka7 XvljoTEupQqRrP865c6nx/prE8qq0wU1/5mm0vl5kVipn/YZU2xOBHDw345408ushgCH RfD+U2/EZSe2jCI6OpUW0mXS2CI+d1UdlR1Sb+Zu05LWjrsoyNBj+SlbXbpau4tI8OEB /icIjJFLKD28BypHkzJfwmhoPVikYQcwVicZi0U4rBfHL9aQzcBL5JfPIFM5BVRGHJFM bqtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tBNb6vvN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si886120pfd.91.2019.03.09.10.47.15; Sat, 09 Mar 2019 10:47:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tBNb6vvN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726450AbfCISqW (ORCPT + 99 others); Sat, 9 Mar 2019 13:46:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:59516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbfCISqV (ORCPT ); Sat, 9 Mar 2019 13:46:21 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97C5820657; Sat, 9 Mar 2019 18:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552157180; bh=ETOa1PhwQcdXb0xJsVfMLZm5qrMIVAOz6Zsi49R433w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tBNb6vvNt98ABA/fAanLr5d1/A/9sLUj8Zxbd7Fy6Q83fCrgIXyMpJAmho9bXLfWy pPrahXEdHuRm+7o/PQKYj5iZN11mrwOQjb/jFy9LGRovE4OwPTj1DtvcHkBgLYyQ6j pBhiWSHZic9i0hOgi36fwcWeURrZsevLwAPLHdRc= Date: Sat, 9 Mar 2019 18:46:15 +0000 From: Jonathan Cameron To: Anderson Reis Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, matt.ranostay@konsulko.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis , Lucas Oshiro Subject: Re: [PATCH v2 3/4] iio:potentiostat:lmp91000: invert if statement Message-ID: <20190309184615.54feca1d@archlinux> In-Reply-To: <20190308194655.5983-4-anderson.reis.rosa@usp.com> References: <20190308194655.5983-1-anderson.reis.rosa@usp.com> <20190308194655.5983-4-anderson.reis.rosa@usp.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Mar 2019 16:46:54 -0300 Anderson Reis wrote: > Invert if statement arms in line 214, in order to make the code cleaner, > solve these checkpatch.pl CHECKs: > > - lmp9100.c:214: CHECK: braces {} should be used on all arms of this statement > - lmp9100.c:216: CHECK: Unbalanced braces around else statement > > Signed-off-by: Lucas Oshiro > Signed-off-by: Anderson Reis Applied. Thanks, Jonathan > --- > 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 c45cfb632649..1de17924e154 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;