linux/drivers/hv
Michael Kelley 8db0edc4ac Drivers: hv: vmbus: Remove duplication and cleanup code in create_gpadl_header()
create_gpadl_header() creates a message header, and one or more message
bodies if the number of GPADL entries exceeds what fits in the
header. Currently the code for creating the message header is
duplicated in the two halves of the main "if" statement governing
whether message bodies are created.

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.

For ease of review, the indentation of sizable chunks of code is
*not* changed.  A follow-on patch updates only the indentation.

No functional change.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/20240111165451.269418-1-mhklinux@outlook.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20240111165451.269418-1-mhklinux@outlook.com>
2024-03-01 08:21:16 +00:00
..
channel_mgmt.c Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-05-23 18:53:16 +00:00
channel.c Drivers: hv: vmbus: Remove duplication and cleanup code in create_gpadl_header() 2024-03-01 08:21:16 +00:00
connection.c hyperv-next for v6.6 2023-09-04 11:26:29 -07:00
hv_balloon.c hyperv-next for v6.6 2023-09-04 11:26:29 -07:00
hv_common.c iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops() 2023-12-12 10:18:45 +01:00
hv_debugfs.c hv_debugfs: Make hv_debug_root static 2020-04-04 17:47:43 +01:00
hv_fcopy.c Drivers: hv: remove duplicate word in a comment 2022-09-05 16:28:40 +00:00
hv_kvp.c Drivers: hv: Fix syntax errors in comments 2022-06-08 12:26:28 +00:00
hv_snapshot.c hv_utils: Add comment about max VMbus packet size in VSS driver 2022-02-18 13:08:18 +00:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE 2021-04-18 13:03:11 +00:00
hv_util.c hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC 2024-03-01 08:19:06 +00:00
hv_utils_transport.c Drivers: hv: utils: Make use of the helper macro LIST_HEAD() 2022-02-09 14:33:21 +00:00
hv_utils_transport.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280 2019-06-05 17:36:36 +02:00
hv.c x86/hyperv: Remove hv_isolation_type_en_snp 2023-08-25 00:04:57 +00:00
hyperv_vmbus.h Drivers: hv: vmbus: Bring the post_msg_page back for TDX VMs with the paravisor 2023-08-25 00:04:57 +00:00
Kconfig Drivers: hv: Kconfig: Add HYPERV_VTL_MODE 2023-04-18 17:29:52 +00:00
Makefile Drivers: hv: Move Hyper-V extended capability check to arch neutral code 2021-06-05 10:22:34 +00:00
ring_buffer.c Drivers: hv: vmbus: Remove second way of mapping ring buffers 2023-04-17 19:19:04 +00:00
vmbus_drv.c hyperv: avoid dependency on screen_info 2023-10-17 10:17:02 +02:00