Linux EFI development
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Jose Marinho <jose.marinho@arm.com>
Subject: Re: [PATCH 1/3] arm64: efi: Simplify arch_efi_call_virt macro by not using efi_##f##_t type
Date: Sat, 25 Jun 2022 11:10:29 +0100	[thread overview]
Message-ID: <20220625101029.qekxekisalya2iys@bogus> (raw)
In-Reply-To: <CAMj1kXFAwzttyi=--fJyh9bGXv30Z4dkVR02_taS3JtKJXsLhA@mail.gmail.com>

On Fri, Jun 24, 2022 at 07:45:14PM +0200, Ard Biesheuvel wrote:
> On Fri, 24 Jun 2022 at 17:23, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > Currently, the arch_efi_call_virt() assumes all users of it will have
> > defined a type 'efi_##f##_t' to make use of it. It is unnecessarily
> > forcing the users to create a new typedef when __efi_rt_asm_wrapper()
> > actually expects void pointer.
> >
> > Simplify the arch_efi_call_virt() macro by typecasting p->f to (void *)
> > as required by __efi_rt_asm_wrapper() and eliminate the explicit need
> > for efi_##f##_t type for every user of this macro.
> >
>
> Can't we just use typeof() here?

I had tried that, but unless p->f is pointer of some type, we will get
the warning as it is passed without a cast to __efi_rt_asm_wrapper().

> __efi_rt_asm_wrapper() was intended as a temporary thing, so I'd
> prefer to avoid starting to rely on the void* type of its first
> argument.
>

Fair enough. Can we expect p->f to be some pointer then ? If yes, then
PRMT driver needs to change the handler_addr from u64 to some pointer
which sounds OK to me.

--
Regards,
Sudeep

  reply	other threads:[~2022-06-25 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 15:23 [PATCH 0/3] ACPI: Enable Platform Runtime Mechanism(PRM) support on ARM64 Sudeep Holla
2022-06-24 15:23 ` [PATCH 1/3] arm64: efi: Simplify arch_efi_call_virt macro by not using efi_##f##_t type Sudeep Holla
2022-06-24 17:45   ` Ard Biesheuvel
2022-06-25 10:10     ` Sudeep Holla [this message]
2022-06-25 16:01       ` Ard Biesheuvel
2022-06-24 15:23 ` [PATCH 2/3] ACPI: Enable Platform Runtime Mechanism(PRM) support on ARM64 Sudeep Holla
2022-06-24 17:41   ` Ard Biesheuvel
2022-06-24 15:23 ` [PATCH 3/3] ACPI: Move PRM config option under the main ACPI config Sudeep Holla
2022-06-24 17:42   ` Ard Biesheuvel

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=20220625101029.qekxekisalya2iys@bogus \
    --to=sudeep.holla@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=jose.marinho@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=rafael@kernel.org \
    --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