[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a66afe4-5df8-4542-b74f-b050e71263fb@web.de>
Date: Wed, 26 Jun 2024 16:52:09 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Ma Ke <make24@...as.ac.cn>, linux-s390@...r.kernel.org,
netdev@...r.kernel.org, Alexander Gordeev <agordeev@...ux.ibm.com>,
Alexandra Winter <wintera@...ux.ibm.com>,
Christian Bornträger <borntraeger@...ux.ibm.com>,
"David S. Miller" <davem@...emloft.net>, Gerd Bayer <gbayer@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>, Niklas Schnelle
<schnelle@...ux.ibm.com>, Stefan Raspl <raspl@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Thorsten Winkler <twinkler@...ux.ibm.com>, Vasily Gorbik
<gor@...ux.ibm.com>, Wenjia Zhang <wenjia@...ux.ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] s390/ism: Add check for dma_set_max_seg_size in
ism_probe()
> 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,9 @@ 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)
> + return ret;
> pci_set_master(pdev);
…
1. 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
2. Would the following statement be more appropriate for the proposed completion
of the exception handling?
+ goto err_resource;
3. 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
Powered by blists - more mailing lists