Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259AbbLHRFc (ORCPT ); Tue, 8 Dec 2015 12:05:32 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:37878 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbbLHRFZ (ORCPT ); Tue, 8 Dec 2015 12:05:25 -0500 Date: Tue, 8 Dec 2015 17:05:17 +0000 From: Mark Brown To: Xiubo Li Cc: linux-kernel@vger.kernel.org Message-ID: <20151208170517.GU5727@sirena.org.uk> References: <1449109150-26793-1-git-send-email-lixiubo@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="65fUfJaAyj3QT6Mb" Content-Disposition: inline In-Reply-To: <1449109150-26793-1-git-send-email-lixiubo@cmss.chinamobile.com> X-Cookie: revolutionary, adj.: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regmap: speed up the regcache_init() 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 Content-Length: 1512 Lines: 45 --65fUfJaAyj3QT6Mb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Dec 03, 2015 at 10:19:10AM +0800, Xiubo Li wrote: > If the cache is not used by the device driver, there is not need to > check the striding of the registers. It will just return 0 from > regcache_init() and let the register striding be checked in proper > place when needed. > - for (i = 0; i < config->num_reg_defaults; i++) > - if (config->reg_defaults[i].reg % map->reg_stride) > - return -EINVAL; > - > if (map->cache_type == REGCACHE_NONE) { > map->cache_bypass = true; > return 0; > } If we're not using the register cache why are there defaults in the first place? --65fUfJaAyj3QT6Mb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWZw3MAAoJECTWi3JdVIfQjKwH/AlVbVHBvxP+KUE05UJS6npi ytlTt50phnfaM6gXeXjJeTwuuEKdAoHi0FjTNZLKtNJpBypjbA+DaqoXhRjQox1z lmTcgG6in4KaifXpC9jMEyBv57A9n3RN7fI46SIT0VG714edS3iFcBLJ3UbDmM4H VPYcN2QvBjlaH0k6byx1YdgsTWpFS2EtKHRSHMdnn7rU7i79OUHih59qTKe6cLh1 vENfGZTlkh0J7EmP1jJzIuColnThha7pza6Gbyo0C/Pu9voFc02lzocF8NZNnViO CR2oBLUWVdjo07YZPjePdcLsguJMBw0P8nBMdM8Xk8v6gfSbEjMWP/pPdk1E6gY= =ELbM -----END PGP SIGNATURE----- --65fUfJaAyj3QT6Mb-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/