From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbcCIKHB (ORCPT ); Wed, 9 Mar 2016 05:07:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:47420 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbcCIKGr (ORCPT ); Wed, 9 Mar 2016 05:06:47 -0500 Date: Wed, 9 Mar 2016 11:06:44 +0100 From: Petr Mladek To: Jessica Yu Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , sjenning@redhat.com, vojtech@suse.com, mpe@ellerman.id.au, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: klp: remove superfluous errors in asm/livepatch.h Message-ID: <20160309100644.GI10940@pathway.suse.cz> References: <1457085219-23653-1-git-send-email-mbenes@suse.cz> <20160304214500.GA8104@treble.redhat.com> <20160308212819.GA9075@packer-debian-8-amd64.digitalocean.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160308212819.GA9075@packer-debian-8-amd64.digitalocean.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2016-03-08 16:28:20, Jessica Yu wrote: > >On Fri, 4 Mar 2016, Josh Poimboeuf wrote: > >>While we're at it, do we even need the '#ifdef CONFIG_LIVEPATCH' in > >>these files? And in include/linux/livepatch.h? > > > >You are right, this seems indeed completely unnecessary. I'll remove it > >for 4.6 as well, if noone has any objections. > > Hm, I should've caught this earlier, but the notifier cleanup patch > that removes the livepatch module notifier had kernel/module.c include > livepatch.h for the klp_module_{coming,going} function stubs in the > !CONFIG_LIVEPATCH case. See here: https://lkml.org/lkml/2016/2/8/1182 Great catch! And you are in time because Mirek has vacation this week :-) > Looking back, I now don't think it makes sense for module.c to include > all those livepatch definitions in the first place, since all it > needed was the klp_module_{coming,going} declarations. I guess my > question is, since we've removed the #ifdef CONFIG_LIVEPATCH blocks > from livepatch.h, where might be a better place for the > klp_module_{coming,going} stubs? Perhaps they could go in module.h > instead? I personally prefer to keep the klp_module_{coming,going} declarations in livepatch.h. It means to keep the '#ifdef CONFIG_LIVEPATCH' there as well. It is a standard solution. It helps to find things where one would expect them. Best Regards, Petr