mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: Min-Hua Chen <minhuadotchen@gmail.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, <linux-acpi@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH] acpi/arm64: remove unnecessary cast
Date: Sat, 9 Nov 2024 16:36:43 +0800	[thread overview]
Message-ID: <713ce05d-2d14-fe6b-c3f8-791fff4e50f2@huawei.com> (raw)
In-Reply-To: <e7632dd4-6009-53f3-e61a-ccb15d9f88f3@huawei.com>

On 2024/10/19 14:47, Hanjun Guo wrote:
> On 2024/9/18 7:38, Min-Hua Chen wrote:
>> DEFINE_RES_IRQ returns struct resource type, so it is
>> unnecessary to cast it to struct resource.
>>
>> Remove the unnecessary cast to fix the following sparse warnings:
>>
>> drivers/acpi/arm64/gtdt.c:355:19: sparse: warning: cast to non-scalar
>> drivers/acpi/arm64/gtdt.c:355:19: sparse: warning: cast from non-scalar
>>
>> No functional changes intended.
>>
>> Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
>> ---
>>   drivers/acpi/arm64/gtdt.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
>> index c0e77c1c8e09..24bd479de91f 100644
>> --- a/drivers/acpi/arm64/gtdt.c
>> +++ b/drivers/acpi/arm64/gtdt.c
>> @@ -352,7 +352,7 @@ static int __init gtdt_import_sbsa_gwdt(struct 
>> acpi_gtdt_watchdog *wd,
>>       }
>>       irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
>> -    res[2] = (struct resource)DEFINE_RES_IRQ(irq);
>> +    res[2] = DEFINE_RES_IRQ(irq);
>>       if (irq <= 0) {
>>           pr_warn("failed to map the Watchdog interrupt.\n");
>>           nr_res--;
>>
> 
> It's a minor issue, but I think it deserves a patch to make
> the code cleaner,
> 
> Acked-by: Hanjun Guo <guohanjun@huawei.com>

Lorenzo, Sudeep, please take a look at this patch.

Thanks
Hanjun

  reply	other threads:[~2024-11-09  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17 23:38 Min-Hua Chen
2024-10-19  6:47 ` Hanjun Guo
2024-11-09  8:36   ` Hanjun Guo [this message]
2024-11-12 16:10 ` Catalin Marinas

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=713ce05d-2d14-fe6b-c3f8-791fff4e50f2@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=minhuadotchen@gmail.com \
    --cc=rafael@kernel.org \
    --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

all inboxes | Powered by JetHome®