From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753181AbdCHNKb (ORCPT ); Wed, 8 Mar 2017 08:10:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:53608 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088AbdCHNK3 (ORCPT ); Wed, 8 Mar 2017 08:10:29 -0500 Date: Wed, 8 Mar 2017 14:10:26 +0100 (CET) From: Miroslav Benes To: Josh Poimboeuf cc: Jiri Kosina , Jessica Yu , Petr Mladek , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] livepatch: make klp_mutex proper part of API In-Reply-To: <20170308130619.3ixmcvw6rcy5od32@treble> Message-ID: References: <20170308130619.3ixmcvw6rcy5od32@treble> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Mar 2017, Josh Poimboeuf wrote: > On Wed, Mar 08, 2017 at 10:16:00AM +0100, Jiri Kosina wrote: > > From: Jiri Kosina > > > > klp_mutex is shared between core.c and transition.c, and as such would > > rather be properly located in livepatch.h so that we don't have to play > > 'extern' games from .c sources. > > > > This also silences sparse warning (wrongly) suggesting that klp_mutex > > should be defined static. > > include/linux/livepatch.h is the public interface, whereas klp_mutex is > a private implementation detail. I think it would be a better fit in > kernel/livepatch/core.h (though that file doesn't yet exist). Yes, that would be ideal and I thought about it too. linux/livepatch.h is suboptimal fallback, because I did not find it necessary to have another header file just because of klp_mutex. But I'll be all for it, if everyone is in favour. Miroslav