From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075AbcCNQ4P (ORCPT ); Mon, 14 Mar 2016 12:56:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:60819 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317AbcCNQzy (ORCPT ); Mon, 14 Mar 2016 12:55:54 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,336,1455004800"; d="scan'208";a="933550974" Date: Mon, 14 Mar 2016 09:55:17 -0700 From: "Luck, Tony" To: Borislav Petkov Cc: x86-ml , lkml Subject: Re: [RFC PATCH] Unexport do_machine_check() and machine_check_poll() Message-ID: <20160314165517.GA3219@intel.com> References: <20160314163854.GG15800@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160314163854.GG15800@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2016 at 05:38:54PM +0100, Borislav Petkov wrote: > Hey Tony, > > how about the below, untested change? > > Some backporting work to SLE11 got me pondering over why we're exporting > all those MCA-internal things to modules. Modules don't have any > business calling those so how about hiding them behind a single point > mce_call() function which gets a command what to do? This way, we're > free to change stuff later too, if we decide to do so. It doesn't seem like a very natural fit ... the three routines take very different arguments which you bundle into a "void *". I'm also not sure what we gain. Now we have one, complicated, exported function that still lets modules do all the things they could do with the three separate functions. Is there some benefit to having fewer exports? What am I missing? -Tony