lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6Td0SUXBZGD/s3O@lizhi-Precision-Tower-5810>
Date: Thu, 6 Feb 2025 11:05:37 -0500
From: Frank Li <Frank.li@....com>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>
Cc: Bard Liao <yung-chuan.liao@...ux.intel.com>,
	Daniel Baluta <daniel.baluta@....com>,
	Iuliana Prodan <iuliana.prodan@....com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org, imx@...ts.linux.dev
Subject: Re: [PATCH v2 1/8] ASoC: SOF: imx: introduce more common structures
 and functions

On Wed, Feb 05, 2025 at 03:30:15PM -0500, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
>
> The SOF drivers for imx chips have a lot of duplicate code and
> routines/code snippets that could certainly be reused among drivers.
>
> As such, introduce a new set of structures and functions that will help
> eliminate the redundancy and code size of the drivers.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
> ---

some nits

Reviewed-by: Frank Li <Frank.Li@....com>

>  sound/soc/sof/imx/imx-common.c | 432 ++++++++++++++++++++++++++++++++-
>  sound/soc/sof/imx/imx-common.h | 151 ++++++++++++
>  2 files changed, 582 insertions(+), 1 deletion(-)
>
...
> +static int imx_probe(struct snd_sof_dev *sdev)
> +{
> +	struct dev_pm_domain_attach_data domain_data = {
> +		.pd_names = NULL, /* no filtering */
> +		.pd_flags = PD_FLAG_DEV_LINK_ON,
> +	};
> +	struct imx_common_data *common;
> +	struct platform_device *pdev;
> +	int ret;
> +
> +	pdev = to_platform_device(sdev->dev);
> +
...
> +
> +	ret = devm_clk_bulk_get_all(sdev->dev, &common->clks);
> +	if (ret < 0)
> +		return dev_err_probe(sdev->dev, common->clk_num,
> +				     "failed to fetch clocks\n");
> +	common->clk_num = ret;
> +
> +	/* no effect if number of clocks is 0 */

this comments should be common sense, can be removed.

Frank

> +	ret = clk_bulk_prepare_enable(common->clk_num, common->clks);
> +	if (ret < 0)
> +		return dev_err_probe(sdev->dev, ret, "failed to enable clocks\n");
> +
> +	common->ipc_handle->ops = &imx_ipc_ops;
> +	imx_dsp_set_data(common->ipc_handle, sdev);
> +
> +	sdev->num_cores = 1;
> +	sdev->pdata->hw_pdata = common;
> +	sdev->mailbox_bar = SOF_FW_BLK_TYPE_SRAM;
> +	sdev->dsp_box.offset = get_chip_info(sdev)->ipc_info.boot_mbox_offset;
> +
> +	return imx_chip_probe(sdev);
> +}
> +
...
> +
>  #endif
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ