Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp501581ima; Fri, 1 Feb 2019 06:37:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN4g8GzaW6dob2zwOZXKKpS7FXwRE0T0sK26UFlqMyVAyqzK1h8PV03TtLZU5N9TqigUFLsS X-Received: by 2002:a62:8dd9:: with SMTP id p86mr39073883pfk.143.1549031866949; Fri, 01 Feb 2019 06:37:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549031866; cv=none; d=google.com; s=arc-20160816; b=yyj6phzedVKmE/m+olXYodkiYQglbGKv07h3RdDJDOxMhaX6xPrto9itDA+5YCQd5h gTazmCr4r/cENAHfkeYLiDjPlNXdXNS/HloplytIWLsjSnJPp8cQNG71tJjsDpF3iSlX VAOh00D5bSOiSa7nzI4s6bCH0Dt8VWj4jeSIjFxj40mnElRH4acWsy+W6QNiM01Usp3h fKl05MYbISDZPAgQmzg7TO8yYTMPpijZckyW9nNOwba1UI8HFFyENkX3F/+KaXgTtHfy vC/yvOUhWxiKAXI6lpZI0MwJenChUT00JSLmclvTbzpPx+6ttAzeDbzOv0xHsmQTRmV8 fVxg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=41Adg7DB31aKVRgt8DbNhNlbpU9yjOns/3+6Ddh3bPY=; b=fkWAcq5nJLhKa4TZSj/KL3Nx4h/GB/C0QdmlfQo3aOiUknTcvIH2uYSSiTYMhpokvU i6YjNc7iqz84d9ImovVdbYYILu9RndtUhxfDERvgH43sbOPhY2SvFaEJr8I1HB4GwHyi mED+o/+Pr/FWHF4bTTcvSDoQWzhd2b6zT32GM9uNy1RTm3krVKB/PecgdGjsh2plKpNQ 0DUkaoACLhyFg1UelRQBaiJYs1NRgJhymPOKh4s0QyqX/aFiaNEOijibg+9u0M99XOI7 R6x8jeKdXuaSB14tp+VM/rkxP1iWSoPVRfugBAo4CMal0TBWB3pk7EpMLk0VaXxwirjd 1BgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lYruMBcs; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si981793pgc.174.2019.02.01.06.37.30; Fri, 01 Feb 2019 06:37:46 -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=@gmail.com header.s=20161025 header.b=lYruMBcs; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728311AbfBAO3Q (ORCPT + 99 others); Fri, 1 Feb 2019 09:29:16 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:36650 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbfBAO3P (ORCPT ); Fri, 1 Feb 2019 09:29:15 -0500 Received: by mail-yb1-f193.google.com with SMTP id 64so2724658ybf.3; Fri, 01 Feb 2019 06:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=41Adg7DB31aKVRgt8DbNhNlbpU9yjOns/3+6Ddh3bPY=; b=lYruMBcsM5UnhhfGTGZqPkx+jYeW7F9UhX8vJf6BSLTxnuktw9xM3HpsSN5pKEI3OC rxsDdE1px84mDmEc9jTXvjSvFtDXSXyJCs982INcjDoEqir3P8DFi3Avqh7DBgPe5j5w 0ZX1BN/YNq5pi6CIMcFcFKF+nxykMj3eEXB4l9f9oCeP5CRBfTY6hcEKy6ueP0XSV4Fy tpKPqa31m2yM5sAhk80+sA9BTJdsWEL1TvELBhv/6seTmIfuYa1Rd+W8ZBYawF2YoZRc gVK4HqSnLyIQ6XViUUNIr5PYiHZkwEVK6mNB5JJLaMYCLxxh4Y9ZolghgjD8LWDdb2ic vOKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=41Adg7DB31aKVRgt8DbNhNlbpU9yjOns/3+6Ddh3bPY=; b=prJXUKZDs8egHkQASqf+7vus6bgrWn4JtOzOvlm1El1btTnu8PBGb/oJvToFNQjnfq +jx8sCCT5rKe97jqPce3wE0jefiXyUGI7gYNYD1ZUEoW5OTxI6YLjhXEV8YB9Cfhp8PY wVldBop5v87HzTAtyeNiPs8ENniolPM0cbn+RrQAtzxFPQqxE9Z+xOfItVMBelKWgTBB 9bLtoUqkncXv+l+TgZztwk+LHbGfT+zWqqwFApqbmj22iRwtp8RtNZmPrIThF8iAHUFD TxBmjNjo7Sn88h3Zj5VbxmCNNjvMS32L5A5hkrroIN7ysRJh5teNsSSlsvb3UJJUZBL4 kQ8g== X-Gm-Message-State: AHQUAubgnc1xMkUF8BdgS9yYEBcoYuG/Srbj+DrhtZr0mBIEHVUwVgZH 9YyKuwuCRaNYfldijof5U3FcD5vs2is= X-Received: by 2002:a25:d896:: with SMTP id p144mr25585042ybg.225.1549031354829; Fri, 01 Feb 2019 06:29:14 -0800 (PST) Received: from [192.168.100.2] ([187.38.229.162]) by smtp.gmail.com with ESMTPSA id z186sm2608936ywd.107.2019.02.01.06.29.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 06:29:14 -0800 (PST) Subject: Re: [PATCH] iio:potentiostat:lmp91000: solve codestyle WARNINGs and CHECKs To: Joe Perches , 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 References: <20190129183656.15656-1-lucasseikioshiro@gmail.com> From: LSO Message-ID: Date: Fri, 1 Feb 2019 12:29:11 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the review! On 29/01/2019 20:48, Joe Perches wrote: > On Tue, 2019-01-29 at 16:36 -0200, Lucas Oshiro wrote: >> Solve most of the checkpatch.pl WARNINGs and CHECKs on lmp9100.c. They >> are the following: >> >> lmp91000.c:116: CHECK: Unnecessary parentheses around 'state != channel' >> lmp91000.c:116: CHECK: Unnecessary parentheses around 'channel == LMP91000_REG_MODECN_TEMP' >> lmp91000.c:214: CHECK: braces {} should be used on all arms of this statement >> lmp91000.c:216: CHECK: Unbalanced braces around else statement >> lmp91000.c:258: WARNING: line over 80 characters >> lmp91000.c:279: CHECK: Please don't use multiple blank lines > > Some will say this is too many things to do at once. > I think it's mostly fine, but there are a few nits > that also could use fixing. > >> diff --git 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; >> } > > This could use inverting the test > > if (ret) { > if (!of_property_read_bool(...)) { > dev_err(dev, "no ti,ti-gain-ohm defined\n"); > return ret; > } > val = 0; > } > Thanks for the suggestion, I'll do that in the next version. > Also the dev_err is missing a '\n' termination My aim in this patch was only solve style problems, but I can put that missing '\n' too. Do you think it could be done in the same commit or it's a better idea do it in another commit and send both as a patchset? > >