Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1014184ybl; Wed, 14 Aug 2019 09:22:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzs0uqa7XSXwW/oYhqOVaY99zCa5XJR5G5ALsBKSvs2jIMr071hZGLp/oAurbuXbJduCBSA X-Received: by 2002:a62:2aca:: with SMTP id q193mr750607pfq.209.1565799748379; Wed, 14 Aug 2019 09:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565799748; cv=none; d=google.com; s=arc-20160816; b=UuhkifmkV1ZrPGK0BfB02AjMQIKXyj/XNEtl0G9M7Z3vpfn20fZZ89r0akoeWfIQ/k BOqPYH8mPyiwHiUUNfpDERzZIKZLChXeNVUEd2A9QuzuuN7h17ji5DOUAPnbDbjH9bXT a5X9OqnP3E15vDOLdhLLzntEZejgWlhRfZXG0GvuTvVR0iWGXKuf4/70heewbq0phiIN klSpxG52yqd2wuC3yLGa56TtUZc7LkPP5yOMlQCoFVepY6wTiRu9gfNkDUhJMB9aLoqj CLS3Y9hQVE3s7t5FOkU7I7KEnNyeaqIFpzYniZsGz5DIoqFg2SypV+Hn+v2o+52itDqq evbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+XUsvfqwN1xJX9j9BV7cjHLrFQRGZoNegq7jHCKmJ5Q=; b=pqrqbS6uzUKcyCh/HjhTSe/FZSO1/Fbd/qdNJ6oXOwgmQ65cEbhM/lzUGMX9sviOK1 CRd5VAa7xtLZIw7zTX4Q1mxUoATT/23ZJW3PpVoYwQAhP8qabyD3WbDolXolxfu30xFJ l3gbqBT8viEDoHO8E8qbhGIBHx2kcIGQGBpboNvhH+D0Ryl59GCghJFyEk65VFBkDR0g Vjc+BE7fXiBbm9K/vySVnsG+6PVnxhZIUpuO81XblizFKKfa8mSeag1H9WrWT/3/ab9k 3c0FSyIUeDwTPFD6d+YK33E4NVG12cr5mZYHpCBUdYneOiOzbqm2ZCcoExQEP6/NIA17 JKAg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si68674271pff.277.2019.08.14.09.22.11; Wed, 14 Aug 2019 09:22:28 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728242AbfHNQTl (ORCPT + 99 others); Wed, 14 Aug 2019 12:19:41 -0400 Received: from mail-wm1-f97.google.com ([209.85.128.97]:55154 "EHLO mail-wm1-f97.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727558AbfHNQTl (ORCPT ); Wed, 14 Aug 2019 12:19:41 -0400 Received: by mail-wm1-f97.google.com with SMTP id p74so5093167wme.4 for ; Wed, 14 Aug 2019 09:19:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+XUsvfqwN1xJX9j9BV7cjHLrFQRGZoNegq7jHCKmJ5Q=; b=GGBoOEVN7MeSyT41dCAiSgukv+dyleB6owWLFGvBsU8BGM5dcmZ3b5lpp46FKf9bxC r/Bs4Xd+q16UzTFb7kQkuSkbopBW9R2OKpFtnsB1+MW215v1e+AF0f5FoOeO2LbHWe6y 6ruYIyqnVeQcAUJ2UsdBXUuRux4OxdiSP8fjqiXlq4nSRB2MUQQHzDlT5yocijxsuzID GOdfc/vzBhjfRqowwWQT5w7CnBL2coIf0B1P/mGw1tJmDctEqDjJtdD0O3PlSALLBVY5 T+skiLE6laaPbeCXgicuSoQiA9//pEBauQqO5FtWJDXxq/q8gPp6zOjEjtaK2g5ymHnY 0lOA== X-Gm-Message-State: APjAAAVtjMqw97NbsIMiyGul1J9UoazH6cAGR8QBcIahOWoSz715ze2m k8lT01v2ZkSyc6UBsckRax5iDxXVvEsHacFZ8+Gl/i3kkw0vmXFmeXTkFXvmrW6aQQ== X-Received: by 2002:a1c:d108:: with SMTP id i8mr9856551wmg.28.1565799579791; Wed, 14 Aug 2019 09:19:39 -0700 (PDT) Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk. [2a01:7e01::f03c:91ff:fed4:a3b6]) by smtp-relay.gmail.com with ESMTPS id l16sm8038wru.86.2019.08.14.09.19.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 09:19:39 -0700 (PDT) X-Relaying-Domain: sirena.org.uk Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hxvzv-0006mg-BC; Wed, 14 Aug 2019 16:19:39 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id B21D12742B4A; Wed, 14 Aug 2019 17:19:38 +0100 (BST) Date: Wed, 14 Aug 2019 17:19:38 +0100 From: Mark Brown To: Ben Whitten Cc: LKML , Andreas =?iso-8859-1?Q?F=E4rber?= , Greg Kroah-Hartman , "Rafael J. Wysocki" , nandor.han@vaisala.com Subject: Re: [PATCH] regmap: fix writes to non incrementing registers Message-ID: <20190814161938.GI4640@sirena.co.uk> References: <20190813212251.12316-1-ben.whitten@gmail.com> <20190814100115.GF4640@sirena.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e5GLnnZ8mDMEwH4V" Content-Disposition: inline In-Reply-To: X-Cookie: Bridge ahead. Pay troll. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --e5GLnnZ8mDMEwH4V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 14, 2019 at 02:09:11PM +0100, Ben Whitten wrote: > So it appeared that the last patch in this area for validating a register > block [1] broke the regmap_noinc_write use case. Please include human readable descriptions of things like commits and issues being discussed in e-mail in your mails, this makes them much easier for humans to read especially when they have no internet access. I do frequently catch up on my mail on flights or while otherwise travelling so this is even more pressing for me than just being about making things a bit easier to read. > Because regmap_noinc_write calls _regmap_raw_write and in > turn hits the _regmap_raw_write_impl, the val_len is the depth of the > one register to write to and not a block of registers which is assumed > by the previous check. By inserting a check that the first (and only) > register is a noinc one allows me to start writing to my FIFO again. > I'm all for an alternative solution though if there is a cleaner approach. Like I said if we're checking for nonincrementing registers it shouldn't just be on the first register, it should be for every address in the range. Probably accept it if the nonincrementing register is the first and error otherwise, with some documentation explaining what's going on. --e5GLnnZ8mDMEwH4V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1UNJkACgkQJNaLcl1U h9Cqvgf+Plpr7TSEPNs5jwob0ySm/O4DJta9wplvxkYO9Wa0cElUqR4Z/ecGkpCO ngV4Oo9IaJ37QbUW65D83edEaMr38K+J4sxQqeh+BILFEpDVP2dGixxT6qe5cmZQ Rb0KRGhzN1lVDjNkQr3Rl324ky6BAKRTlLJMTM34SPpAsoWSC+9GLWzFHQLzXKvY NN2AMOtvnFUfpw5JCBuAESWUeRuhhH1GYgML6WMyUpgP0u5vEtRW29T1+qk8H4G3 DFKcIfwZXJ1+i9SU3bhIeprHIsk9p5MYPoDgaZNZ/W7uzPJ6w206Dgn8SXElvtgC nhlBUxdH1C5/MeSW0jKALeNwMGKoaQ== =u0uX -----END PGP SIGNATURE----- --e5GLnnZ8mDMEwH4V--