From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933218AbcCIQLe (ORCPT ); Wed, 9 Mar 2016 11:11:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40553 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932401AbcCIQLZ (ORCPT ); Wed, 9 Mar 2016 11:11:25 -0500 Date: Wed, 9 Mar 2016 10:11:23 -0600 From: Josh Poimboeuf To: Jiri Kosina Cc: Jessica Yu , Miroslav Benes , sjenning@redhat.com, vojtech@suse.com, pmladek@suse.cz, 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: <20160309161123.GB21308@treble.redhat.com> 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=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 09, 2016 at 11:39:05AM +0100, Jiri Kosina wrote: > On Tue, 8 Mar 2016, Jessica Yu wrote: > > > 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 > > > > 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? > > Well, once there actually are alternate stubs to be included through the > header file (like in the proposed notifier removal), it indeed makes sense > to reintroduce the #ifdef. And once it's there, it probably doesn't make > too much sense to have it guard only portion of the file. It's a minor issue but I think it would be cleaner if we only guard the parts of the file which need to be guarded. -- Josh