From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932808AbcESVQy (ORCPT ); Thu, 19 May 2016 17:16:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52513 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753562AbcESVQx (ORCPT ); Thu, 19 May 2016 17:16:53 -0400 Subject: Re: [PATCH v2 2/2] i2c: qup: support SMBus block read To: Timur Tabi , Sricharan , wsa@the-dreams.de, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <1463006736-24652-1-git-send-email-nkaje@codeaurora.org> <1463006736-24652-2-git-send-email-nkaje@codeaurora.org> <000d01d1b0d3$d70e1f30$852a5d90$@codeaurora.org> <757c18e2-562a-9f43-0fb6-ab3e7ac3af88@codeaurora.org> <573E205C.9080701@codeaurora.org> Cc: linux-arm-msm@vger.kernel.org, rruigrok@codeaurora.org, cov@codeaurora.org, austinwc@codeaurora.org, linux-arm-kernel@lists.infradead.org From: Naveen Kaje Message-ID: <1d96dfb6-9f0e-14ee-7f75-4c20fd98b183@codeaurora.org> Date: Thu, 19 May 2016 15:16:49 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <573E205C.9080701@codeaurora.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Timur, Sricharan, On 5/19/2016 2:21 PM, Timur Tabi wrote: > Naveen Kaje wrote: >>>> >>>> + tags[len++] = QUP_TAG_V2_DATARD; >>>> + /* 0 implies 256 bytes */ >>>> + if (data_len == QUP_READ_LIMIT) >>>> + tags[len++] = 0; >>>> + else >>>> + tags[len++] = data_len; >>>> + } >>> Even data_len will always be '1' right ? >> Yes, but here preferably we use a variable than a number without a >> context. > > Actually, I would say the opposite. I would rather see a constant > with a comment explaining it, than a variable that we know will always > contain only one number. > Ok, got it. Will be fixed in V3. Thanks, Naveen