All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: Philipp Rudo <prudo@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	Eric Biederman <ebiederm@xmission.com>,
	Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers
Date: Tue, 17 Apr 2018 09:07:14 -0500	[thread overview]
Message-ID: <20180417140714.GF28657@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20180413092908.GB2119@localhost.localdomain>

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

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	Philipp Rudo <prudo@linux.ibm.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers
Date: Tue, 17 Apr 2018 09:07:14 -0500	[thread overview]
Message-ID: <20180417140714.GF28657@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20180413092908.GB2119@localhost.localdomain>

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2018-04-17 14:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 18:23 [PATCH v1 0/2] kexec: Remove "weak" annotations from headers Bjorn Helgaas
2018-04-12 18:23 ` Bjorn Helgaas
2018-04-12 18:23 ` [PATCH v1 1/2] kexec: Remove "weak" from kexec_file function declarations Bjorn Helgaas
2018-04-12 18:23   ` Bjorn Helgaas
2018-04-12 18:23 ` [PATCH v1 2/2] kexec: Remove "weak" from arch_kexec_walk_mem() declaration Bjorn Helgaas
2018-04-12 18:23   ` Bjorn Helgaas
2018-04-13  9:08 ` [PATCH v1 0/2] kexec: Remove "weak" annotations from headers Philipp Rudo
2018-04-13  9:08   ` Philipp Rudo
2018-04-13  9:29   ` Baoquan He
2018-04-13  9:29     ` Baoquan He
2018-04-17 14:07     ` Bjorn Helgaas [this message]
2018-04-17 14:07       ` Bjorn Helgaas
2018-04-17 14:21       ` Baoquan He
2018-04-17 14:21         ` Baoquan He
2018-04-17 14:09   ` Bjorn Helgaas
2018-04-17 14:09     ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180417140714.GF28657@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=prudo@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.