Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754507AbbFWK1L (ORCPT ); Tue, 23 Jun 2015 06:27:11 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:52444 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbbFWK1A (ORCPT ); Tue, 23 Jun 2015 06:27:00 -0400 Date: Tue, 23 Jun 2015 11:26:51 +0100 From: Mark Brown To: Richard Fitzgerald Cc: gregkh@linuxfoundation.org, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org Message-ID: <20150623102651.GZ14071@sirena.org.uk> References: <1434987034-17673-1-git-send-email-rf@opensource.wolfsonmicro.com> <1434987034-17673-2-git-send-email-rf@opensource.wolfsonmicro.com> <20150622154915.GV14071@sirena.org.uk> <20150622161044.GA29071@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0Wb9dq0wLbp4QS76" Content-Disposition: inline In-Reply-To: <20150622161044.GA29071@opensource.wolfsonmicro.com> X-Cookie: The end of labor is to gain leisure. 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: [PATCH 1/1] regmap: debugfs: Allow writes to cache state settings 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: 1586 Lines: 40 --0Wb9dq0wLbp4QS76 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 22, 2015 at 05:10:44PM +0100, Richard Fitzgerald wrote: > On Mon, Jun 22, 2015 at 04:49:15PM +0100, Mark Brown wrote: > > Can we not export read/write_file_bool() instead? For the read this > > seems to be an almost cut'n'paste with slight differences that look > > like taste changes. For the write path we can just stash the current > > value in the calling functions instead of cut'n'pasting the code. > They assume that file->private_data points at the actual bool, and > it doesn't here, which means temporarily patching it around the call. Or you could use container_of() in your wrappers for the write path. --0Wb9dq0wLbp4QS76 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJViTRqAAoJECTWi3JdVIfQu/EH/igPmM3u3gwtrC0Ey5lP/QS3 42rPkJSTj+ThgeR9jZ23VpsfikmbKkNfciYSHuH1mZfBAMlf4DokIpiCn50dIUh8 iCTLrMOX62SHOdyGGpIeSscQDS/8LytSWIfjt+n7u7ekCkPHC20YqOrBA+EG9Bgf QA4BAO3n9e/kp4WhMmJ9Ood4xX3gEyemIw4HxB6n53f+zUGbX031LXq8QeHD5yGj 6ZyyTwkXUlZmo4I53uvrFhguiZXatMvsSmdjkFTIo4yiiqjOIoDBqkcErDaBIdpi CObO/eBlpWOjOP+ox7NN+f2W+HZYl9SUbQ3EDmeMLaNacE/fxXvJ2rqWbzpfJJ8= =Wjj9 -----END PGP SIGNATURE----- --0Wb9dq0wLbp4QS76-- -- 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/