From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbdLLLZc (ORCPT ); Tue, 12 Dec 2017 06:25:32 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:44614 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbdLLLZa (ORCPT ); Tue, 12 Dec 2017 06:25:30 -0500 Date: Tue, 12 Dec 2017 11:25:28 +0000 From: Mark Brown To: Andy Shevchenko Cc: Bartosz Golaszewski , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] regmap: allow to disable all locking mechanisms Message-ID: <20171212112528.GE16323@sirena.org.uk> References: <20171206142621.1053-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cYtjc4pxslFTELvY" Content-Disposition: inline In-Reply-To: X-Cookie: This screen intentionally left blank. User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cYtjc4pxslFTELvY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 12, 2017 at 01:12:05PM +0200, Andy Shevchenko wrote: > On Sun, Dec 10, 2017 at 5:14 PM, Bartosz Golaszewski wrot= e: > >>> +static void regmap_lock_unlock_empty(void *__map) > >> ..._none()? > > Too late, Mark already applied it. > Ah, Mark always works at speed of light! An incremental patch is always possible. > >> Why not to introduce positive switch, namely > >> bool mutex_lock; // choose better name > >> and assign ..._none() by default? > > Because we don't want to break all the existing regmaps, if map->lock > > or map->unlock is empty, regmap core decides internally whether to use > > a mutex or a spinlock. > Good point. > So, it means the options like: nomutex (false =E2=80=94 mutex is in use) = or > nolock (true =E2=80=94 disable locking). > From those the latter looks better to me and IIUC you went that way. Yup. --cYtjc4pxslFTELvY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlovvKcACgkQJNaLcl1U h9DFrAf/b6FqnhFoHWXR4QKHMwh2yocMQdEo1bw+Q8mI5dPBk5IWRNXHJGIOjAlF c16yLS+VqM0i6zvJaaq8KWHcFA7MjQHRnv929lY+hi7fitrfOvDMyf+S47yM3b5P HGE5YsNPzmmQ9Y5hKe0Juq/SonQi4aN3FSBCdiz/Mjhs3rtmco1F7VBMKv577+2Z cQT3eLOJC+MyYJ8H+yfLy3WAjwaJ1bIASbU86EGY+F4+l3HeOcRiKNYkVd5ou4m8 7bpxZjZCaf4N+HQvWUhq4QFAqU8Ck1G4dJWQRHokDyzdINOSL0jPM44t8xPSj5ey xqSu+0hvhtyrp7A5QozifSogJK2CVg== =t2yP -----END PGP SIGNATURE----- --cYtjc4pxslFTELvY--