Re: [PATCH] zcrypt: handle AP Info notification from CHSC SEI command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Feb 2019 11:42:25 +0100
Harald Freudenberger <freude@xxxxxxxxxxxxx> 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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux