Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbbF0AVt (ORCPT ); Fri, 26 Jun 2015 20:21:49 -0400 Received: from ozlabs.org ([103.22.144.67]:57689 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752228AbbF0AVm (ORCPT ); Fri, 26 Jun 2015 20:21:42 -0400 Date: Sat, 27 Jun 2015 10:21:34 +1000 From: Stephen Rothwell To: Rusty Russell Cc: Dan Streetman , linux-next@vger.kernel.org, linux-kernel Subject: Re: [PATCH] modules: elide param_lock if !CONFIG_SYSFS Message-ID: <20150627102134.00e58047@canb.auug.org.au> In-Reply-To: References: <1435237448-13684-1-git-send-email-ddstreet@ieee.org> <87616bsd02.fsf@rustcorp.com.au> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; i586-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/f_mLrvoysaG+3x+W0EIsHs9"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3072 Lines: 91 --Sig_/f_mLrvoysaG+3x+W0EIsHs9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Rusty, On Thu, 25 Jun 2015 17:34:31 -0400 Dan Streetman wrote: > > On Thu, Jun 25, 2015 at 5:18 PM, Rusty Russell wr= ote: > > Dan Streetman writes: > >> Only include the built-in and per-module param_lock, and corresponding > >> lock/unlock functions, if sysfs is enabled. If there is no sysfs there > >> is no need for locking kernel params. > >> > >> This fixes a build break when CONFIG_SYSFS is not enabled, introduced > >> by commit b51d23e. > > > > This doesn't even come close to applying to my tree? >=20 > sorry, I had the !CONFIG_MODULES patch in my tree also, so this was on > top of that one: > https://lkml.org/lkml/2015/6/24/550 >=20 > I can resend that one, on top of this one, or you can fix it up. >=20 > Sorry for not getting it right the first time ;-) This is what I ended up applying to yesterday's linux-next: From: Stephen Rothwell Date: Fri, 26 Jun 2015 13:19:19 +1000 Subject: [PATCH] modules: only use mod->param_lock if CONFIG_MODULES Signed-off-by: Stephen Rothwell --- kernel/params.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/params.c b/kernel/params.c index faa461c16f12..adc0bbc06cc5 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -30,7 +30,11 @@ static DEFINE_MUTEX(param_lock); =20 /* Use the module's mutex, or if built-in use the built-in mutex */ +#ifdef CONFIG_MODULES #define KPARAM_MUTEX(mod) ((mod) ? &(mod)->param_lock : ¶m_lock) +#else +#define KPARAM_MUTEX(mod) (¶m_lock) +#endif =20 static inline void check_kparam_locked(struct module *mod) { --=20 2.1.4 --=20 Cheers, Stephen Rothwell sfr@canb.auug.org.au --Sig_/f_mLrvoysaG+3x+W0EIsHs9 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVjeyTAAoJEMDTa8Ir7ZwVIWUP/j9mO9l3lyi0qeMS8jcQZps+ FtZQTvKefasrAlSDbJ6wbOs456WsTRUiRdM4GMwuEznGfAe8xCCYaN/VIXf7pf9E Rz/GcEgsCPjmTaxkDBoQDIq+rHnFz8Nn3ebjav/UpVwvuL5nDjCouOmx1Fait4X0 EChOTLLVWAJLkQFIThBnGMIwTPHKiX1lvC+UqcFFCvmBIme55RM55c+zDrX2m2/m 9BZf4OXDQR+nf5677iApWQMIQqB0OhKQ6z6TvybxORBA9Zapxc/GUROvDcPG5no4 Kl7ypwllcRFJcYxA6t6QuM1lJZfxfU5eeC/MS7sXLDAjl2wsoAOMhDfehIBalaM9 8c4U84U70gMhc/TrFzaux77egoj2DCYS2ZxfhRo2owUM0kpNKuxrvHTmOqFlWwuh u2xMMRhTdWlv3YmtxLtoTcot05RdtE9XlJkqazG7R9WWTRGy6Q/lr6bqmofJ9b8o ioi6pdEg2u1V0rDa/Qx0CH3TN9duM/6q3P/kLgXLQQzU6LEbAbO+jWRg4MAcjmV/ 7BFoLTxyW2CHUf85OfUlQyGKHvjwv+9TZogKEG++Jl0xjFRw/HMOpR/VYrv0dAho qO/15QgD3lqn5DZDwvVnyuFzzYb8B3LPj6rVtnzIpwrazg13UGUKOhqbBhujf6Cp PjYz+ChRCyJ21C/8AzOo =jGhG -----END PGP SIGNATURE----- --Sig_/f_mLrvoysaG+3x+W0EIsHs9-- -- 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/