Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp393479pxk; Fri, 11 Sep 2020 09:42:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVgJ9aIx3rhot4edbNT3zp1SlL36wUyVEyAgyFctzGKT/ainGoQPywN4/jMBhuypF+ZeHk X-Received: by 2002:a50:9f6f:: with SMTP id b102mr3026575edf.272.1599842557024; Fri, 11 Sep 2020 09:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599842557; cv=none; d=google.com; s=arc-20160816; b=J10P8tL0viyrSGGiRI//qHdo2t2u4n0YDkFkGYz1/6iOHIj4BYdutHndoX2wCVH6W0 3S2d5+BHWQyWCFAr8+4eRoOTOa3ibz4qHUkI9m7MQAKnZGI8blYsVmLO/Ml9PTao3gMA 34Le2H9sY40fJlFQGoPMBl3dZCevvCLT0ym6KMbCY/UEHbnXKeLpU+0uhodlB/epG1db DHm1+4p4L0YnXA+iu1dNDH7UlFp/kCCqStj5hNuMgoIGS+8BNohWwikJtcinlZG+6YZ0 0jTG8JS5h7YIhRmNeWN88E7b4TCxMoBRVtQ3JVfwUlfD6QV1m45h4z43YSyUoYtQhQ89 +2xA== 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:references:cc:to:from:subject:dkim-signature; bh=Kv9oMQQFyLAZk1SItD7ecip/eYagD8o/JxuoFQE0OoQ=; b=t9+OLbzrWRavaeehaGx2XDrSZuFxo5XqhmLr3bX9zJGwUH7VIZwHg1E7JP+HWeMYzf TlGk++s7tleoljrt9UAUiOnnuRn4hCfeIdi+4sv5l6NEQfPKHFFNXAfGJalHOKcO1aa2 NjN8Yk2qwN40TNWiMCSeE+daEnHKgsex77r5riuBOGjCHyGPCyCF6yXm5ss1t1Ra2NUj 6oDeySAFCODgshFYb/KWaf3kuaMcx9GNoSZdJZ5ezbX2FXvB77NkbKOcGtCkAIPWbRqQ 2aL93PrMylYzqbFuzrEaNY+LDdT81b6L4CiZCOODTsB3FNZ8gnpR2bMSthyctlW3cG7P 2ULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YwFZrLxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h4si1660013edv.181.2020.09.11.09.42.14; Fri, 11 Sep 2020 09:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YwFZrLxE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726418AbgIKQlm (ORCPT + 99 others); Fri, 11 Sep 2020 12:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726404AbgIKPKu (ORCPT ); Fri, 11 Sep 2020 11:10:50 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 562DDC061757; Fri, 11 Sep 2020 08:10:40 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id z19so6198575lfr.4; Fri, 11 Sep 2020 08:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Kv9oMQQFyLAZk1SItD7ecip/eYagD8o/JxuoFQE0OoQ=; b=YwFZrLxEEvRdg2NhApHcQg4xFnmm2xoIOA2btQCY2882iW09CG5O6Qztv5mU8dm9hm vFOUulAFD/55SkmKDyZQlX1idzqhY211NPAROG6hpUGi7XAX4+Yjiu1Vml1XtpmpRPaG KdOyHOKgW5ODx/YdV5HI8M2B1LySYpmiAD0fco7EyayBjIwfFA1nAs4arDLNZVgUAfUo RtMipJ5GGEjynewXmSEnjhs05a4cUXfa8iPhgn/c/vrxGMeqOkebh4IJ4yh3m4v78Ys8 SYg9lI4gzAtWffjOxivLYyRSKJSSL8qziJca8GTXJz7Kzz0WA5d1yvpOxm3/Rfo2Hgix hJIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Kv9oMQQFyLAZk1SItD7ecip/eYagD8o/JxuoFQE0OoQ=; b=KoFAKkhaEI9ySDXaZP7ktw/hM4Dj+L32lnDamCzajAvhGVoFMfanN+3z9K9kfye0J/ /owGONs7MW2+3osAct2x4xccel9SpRZWs/2+UOpWjpywC5zGV2VXRHQNRQVRvbmedk/x SlTTj+kfeHWYEoi0sXOmQN3CQbkft+XMRJ14l4P8ObQ1fQ+yBAmm8AGqDl8jqxbCk9CV wF5nqbo0UNzIvm0MsGKXksYaoAmUhNF/+ecC2LJiY9feh+cZmO2+wePZATQW82RgrAxg 9pXWfj6kgycfkIySsm++QZTSUx1avCNL+rC9g51jWlsMrBZ/vj9NSPTigx2+G8lz2RuX OMSg== X-Gm-Message-State: AOAM533lSoDqoeIngFzW/mRFe13JCyZ0/rnkq2RVDr30/D1rm0HlXD3z YNwQ16/i8PpC0NsgAraIEyE= X-Received: by 2002:a19:ad46:: with SMTP id s6mr457284lfd.576.1599837038689; Fri, 11 Sep 2020 08:10:38 -0700 (PDT) Received: from [192.168.2.145] (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.googlemail.com with ESMTPSA id a3sm557263ljk.6.2020.09.11.08.10.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 08:10:38 -0700 (PDT) Subject: Re: [PATCH v3 1/1] Input: atmel_mxt_ts - implement I2C retries From: Dmitry Osipenko To: Jiada Wang , nick@shmanahar.org, dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew_Gabbasov@mentor.com, erosca@de.adit-jv.com References: <20200908151617.12199-1-jiada_wang@mentor.com> <6041c677-592b-388e-2eb6-3287a3d92e4b@gmail.com> Message-ID: <0cd9055e-3ad5-f573-be39-3f999d9d461c@gmail.com> Date: Fri, 11 Sep 2020 18:10:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 11.09.2020 18:05, Dmitry Osipenko пишет: > 11.09.2020 17:50, Dmitry Osipenko пишет: > ... >>> @@ -626,6 +627,7 @@ static int __mxt_read_reg(struct i2c_client *client, >>> struct i2c_msg xfer[2]; >>> u8 buf[2]; >>> int ret; >>> + bool retry = false; > > Andy suggested to write this hunk like this: > > struct i2c_msg xfer[2]; > bool retry = false; > u8 buf[2]; > int ret; > > This is not a mandatory request at all, but it will make this particular > piece of code to look a bit nicer. > > There is also an opportunity to improve formatting of all variables by > sorting them by-length across the whole driver, this will improve > readability of the code. But of course it should be a separate patch. > Please note that I'm *not* saying that you should create this separate > patch! > I'd also recommend to rename the "retry" variable to "retried", which will be a more logical name (more proper English).