Re: [PATCH v2] drivers: hv: vmbus: Add missing check for dma_set_mask in vmbus_device_register()

2024-07-03 Thread Markus Elfring
> child_device_obj->device cannot perform DMA properly if dma_set_mask() > returns non-zero. … Can the repetition of another wording suggestion influence the software evolution? Direct memory access can not be properly performed any more after a dma_set_mask() call failed. See also: https:/

Re: [PATCH] Drivers: hv: vmbus: Add missing check for dma_set_mask in vmbus_device_register()

2024-07-01 Thread Markus Elfring
> child_device_obj->device cannot perform DMA properly if dma_set_mask() > returns non-zero. … Another wording suggestion: Direct memory access can not be properly performed any more after a dma_set_mask() call failed. See also: https://elixir.bootlin.com/linux/v6.10-rc6/source/kernel/dma/ma

Re: [PATCH 1/2] Drivers: hv: vmbus: Remove duplication and cleanup code in create_gpadl_header()

2024-01-12 Thread Markus Elfring
… > Eliminate the duplication by making minor tweaks to the logic and > associated comments. While here, simplify the handling of memory > allocation errors, and use umin() instead of open coding it. … I got the impression that the adjustment for the mentioned macro should be performed in a separa

Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Markus Elfring
> It occurred to me overnight that the existing error handling > in create_gpadl_header() is unnecessarily complicated. Here's > an approach that I think would fix what you have flagged, and > would reduce complexity instead of increasing it. Thoughts? I find this development view interesting.

Re: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2024-01-10 Thread Markus Elfring
>> The kfree() function was called in two cases by >> the create_gpadl_header() function during error handling >> even if the passed variable contained a null pointer. >> This issue was detected by using the Coccinelle software. >> >> Thus use another label. > > Interestingly, there's a third case

[PATCH] Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 20:00:24 +0100 The kfree() function was called in two cases by the create_gpadl_header() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. Thus use another