Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp421020imp; Thu, 21 Feb 2019 04:14:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZRCu8jmIx7B3R8TMCzZy4gcXmOjCH7gUn8jNUPffKt2GkPUiKaRKaZ1vZEImZsjSZkxGT X-Received: by 2002:a63:1c02:: with SMTP id c2mr27145798pgc.351.1550751280848; Thu, 21 Feb 2019 04:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550751280; cv=none; d=google.com; s=arc-20160816; b=BwYZkHZqAo69SFuEEhfu+/+s5mRJDeZ5dQyaQ+/kFpvoXDqbfHfygfHEEeEwPChQ4R GS24OBUknbzL6eeELQtq1eyGZyMVDt9A9SDfjP+Y159XvwcwvYyPS7kxu+BWUBrqwB89 MQZG/MMesBrdzme9aDLlNn07wm49HXrUZMravr+AbC/+YuV2/a4K9JROHTBzQX2rO4t/ T/G+5A6zvPNFn4TbfT2Ct7rwXkQyc9cz78TklLxAhbfwxX5AVUIEdFJi88Bz2O6wW/lx X6KxO2RA/TAy3zx2Hj6xxPIAkxUFsxZwbl96IduSBhz7oZiWbtzJAwalai+FBRjIkaWH IZ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=1p48GbFSEADHUkNLDmHVIbh6b3gLQC6UhUVKaiRvGTw=; b=BAJzdse69YTCfb3kHV7VXnf7HYthdu4XQJfuu0574M505BlHvPjK5XuTmGDmL87gwz kTEiwoCgS3KWTrlO5qq7MMw/Rw5K9meq/n/QdiV/k08x6Qiv+Igex375FYClRcWXzak5 WUNQIoDpQ2Bpu/XcupOoBUPOX1hyqhdFBeqr23wIYBGb2Kw3NlIMJIXxCh9f6GlxIrsn 14GA1J4UL/oIu2DBr2IGskuLflCSHKgU0Lu+MGTeb3zKeJJ+Y4vFiQ7wAx5QDAj8S0PV QwrDAGppWdJX45sWVtmBmfmkeunLKcWlwgKosQsDVPwwdjS17GZoKl+qUhJs0javr7pF x2Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si13848861pgm.428.2019.02.21.04.14.25; Thu, 21 Feb 2019 04:14:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfBUMMp (ORCPT + 99 others); Thu, 21 Feb 2019 07:12:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbfBUMMp (ORCPT ); Thu, 21 Feb 2019 07:12:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C77D930821B3; Thu, 21 Feb 2019 12:12:44 +0000 (UTC) Received: from gondolin (dhcp-192-187.str.redhat.com [10.33.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01BDB60933; Thu, 21 Feb 2019 12:12:42 +0000 (UTC) Date: Thu, 21 Feb 2019 13:12:40 +0100 From: Cornelia Huck To: Harald Freudenberger Cc: Sebastian Ott , Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , oberpar@linux.ibm.com, pmorel@linux.ibm.com, pasic@linux.ibm.com Subject: Re: [PATCH] zcrypt: handle AP Info notification from CHSC SEI command Message-ID: <20190221131240.0ab463d1.cohuck@redhat.com> In-Reply-To: References: <1548870526-30595-1-git-send-email-akrowiak@linux.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 21 Feb 2019 12:12:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Feb 2019 11:42:25 +0100 Harald Freudenberger wrote: > On 30.01.19 19:32, Sebastian Ott wrote: > > On Wed, 30 Jan 2019, Tony Krowiak wrote: > >> /* > >> +* A config change has happened, Force an ap bus rescan. > >> +*/ > >> +void ap_bus_cfg_chg(void) > >> +{ > >> + AP_DBF(DBF_INFO, "%s config change, forcing bus rescan\n", __func__); > >> + > >> + ap_bus_force_rescan(); > >> +} > >> +EXPORT_SYMBOL(ap_bus_cfg_chg); > > There is no need for the export symbol - you don't call that function > > from module code. > That's what I have learned now: You don't need to export a symbol > as long as the symbol is only called in static code parts of the kernel. > But you need to export it when it is intended to be used by code > which sits in a kernel module. So now the big question: > How does a provider of a function in the kernel know, if the caller is in static > code or in module code ? And ... maybe this may even change over > the time. So my recommendation is to always export the symbol with > the EXPORT_SYMBOL macro. This way you don't need to change the > code providing a function when the caller code changes or additional > code uses the symbol. > > Other opinions ? Well, if you know it will be called from module code in upcoming patches, export it. If not, I consider it the choice of the maintainer. You can easily add the export later on, if needed, anyway, and I don't consider changing the code a problem. In this particular case, both exporting and not exporting looked like reasonable choices to me.