Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp917170lqj; Mon, 3 Jun 2024 05:09:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWUD3t1STC9Npu8chYUvTeR8Dw2Le96R2qtNhL4M5Vom1MdTQ8RCfh6V7W8j3FqcdZfXbpyy/1wiFvQ4AfcGAvgyDGh91zuOSrvO37Pw== X-Google-Smtp-Source: AGHT+IFaabT6U0GqVqXD+T6KsZ+zTXX+HamqA17nI3nAWtSYjqIbMkobD0/bzQGGPSj/X01L/OXP X-Received: by 2002:a17:906:3756:b0:a68:9a5c:a2a0 with SMTP id a640c23a62f3a-a689a5ca3dfmr512860066b.36.1717416555454; Mon, 03 Jun 2024 05:09:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717416555; cv=pass; d=google.com; s=arc-20160816; b=hrLhLfpAiVR4MX/Gve+g+eom8uUJFRQrp5OTHK59W4o/QPqYT6fh7eORaxQa3rjsd0 07Vhl1qTIIcJ0xlIhn3iaPX0QWaVoXFe/R8ls1fFqdv8fV+fVVBnuirIwn1cHwhjM3FO 6vXupvr23uoGX4oWFAm6C5eGd26WrHLeLgTqdkldzub97gCRRn/yl7ZgAxQOcQWTi3Pr c7dt9/sQnundAO6i/h8t5gZ3sM/H5T+CG3+7eI92qwPb1MynGrnT4jKbJ/Z2LYkwPNPo w2eDVCPlUefrhxx+93/i9A4UZCZwCSHN8pmFZzrl4sU3/zd4C6cZRPzqCtMU6+qdoGi7 xqFw== 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=o6XMOoKpRaBv14r06EUzHsMpiAF+PU+4VsZwPD4cPJI=; fh=sZsxR76jtK3DEFiLqjUpadXD6QKuf7H4fE5W+uPmO1g=; b=bZwBPJwgEnp5BmFnXm8rvmjG40m45aXIKrQBpX6spKfwccEHINLs7Cy+ikaQ29bEnL qmV9X5MCLXy4TiasmULi3YAiN8wlktmUjtrIQSZZGR6Kwze+aqxiW98ROap2QCNqeWEE ESTUdaCSF+f7ORdtFW7URsPTZNQsv5TNcdtjVSX6jqgPLIJytzMHczjrupudnGsaxSTj ynpe8E0E59D5Rkn/+wb7nwke8tLfu2KWNh4gAKU0nlc6svjmzd9X+eaKIPIuFc7ye7XM upf8+28Mri3/X0uVXwYdBGti/FlWw0KwvhD4Wqqm7t3p7lPvyf4JxRIK1AAGrClgc/53 WlgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SXUBy0DL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199082-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-a68e4d72eaesi187452466b.658.2024.06.03.05.09.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 05:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199082-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=SXUBy0DL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199082-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 290991F2623C for ; Mon, 3 Jun 2024 12:09:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FCEC127E3D; Mon, 3 Jun 2024 12:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SXUBy0DL" 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 5DBFA127E21 for ; Mon, 3 Jun 2024 12:08:16 +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=1717416496; cv=none; b=OAAA9v41eXj2Cko7e20rJyY6q5l1d786sRgM9/ec1N6AIT4KDzNU1UALXBPMEVzP/kFxaKoTMOgUBVqSPbcaaoyjV0cnTcISb7U43yeOb5UNck958F08ztbR7Lf/phTd43XdfQAi4nkAPWM4CH5vNDY/c9phhYMuKL/PPgRnWec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717416496; c=relaxed/simple; bh=txo1zrYkxf+0ZJQAqK5afPzV4wne0EoLNFtJcUAUCj4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mBMBZTajlmyg/UdkD4Tm35jWipLrRBR6HbsJwoM+lPlBnPoNtywuFELeiXpd5BzvnieHoalRRRVSq09Fx0UAXs23muxKiEtrA5vJFBNb8f0F7jStw0xVQLrvs8wGvvRy+ZIJ26S0Rm+LCyPkg8RkwcUQ2xyacpny6KW0G0hZowc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SXUBy0DL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C90B9C32789; Mon, 3 Jun 2024 12:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717416496; bh=txo1zrYkxf+0ZJQAqK5afPzV4wne0EoLNFtJcUAUCj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SXUBy0DLUaohXY9twKQYiuvqKG1GzXp+01Y48xtFw2v9k/q0Q3etClTbrJ5tVa5Br 0hdlQrTS2ltzYbDlgWqzuokh2MEVIex17i2tN0CUnhzFfQoC351kNW3+mABkBK10Tu x2BNIxiYBZx6Co2vBKRdEdICTQp1U2VTWQ7WvsvfewdPszZzBHnNytXBhKIP211j6b dLi6hY7thvwHsKfZ6vR98FWTK83dfxAs40K9SMVC9kC/SGW/VqDd/VDdZFWFUr2JAQ 2GGQDnEN6kHgQjtO0mPBcsqUoOGH3832YBYOvWHT0mM/jp6S8LC+PL82UFuwS3KFyb 5NxaR2bv+suFA== Date: Mon, 3 Jun 2024 13:08:11 +0100 From: Mark Brown To: Andy Shevchenko Cc: Jim Wylder , Greg Kroah-Hartman , "Rafael J. Wysocki" , kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] regmap-i2c: Subtract reg size from max_write Message-ID: <37abbb4e-cac4-4278-98fb-0af75e5b3ef4@sirena.org.uk> References: <20240523211437.2839942-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="o/3PMIcJ4m5eaYT/" Content-Disposition: inline In-Reply-To: X-Cookie: Don't let your status become too quo! --o/3PMIcJ4m5eaYT/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 02, 2024 at 10:29:07AM +0300, Andy Shevchenko wrote: > > (bus->max_raw_write == 0 || bus->max_raw_write > quirks->max_write_len)) > > - max_write = quirks->max_write_len; > > + max_write = quirks->max_write_len - > > + (config->reg_bits + config->pad_bits) / BITS_PER_BYTE; > Interesting. regmap-spi does this slightly differently, i.e. reg/8 + pad/8. > I'm wondering which one is more correct (potential off-by-one I suppose). The above seems more correct if we have less than a full byte of padding. --o/3PMIcJ4m5eaYT/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZdsioACgkQJNaLcl1U h9AAkAf+LVj40HA9xmSzj0Hr25sNKsNGbVaeKDNu4SfyvU4xByXqHWlF7IKQZC7w 4IQgrm5DThNk+dX34NeuR7IjC3wp3/rQLGPvYiH0IKoArBoGXB92/R50RB7piFhp bFw0OgWyJ/jxWrwPAz8a/zHaxNLdN1ck21WhwTGr2z3IONKgo/k293keZJxt7kvD fw6O9ljs1tka5yrF82DDDGGae+G6sHvhlpvdqj4hC9Yv2fzNy+ep/uXsy5aeNg2I z4mW6fFpjYmoqZSEoiZKWNW3NzffOV9ZxTlgn4Lw39DkXkMEqT+d1riKNQi8lQSv ZgCt9QB/2D/PrV0KY0UDDGc6Qm6zrA== =OKvO -----END PGP SIGNATURE----- --o/3PMIcJ4m5eaYT/--