linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: lorenzo.pieralisi@arm.com, catalin.marinas@arm.com,
	robin.murphy@arm.com, shan.gavin@gmail.com, sudeep.holla@arm.com,
	will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/5] arm64: Declare ACPI parking protocol CPU operation if needed
Date: Wed, 18 Mar 2020 13:06:02 +1100	[thread overview]
Message-ID: <f45fe55a-d716-103f-62c1-f56b3c91b6a0@redhat.com> (raw)
In-Reply-To: <20200317102845.GD8831@lakrids.cambridge.arm.com>

On 3/17/20 9:28 PM, Mark Rutland wrote:
> On Wed, Feb 26, 2020 at 11:23:52AM +1100, Gavin Shan wrote:
>> It's obvious we needn't declare the corresponding CPU operation when
>> CONFIG_ARM64_ACPI_PARKING_PROTOCOL is disabled.
>>
>> Signed-off-by: Gavin Shan <gshan@redhat.com>
> 
> Is there a problem leaving this as-is, e.g. a compiler warning? If so,
> it'd be nice to mention that in the commit message.
> 
> We don't always bother placing declartions under ifdefs where the use
> would result in a link-time error.
> 
> No strong feelings form me either way, so FWIW:
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> 
> Mark.
> 

It doesn't cause a compiler warning because the corresponding CPU operations
is declared as "extern". I will have commit log in next revision as below:

It's obvious we needn't declare the corresponding CPU operation when
CONFIG_ARM64_ACPI_PARKING_PROTOCOL is disabled, even it doesn't cause
any compiling warnings.

Thanks,
Gavin

>> ---
>>   arch/arm64/kernel/cpu_ops.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c
>> index 7e07072757af..2082cfb1be86 100644
>> --- a/arch/arm64/kernel/cpu_ops.c
>> +++ b/arch/arm64/kernel/cpu_ops.c
>> @@ -15,7 +15,9 @@
>>   #include <asm/smp_plat.h>
>>   
>>   extern const struct cpu_operations smp_spin_table_ops;
>> +#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
>>   extern const struct cpu_operations acpi_parking_protocol_ops;
>> +#endif
>>   extern const struct cpu_operations cpu_psci_ops;
>>   
>>   const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init;
>> -- 
>> 2.23.0
>>
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-18  2:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  0:23 [PATCH v4 0/5] arm64: Dereference CPU operations indirectly Gavin Shan
2020-02-26  0:23 ` [PATCH v4 1/5] arm64: Declare ACPI parking protocol CPU operation if needed Gavin Shan
2020-03-17 10:28   ` Mark Rutland
2020-03-18  2:06     ` Gavin Shan [this message]
2020-02-26  0:23 ` [PATCH v4 2/5] arm64: Rename cpu_read_ops() to init_cpu_ops() Gavin Shan
2020-03-17 10:20   ` Mark Rutland
2020-02-26  0:23 ` [PATCH v4 3/5] arm64: Introduce get_cpu_ops() helper function Gavin Shan
2020-03-17 10:48   ` Mark Rutland
2020-03-18  2:22     ` Gavin Shan
2020-02-26  0:23 ` [PATCH v4 4/5] arm64: Remove CPU operations dereferencing array Gavin Shan
2020-03-17 10:56   ` Mark Rutland
2020-03-18  3:53     ` Gavin Shan
2020-03-18 22:53       ` Gavin Shan
2020-02-26  0:23 ` [PATCH v4 5/5] arm64: Remove argument @cpu of get_cpu_ops() Gavin Shan
2020-03-16  3:05 ` [PATCH v4 0/5] arm64: Dereference CPU operations indirectly Gavin Shan

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=f45fe55a-d716-103f-62c1-f56b3c91b6a0@redhat.com \
    --to=gshan@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=shan.gavin@gmail.com \
    --cc=sudeep.holla@arm.com \
    --cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).