Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp32235lqb; Thu, 23 May 2024 09:58:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWO21l6aoGwP1pTsmUlUXsYIkG/2js1f1KqxMI2LiXS+IPqzSkoce1XTEzWIw5yAdGqrSqnQdLspNHfzLuncQz/QsIz6uxasVAD2/4mMg== X-Google-Smtp-Source: AGHT+IF9li0V0TSnfAoXg+xA6uRrmdRtLoc74HagX2V78pFAu3RmMrZZoDxEyvNRGL3Hw84kpB2l X-Received: by 2002:ac2:5506:0:b0:51b:6f06:92f2 with SMTP id 2adb3069b0e04-526bf35cd13mr3285290e87.33.1716483539391; Thu, 23 May 2024 09:58:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716483539; cv=pass; d=google.com; s=arc-20160816; b=mJ76Tqcv+IIOPfFpibFqhRQ/0gjuqjqf4kj0RS8PFpJPUrcrcM9vJX2prTTAqp6EhH RveAoWAskUXjQ27WWQ4t5Q4pxjC6ZyemDszCNxoh/xkQu92TrxYAMusiD8jbaKcp3q8/ k1Xi/46Ol+NfTO3XKM4bFo/OXAB0c/9br7qaRT6e4QhAwrzAO6AuJEla0F9bmtoiaRvq syUp1FqxP9cIULLyHFs3MCdbrxCCJ1Ndlr28r6HT7qnTMZRx+OBnamvBxUDjg/obsHW9 S1LS5QVbrv0uoZ84A2yYwXTc/cCAMFkHKb43DTSOs5URoQ5qHVytnkq4F0MjGiNGXeYi saWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fmRkrn29N1SEBcsgwWVitdolAKcTwAxpZF2hsL2KWTo=; fh=wwHfXmj9N7d4wEWc/EzpnvGsoiFfTb+Hwf0I4hTs3Z8=; b=k6IGrA3tDT108rPZ2XybBuDukjQV6/SuZZmPSxJq/adlxM2pTithLKZp5VwaTec2iF EzWlnOaAYJ1T/4Scy4PACN/LvGSJBEPuRtD2gIwbI48i+A0OGh0uliqNRzHRHervzaDN YMHec+Fv119OZz0mKMGhZ3uthEbyJRcitDfalcBivURwO/pkGVEY8cPcit1NCDxh8rBA Zz4DplPwI8dJ9HSnOiNGOgScYsgD5u+ap/vtB1WcAmak5WKRSzBQLffXqiLoYqa/N8eK //2jEue9YbEt24rF4sXAV8tn/jRYfnJsUxq0A7WE//228A45Ngo8WtZd9nPluyfq4rgx XLjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knkwMJcT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-187805-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187805-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c8dasi1573502666b.977.2024.05.23.09.58.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187805-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knkwMJcT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-187805-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187805-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D0E91F22F97 for ; Thu, 23 May 2024 16:58:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B892047A6C; Thu, 23 May 2024 16:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="knkwMJcT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC6D236B17 for ; Thu, 23 May 2024 16:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716483532; cv=none; b=jmkM89gwwsgOon1GbupexieslpJB5/5+93gHIMPi5qUfUKpwEOKSxwai6XzGkRkAY+WF12h09FpQmBX9fgPaVt4Ydrsxxl6lhtQ2Dw5gIxqeBkuv3kAR9AuSwg7sWd3gWDE0MZzuPak7wC8HUmvvM+P4JSUC3xg80uijl+Bvnew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716483532; c=relaxed/simple; bh=vUBfIXjiUsnwe5pMxdYrhI0jBtW8MT89yOFG0BHnk/A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iGWeK/D/6FeMtiEgU4SFEuDGXSMLBtD1EaIBd+va3TUcwsgRDs/4F6vPcrN2GqWoILx4vauFqpLjQVPHuBgr3LrP1mKq9nPSMU0M1vwCPZCBSDUkWvrhSgsL0dw0Ktto6FNF37T806289MCMG3+ipHc1vTOoy7Wgu0c6MtPMTL8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=knkwMJcT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DB78C2BD10; Thu, 23 May 2024 16:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716483531; bh=vUBfIXjiUsnwe5pMxdYrhI0jBtW8MT89yOFG0BHnk/A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=knkwMJcTmCnr2lmUPG1AKfSgRwcvlXu6hKC7SGm9srKrsT75Wwq5YS8ff3tZN+0QJ nd8jLeFvyVLXeGz5y0q3NE4wS21+NvTq3wlZWleZolMF7/1xOGCzdkU0FY0oexkIm3 zIrf5ZoWlwqtZA8UftqObYyPsTeSFUrEoQaA6qDR4zCvcns/ePyFePTi9iGZsDECc7 IdTM0Ti6nITNyzzW8gDJe9rlRkAowKal8W8j9FZ81z/MYVZxQk4zGocG2NlwVxNngl HADzTBMUUwPKYJPvBsmeNgPh4+tEF1Jg9+7iu0TkoKm+l6GgAdscg5dX4YbxGABCtC g2Tv2Iqwx52bA== Date: Thu, 23 May 2024 17:58:47 +0100 From: Mark Brown To: Jim Wylder Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] regmap-i2c: Subtract reg size from max_write Message-ID: <4af265c1-559a-4460-9614-04d9b18f5778@sirena.org.uk> References: <20240430201534.1842106-1-jwylder@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h69n9+mvIrEEteOg" Content-Disposition: inline In-Reply-To: <20240430201534.1842106-1-jwylder@google.com> X-Cookie: You auto buy now. --h69n9+mvIrEEteOg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 30, 2024 at 03:15:33PM -0500, Jim Wylder wrote: > - max_write = quirks->max_write_len; > + max_write = quirks->max_write_len - config->reg_bits / BITS_PER_BYTE; This also needs to take account of any pad bits. --h69n9+mvIrEEteOg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZPdcYACgkQJNaLcl1U h9ARNQf/X2qH74mhvc0PeYL7qesSyEycQeJPHRcNnnXOmepNPcEwZXKKdYF3stcL dZxfVP6Yqm2GvWxoOzGkUGOdAdj0wzPlcea1tyT+S6Tm0ftmhJTVMOFJnOm9NdTB lyEU41ceUfQpw1WDQPpyLoX1MxI5oAoMxgma7moJpXrnLMxkGWdIirnh6mLvdCTk N0xMLBRAQdtGYAi6daFU8kVPewL0uevcMKVV5L8PsMxVaGFe3lJ9BqdNfDKSCfF9 JczgMOQ4/zOhdxxDCdBBe7yu8aE9WqcDm+yGkmdXnizLSoMNNar8QoXmhb2RGr8R szFK/VVwk/ZevM9oHJkZBeeSfIKo/A== =g8H8 -----END PGP SIGNATURE----- --h69n9+mvIrEEteOg--