[PATCH v1 0/2] kexec: Remove "weak" annotations from headers

Bjorn Helgaas helgaas at kernel.org
Tue Apr 17 07:07:14 PDT 2018


On Fri, Apr 13, 2018 at 05:29:08PM +0800, Baoquan He wrote:
> Hi Bjorn,
> 
> There are changes I have made to solve 5-level conflict with
> kexec/kdump and also interface unification task, they will involve x86
> 64 only changes on these functions, I don't think we need remove them if
> without any obvious impact or error reported.

Removing the weak attribute from the declaration in the header file
does not prevent you from defining a weak function later in the .c
file.

We should remove the weak attribute from the header file declaration
because it can lead to non-obvious errors, e.g., calling the wrong
version of the function.  There's no build-time or run-time indication
that this happens, so it's a real trap.

Bjorn



More information about the kexec mailing list