All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Cc: michal.simek@amd.com, tanmay.shah@amd.com,
	mathieu.poirier@linaro.org, ben.levinsky@amd.com,
	nava.kishore.manne@amd.com, marex@denx.de, robh@kernel.org,
	arnd@arndb.de, ruanjinjie@huawei.com,
	sai.krishna.potthuri@amd.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Izhar Ameer Shaikh <izhar.ameer.shaikh@amd.com>
Subject: Re: [PATCH v3 1/5] firmware: xilinx: Update firmware call interface to support additional arg
Date: Sat, 21 Oct 2023 23:00:59 +0200	[thread overview]
Message-ID: <2023102105-frivolous-kindred-f566@gregkh> (raw)
In-Reply-To: <20231016111301.13369-2-jay.buddhabhatti@amd.com>

On Mon, Oct 16, 2023 at 04:12:57AM -0700, Jay Buddhabhatti wrote:
> System-level platform management layer (do_fw_call()) has support for
> maximum of 5 arguments as of now (1 EEMI API ID + 4 command arguments).
> In order to support new EEMI PM_IOCTL IDs (Secure Read/Write), this
> support must be extended to support one additional argument, which
> results in a configuration of - 1 EEMI API ID + 5 command arguments.
> 
> Update zynqmp_pm_invoke_fn() and do_fw_call() with this new definition
> containing additional argument. As a result, update all the references
> to pm invoke function with the updated definition.

There are simpler ways to do this to keep from having to constantly add
new parameters that do nothing to the existing calls.  Why not do this
in #defines that handle multiple arguments, or even simply functions
that can have less arguments to prevent this constant churn you go
through.

That will also make it more obvious that the other arguments mean
nothing for most of these callers, which is a good thing.

What is going to happen when you need to add support for another
argument?

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Cc: michal.simek@amd.com, tanmay.shah@amd.com,
	mathieu.poirier@linaro.org, ben.levinsky@amd.com,
	nava.kishore.manne@amd.com, marex@denx.de, robh@kernel.org,
	arnd@arndb.de, ruanjinjie@huawei.com,
	sai.krishna.potthuri@amd.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Izhar Ameer Shaikh <izhar.ameer.shaikh@amd.com>
Subject: Re: [PATCH v3 1/5] firmware: xilinx: Update firmware call interface to support additional arg
Date: Sat, 21 Oct 2023 23:00:59 +0200	[thread overview]
Message-ID: <2023102105-frivolous-kindred-f566@gregkh> (raw)
In-Reply-To: <20231016111301.13369-2-jay.buddhabhatti@amd.com>

On Mon, Oct 16, 2023 at 04:12:57AM -0700, Jay Buddhabhatti wrote:
> System-level platform management layer (do_fw_call()) has support for
> maximum of 5 arguments as of now (1 EEMI API ID + 4 command arguments).
> In order to support new EEMI PM_IOCTL IDs (Secure Read/Write), this
> support must be extended to support one additional argument, which
> results in a configuration of - 1 EEMI API ID + 5 command arguments.
> 
> Update zynqmp_pm_invoke_fn() and do_fw_call() with this new definition
> containing additional argument. As a result, update all the references
> to pm invoke function with the updated definition.

There are simpler ways to do this to keep from having to constantly add
new parameters that do nothing to the existing calls.  Why not do this
in #defines that handle multiple arguments, or even simply functions
that can have less arguments to prevent this constant churn you go
through.

That will also make it more obvious that the other arguments mean
nothing for most of these callers, which is a good thing.

What is going to happen when you need to add support for another
argument?

thanks,

greg k-h

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

  reply	other threads:[~2023-10-21 21:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 11:12 [PATCH v3 0/5] update for versal net platform Jay Buddhabhatti
2023-10-16 11:12 ` Jay Buddhabhatti
2023-10-16 11:12 ` [PATCH v3 1/5] firmware: xilinx: Update firmware call interface to support additional arg Jay Buddhabhatti
2023-10-16 11:12   ` Jay Buddhabhatti
2023-10-21 21:00   ` Greg KH [this message]
2023-10-21 21:00     ` Greg KH
2023-10-16 11:12 ` [PATCH v3 2/5] firmware: xilinx: Expand feature check to support all PLM modules Jay Buddhabhatti
2023-10-16 11:12   ` Jay Buddhabhatti
2023-10-16 11:12 ` [PATCH v3 3/5] firmware: xilinx: Register event manager driver Jay Buddhabhatti
2023-10-16 11:12   ` Jay Buddhabhatti
2023-10-16 11:13 ` [PATCH v3 4/5] drivers: soc: xilinx: Fix error message on SGI registration failure Jay Buddhabhatti
2023-10-16 11:13   ` Jay Buddhabhatti
2023-10-16 11:13 ` [PATCH v3 5/5] firmware: zynqmp: Add support to handle IPI CRC failure Jay Buddhabhatti
2023-10-16 11:13   ` Jay Buddhabhatti

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=2023102105-frivolous-kindred-f566@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=ben.levinsky@amd.com \
    --cc=izhar.ameer.shaikh@amd.com \
    --cc=jay.buddhabhatti@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mathieu.poirier@linaro.org \
    --cc=michal.simek@amd.com \
    --cc=nava.kishore.manne@amd.com \
    --cc=robh@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=tanmay.shah@amd.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.