All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Artem_Mygaiev@epam.com, xen-devel@lists.xenproject.org,
	Julien Grall <julien@xen.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [Xen-devel] [PATCH for-4.13 5/6] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused
Date: Thu, 3 Oct 2019 11:41:33 +0100	[thread overview]
Message-ID: <576faa70-715e-0b50-23c5-a136726fb403@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1910021451120.2691@sstabellini-ThinkPad-T480s>



On 02/10/2019 23:26, Stefano Stabellini wrote:
> On Wed, 2 Oct 2019, Julien Grall wrote:
>> Clang will throw an error if a function is unused unless you tell
>> to ignore it. This can be done using __maybe_unused.
>>
>> While modifying the declaration, update it to match prototype of similar
>> functions (see build_assertions). This helps to understand that the sole
>> purpose of the function is to hold BUILD_BUG_ON().
>>
>> Signed-off-by: Julien Grall <julien.grall@arm.com>
> 
> I'd like something like "Note that the function is now marked as __init"
> to the commit message, but in any case:

This is already implied with "update it to match prototype of similar functions".

42sh> grep "build_assertions"

> 
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> 
>> ---
>>      Changes in v2:
>>          - Update the prototype to match style of other functions holding
>>          on build assertions.
>> ---
>>   xen/arch/arm/mm.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
>> index 9e0fdc39f9..be23acfe26 100644
>> --- a/xen/arch/arm/mm.c
>> +++ b/xen/arch/arm/mm.c
>> @@ -190,7 +190,8 @@ unsigned long total_pages;
>>   extern char __init_begin[], __init_end[];
>>   
>>   /* Checking VA memory layout alignment. */
>> -static inline void check_memory_layout_alignment_constraints(void) {
>> +static void __init __maybe_unused build_assertions(void)
>> +{
>>       /* 2MB aligned regions */
>>       BUILD_BUG_ON(XEN_VIRT_START & ~SECOND_MASK);
>>       BUILD_BUG_ON(FIXMAP_ADDR(0) & ~SECOND_MASK);
>> -- 
>> 2.11.0
>>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-10-03 10:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 18:00 [Xen-devel] [PATCH for-4.13 0/6] xen/arm: Add support to build with clang Julien Grall
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 1/6] xen/arm: fix get_cpu_info() when built " Julien Grall
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 2/6] xen/arm64: bitops: Match the register size with the value size in flsl Julien Grall
2019-10-02 22:26   ` Stefano Stabellini
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 3/6] xen/arm: cpuerrata: Match register size with value size in check_workaround_* Julien Grall
2019-10-02 18:42   ` Andrew Cooper
2019-10-02 19:17     ` Julien Grall
2019-10-02 22:27       ` Stefano Stabellini
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 4/6] xen/arm: cpufeature: Match register size with value size in cpus_have_const_cap Julien Grall
2019-10-02 22:26   ` Stefano Stabellini
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 5/6] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused Julien Grall
2019-10-02 22:26   ` Stefano Stabellini
2019-10-03 10:41     ` Julien Grall [this message]
2019-10-02 18:00 ` [Xen-devel] [PATCH for-4.13 6/6] xen/arm: traps: Mark check_stack_alignment_constraints " Julien Grall
2019-10-02 22:26   ` Stefano Stabellini
2019-10-03 10:44     ` Julien Grall
2019-10-03  7:37 ` [Xen-devel] [PATCH for-4.13 0/6] xen/arm: Add support to build with clang Jürgen Groß
2019-10-03  8:31 ` Artem Mygaiev

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=576faa70-715e-0b50-23c5-a136726fb403@arm.com \
    --to=julien.grall@arm.com \
    --cc=Artem_Mygaiev@epam.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.