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] [day] [month] [year] [list]
Message-ID: <aK1ubIiYCOwIFM5r@pixelbook>
Date: Tue, 26 Aug 2025 11:21:00 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Bence Csókás <csokas.bence@...lan.hu>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
	Vinod Koul <vkoul@...nel.org>
Subject: Re: [PATCH v7 1/2] dma: Add devm_dma_request_chan()

Tue, Jun 10, 2025 at 10:22:53AM +0200, Bence Csókás kirjoitti:
> Expand the arsenal of devm functions for DMA devices, this time for
> requesting channels.

...

> +/**
> + * devm_dma_request_chan - try to allocate an exclusive slave channel
> + * @dev:	pointer to client device structure
> + * @name:	slave channel name
> + *
> + * Returns pointer to appropriate DMA channel on success or an error pointer.
> + *
> + * The operation is managed and will be undone on driver detach.

This introduced a kernel-doc validation issue (Missing Return section).

> + */

> +

Unneeded blank line.

> +struct dma_chan *devm_dma_request_chan(struct device *dev, const char *name)

> +	struct dma_chan *chan = dma_request_chan(dev, name);
> +	int ret = 0;
> +
> +	if (!IS_ERR(chan))
> +		ret = devm_add_action_or_reset(dev, dmaenginem_release_channel, chan);
> +
> +	if (ret)
> +		return ERR_PTR(ret);
> +
> +	return chan;

Hmm... We usually use "error check" pattern
Compare to


	struct dma_chan *chan;
	int ret;

	chan = dma_request_chan(dev, name);
	if (IS_ERR(chan))
		return chan;

	ret = devm_add_action_or_reset(dev, dmaenginem_release_channel, chan);
	if (ret)
		return ERR_PTR(ret);

	return chan;

> +}

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ