From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbbEHKU2 (ORCPT ); Fri, 8 May 2015 06:20:28 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:56117 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbbEHKU0 (ORCPT ); Fri, 8 May 2015 06:20:26 -0400 Date: Fri, 8 May 2015 11:20:19 +0100 From: Mark Brown To: Nariman Poushin Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Message-ID: <20150508102019.GX22845@sirena.org.uk> References: <20150508095537.GA15394@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IpeT8Mo92DaOJSZe" Content-Disposition: inline In-Reply-To: <20150508095537.GA15394@opensource.wolfsonmicro.com> X-Cookie: Your present plans will be successful. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC][PATCH] regmap: make REGCACHE_NONE maps return error on regcache_sync X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --IpeT8Mo92DaOJSZe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 08, 2015 at 10:55:37AM +0100, Nariman Poushin wrote: > Signed-off-by: Nariman Poushin > --- > regcache currently causes a BUG_ON if cache_sync/sync_region is > called on a map with cache_type REGCACHE_NONE. This is not > consistent with the behaviour of regcache_read/write which > currently just return -ENOSYS and only throws a BUG_ON if > the cache_type is something that _should_ have cache ops, > but doesn't. Sure your device might not work, it but doesn't > seem right to panic the kernel. The other option I suppose > is to change it to a WARN_ON. Please submit patches in the format covered in SubmittingPatches, the changelog goes before the signoff. =20 The reason this is so loud is that while it's reasonable that generic code could end up triggering a write it's difficult to see any way in which a sync could be triggered on a device without a cache without it being an obvious bug. Since people frequently don't bother checking return codes loud log messages are our only real way of reporting this, given where syncs tend to happen it's not likely to happen in an obscure code path that won't get seen. --IpeT8Mo92DaOJSZe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVTI3jAAoJECTWi3JdVIfQSvQH/18vOylP8AJIma3kydpCjEdO qx72EzJkW5nIs8TNfoVuVp848NS0FgJziS80VEAReLkIH/SfgAWImwX9tRNZrQnq Ho3emU6iZpeDJPQEsIlIgOtKGq3BB0JPHKCGJE3nTzeI2ca2Y1WPDSu1xV8RXJ9V p60N5FEoG1kQJKe51SOfir7HRJkIEMErfppAjrPKISODnT/nu8Mktt5z7yfE843Q fLUjjfRaQ0cbj0qKcjxKyCCVwguXBRqcawYu0Wu6tS2GFrzQSMSkGSODMpjfgHSG VhdRFj7wt9MdiQYJLxo7/01P8QDMKuOULChmAr1EYZX6uEaLFWIqEsrNBg8VhOg= =+2YP -----END PGP SIGNATURE----- --IpeT8Mo92DaOJSZe--