Re: [PATCH v2] s390/ism: Add check for dma_set_max_seg_size in ism_probe()

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

 



> As the possible failure of the dma_set_max_seg_size(), we should better
> check the return value of the dma_set_max_seg_size().

Please avoid the repetition of a function name in such a change description.
Can it be improved with corresponding imperative wordings?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc5#n94


…
> +++ b/drivers/s390/net/ism_drv.c
> @@ -620,7 +620,10 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  		goto err_resource;
>
>  	dma_set_seg_boundary(&pdev->dev, SZ_1M - 1);
> -	dma_set_max_seg_size(&pdev->dev, SZ_1M);
> +	ret = dma_set_max_seg_size(&pdev->dev, SZ_1M);
> +	if (ret)
> +		goto err_resource;
> +
>  	pci_set_master(pdev);
…

A) Will the shown dma_set_seg_boundary() call trigger similar software development concerns?
   https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/dma-mapping.h#L562

B) Under which circumstances would you become interested to increase the application
   of scope-based resource management here?
   https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/cleanup.h#L8


Regards,
Markus





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux