Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1107980imj; Sat, 9 Feb 2019 16:06:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IbzTBPFvWqnwGcu4ammq9wFhKhbP9AvAuK8r+3pqlzHiW4mQhteIrVN6YW1vVP2iqwnHGnV X-Received: by 2002:a63:df50:: with SMTP id h16mr6563469pgj.421.1549757166870; Sat, 09 Feb 2019 16:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549757166; cv=none; d=google.com; s=arc-20160816; b=fvPdFU4Bz40b5hvWl8v/uGP4SMkEalIo+V+JzbRCb+BA8NZ66XektPTB94AgGEEsC2 /xDK2ie6uY0JSN0WCVIkpKioWm6h5Nv00oY2z3Yxjh/58UmneeLQPiQyi0SYVszPmFWw 724g0J3qjkJlKf9Bj2EeWuBHnBxSN6BUALtXnR6bY0CrQfwiiDDNRIE5jR6hlvnrmeQQ lZeatIqi8UJsmilgzMyDFHjl+FzxyKLRElk+8Bi7eGalc2+mSOj2haFifNgLnN+fB//v pdqzBQPi9aEaICfcjL+zbA3miMLCDL/rLO4xh50hONCHTwAwXdMDtXtUvVNd7LsNIYsK xkpg== 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=e6ubDiyQQtWehDDOmAQygkA56UGFONp4YdZOU97vLOI=; b=TdyH5FqGw9Ze9WJoQGd0BK8hcCLkSo7wSmP5svE3e48cJaZNnPzuh3OKpnLnZSfT63 gnJWfPizrYHxUlKMh2mTnD084xbULOSAaSsN7IMf+75Y88istKgvy5RYQ3PERCOkZfpZ kr29kTuBCiF2m73GKkonIAG4FvvfAtwR5OxPkiLcqR9WlisfMy05D3KUb1Au0KCbYJVy QDqiAMLb/7wSV6HTVAdruQmyYR3MM9v7L2i8nLxhaFdfC5NueOXDU2nMFPFQwb4Ds01s Hk2/2oWjILz1fSqbnuqn0ynDfEX27A3Be2R/MsnKD/dbY9Bvm9+Zu914QadNjwRtiUp2 Fxhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PMCLYksd; 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 82si6277972pga.270.2019.02.09.16.05.22; Sat, 09 Feb 2019 16:06:06 -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=PMCLYksd; 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 S1727090AbfBJAFS (ORCPT + 99 others); Sat, 9 Feb 2019 19:05:18 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39960 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726940AbfBJAFS (ORCPT ); Sat, 9 Feb 2019 19:05:18 -0500 Received: by mail-qt1-f193.google.com with SMTP id j36so8271797qta.7; Sat, 09 Feb 2019 16:05:17 -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=e6ubDiyQQtWehDDOmAQygkA56UGFONp4YdZOU97vLOI=; b=PMCLYksdawD6nRSwSU1EGOcZFK0LWnawbI3Q1730+RGj37jYy36OFh7PJgQiW1BKue R0suS9rFAmHd84NLRNuUypuTaIJzo2mtGYZNGkMOYE8ZJnS9Etz48faZk4+Ig6szJKxS 9wgsqens+cmSy0PdJLf42OZsZz9982LDskXAahPQhZ+WlpRjmfmQrkerO/rhSOinggbh zQVAQuYx5EmBgSSaXCz7ia9wVzKX3V9UJr1o1rV/hGNmgnFETt0f5gN/i6LPt95TzCHM 5rAdwbgnmjyfHWdge22ngf/Yl9qJhk0s/8DONlV8ZUMuv3gsHMyd/qvpQRvYai+L7DsR u2Fw== 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=e6ubDiyQQtWehDDOmAQygkA56UGFONp4YdZOU97vLOI=; b=b3bImu2aon8aiIi1j0XnyorF+TVp00x1/sWVRhPjqZhHdIN6yczm+Md/4EPLIw3kId F1KS/n0pCHsZCMsWw8Xk3crkqUA4rwDSR7QCnlZgQPzHDfMIkIFdAeoZKYqUYbPbwSQ5 ZOSXiwgQ7Jz6Atete/xZqh5Gz9BvpLB3VN+42Tkw/YUBJX+1iQhLM29pyKvx0KtYhs8e KS7rcQR5pqgBmJpnrrnag4Zn5X5RPQE+uR+e0kt1F4oSfEdQNbQJWDGful6nWWATVo7V kH9NQ5nFM/A9i6U9JoFUoimv4c71fpiDaRZs0151Ekihob5AImw7TgSzOJglpAqXtkjN qF0g== X-Gm-Message-State: AHQUAuYfu8wvCWgOq8E7n5jK42LD0qvn3ZsoJ869h4uoV6M+l2zmrMRF LPW4c9+dwR9Zbrfvzsq/ZzU= X-Received: by 2002:a0c:84e1:: with SMTP id m88mr21624752qva.112.1549757117087; Sat, 09 Feb 2019 16:05:17 -0800 (PST) Received: from [192.168.100.2] ([187.38.229.162]) by smtp.gmail.com with ESMTPSA id q17sm6795146qtc.19.2019.02.09.16.05.13 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 09 Feb 2019 16:05:16 -0800 (PST) Subject: Re: [PATCH] iio:potentiostat:lmp91000: solve codestyle WARNINGs and CHECKs To: Jonathan Cameron Cc: Joe Perches , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, Anderson Reis References: <20190129183656.15656-1-lucasseikioshiro@gmail.com> <20190202100044.678a9a9c@archlinux> From: Lucas Oshiro Message-ID: <810b3bae-434e-5433-4bdf-8458768dcb01@gmail.com> Date: Sat, 9 Feb 2019 22:05:11 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190202100044.678a9a9c@archlinux> 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! I'll send those changes in my next patchset. On 02/02/2019 08:00, Jonathan Cameron wrote: > On Fri, 1 Feb 2019 12:29:11 -0200 > LSO wrote: > >> 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. > > Always a case of personal judgement. > I agree that this one 'just' falls on the side of not too many things for one > patch. If there had been a few more items then it would have been too much. > > I would also have been happy with it broken out. If I had been spinning > it myself, I would have done it as 3 patches in pairs from your list > above with the last one grouping the white space changes. > > The test inversion below is also stretching beyond simple style > so probably should be broken out. > >>> >>>> 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? > > Separate commit given as you say it's not style and this one has > enough different things in it already! > > Thanks, > > Jonathan > >>> >>> >