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]
Date:   Wed, 24 Nov 2021 19:32:48 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>, Vinod Koul <vkoul@...nel.org>
Cc:     Arnd Bergmann <arnd@...db.de>, Andy Gross <agross@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Baolin Wang <baolin.wang7@...il.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hyun Kwon <hyun.kwon@...inx.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Jon Hunter <jonathanh@...dia.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        Michal Simek <michal.simek@...inx.com>,
        Nicolas Saenz Julienne <nsaenz@...nel.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Scott Branden <sbranden@...adcom.com>,
        Takashi Iwai <tiwai@...e.com>,
        Thierry Reding <thierry.reding@...il.com>,
        alsa-devel@...a-project.org, bcm-kernel-feedback-list@...adcom.com,
        dmaengine@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mmc@...r.kernel.org, linux-mtd@...ts.infradead.org,
        linux-rpi-kernel@...ts.infradead.org, linux-serial@...r.kernel.org,
        linux-spi@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-tegra@...r.kernel.org
Subject: Re: [PATCH v2 01/11] ASoC: tegra20-spdif: stop setting slave_id

23.11.2021 01:21, Arnd Bergmann пишет:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The DMA resource is never set up anywhere, and passing this as slave_id
> has not been the proper procedure in a long time.
> 
> As a preparation for removing all slave_id references from the ALSA code,
> remove this one.
> 
> According to Dmitry Osipenko, this driver has never been used and
> the mechanism for configuring DMA would not work as it is implemented,
> so this part will get rewritten when the driver gets put into use
> again in the future.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  sound/soc/tegra/tegra20_spdif.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
> index 9fdc82d58db3..1c3385da6f82 100644
> --- a/sound/soc/tegra/tegra20_spdif.c
> +++ b/sound/soc/tegra/tegra20_spdif.c
> @@ -284,7 +284,6 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
>  	spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT;
>  	spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
>  	spdif->playback_dma_data.maxburst = 4;
> -	spdif->playback_dma_data.slave_id = dmareq->start;
>  
>  	pm_runtime_enable(&pdev->dev);
>  
> 

Thanks, Arnd!

The commit message is correct, however you could remove even more code
here. But there is no need to make a v3 just because this patch because
I already prepared patchset that revives this S/PDIF driver and enables
HDMI audio on Tegra20. I'll take care of cleaning up the whole code of
this driver.

diff --git a/sound/soc/tegra/tegra20_spdif.c
b/sound/soc/tegra/tegra20_spdif.c
index 7751575cd6d6..1c3385da6f82 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -251,7 +251,7 @@ static const struct regmap_config
tegra20_spdif_regmap_config = {
 static int tegra20_spdif_platform_probe(struct platform_device *pdev)
 {
 	struct tegra20_spdif *spdif;
-	struct resource *mem, *dmareq;
+	struct resource *mem;
 	void __iomem *regs;
 	int ret;

@@ -273,12 +273,6 @@ static int tegra20_spdif_platform_probe(struct
platform_device *pdev)
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);

-	dmareq = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-	if (!dmareq) {
-		dev_err(&pdev->dev, "No DMA resource\n");
-		return -ENODEV;
-	}
-
 	spdif->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
 					    &tegra20_spdif_regmap_config);
 	if (IS_ERR(spdif->regmap)) {
@@ -290,7 +284,6 @@ static int tegra20_spdif_platform_probe(struct
platform_device *pdev)
 	spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT;
 	spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	spdif->playback_dma_data.maxburst = 4;
-	spdif->playback_dma_data.slave_id = dmareq->start;

 	pm_runtime_enable(&pdev->dev);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ