Re: [PATCH 01/10] accel/amdxdna: Add a new driver for AMD AI Engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux