mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: George Yang <George.Yang@amd.com>, Lizhi Hou <lizhi.hou@amd.com>,
	Min Ma <min.ma@amd.com>,
	Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com>,
	dri-devel@lists.freedesktop.org, Oded Gabbay <ogabbay@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Max Zhen <max.zhen@amd.com>,
	Sonal Santan <sonal.santan@amd.com>
Subject: Re: [PATCH 01/10] accel/amdxdna: Add a new driver for AMD AI Engine
Date: Sat, 20 Jul 2024 08:23:09 +0200	[thread overview]
Message-ID: <87db1a67-ede6-4da5-89b9-a75a67770edd@web.de> (raw)
In-Reply-To: <20240719175128.2257677-2-lizhi.hou@amd.com>

…
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -0,0 +1,182 @@
> +static int aie2_init(struct amdxdna_dev *xdna)
> +{
> +	const struct firmware *fw;

I suggest to take another software design option better into account
also according to the application of scope-based resource management.

* You may reduce the scope of such a local variable.

* How do you think about to use the attribute “__free(firmware)”?
  https://elixir.bootlin.com/linux/v6.10/source/include/linux/firmware.h#L202> +	ret = request_firmware(&fw, ndev->priv->fw_path, &pdev->dev);
…


Regards,
Markus

  parent reply	other threads:[~2024-07-20  6:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 17:51 [PATCH V1 00/10] AMD XDNA driver Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 01/10] accel/amdxdna: Add a new driver for AMD AI Engine Lizhi Hou
2024-07-19 19:42   ` [PATCH " Markus Elfring
2024-07-19 20:07     ` Lizhi Hou
2024-07-19 20:33   ` Markus Elfring
2024-07-20  6:23   ` Markus Elfring [this message]
2024-07-20  7:03   ` Markus Elfring
2024-07-19 17:51 ` [PATCH V1 02/10] accel/amdxdna: Support hardware mailbox Lizhi Hou
2024-07-19 20:04   ` [PATCH " Markus Elfring
2024-07-20  8:05   ` Markus Elfring
2024-07-19 17:51 ` [PATCH V1 03/10] accel/amdxdna: Add hardware resource solver Lizhi Hou
2024-07-20  9:15   ` [PATCH " Markus Elfring
2024-07-19 17:51 ` [PATCH V1 04/10] accel/amdxdna: Add hardware context Lizhi Hou
2024-07-20 10:54   ` [PATCH " Markus Elfring
2024-07-22 16:56     ` Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 05/10] accel/amdxdna: Add GEM buffer object management Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 06/10] accel/amdxdna: Add command execution Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 07/10] accel/amdxdna: Add suspend and resume Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 08/10] accel/amdxdna: Add error handling Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 09/10] accel/amdxdna: Add query functions Lizhi Hou
2024-07-19 17:51 ` [PATCH V1 10/10] accel/amdxdna: Add firmware debug buffer support Lizhi Hou

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=87db1a67-ede6-4da5-89b9-a75a67770edd@web.de \
    --to=markus.elfring@web.de \
    --cc=George.Yang@amd.com \
    --cc=VenkataNarendraKumar.Gutta@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=max.zhen@amd.com \
    --cc=min.ma@amd.com \
    --cc=ogabbay@kernel.org \
    --cc=sonal.santan@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 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®