Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Drivers: hv: util: Cosmetic changes for hv_utils_transport.c

Fix issues reported by checkpatch.pl script for hv_utils_transport.c file
- Update pr_warn() calls to use __func__ for consistent logging context.
- else should follow close brace '}'

No functional changes intended.

Signed-off-by: Abhishek Tiwari <abhitiwari@linux.microsoft.com>
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Abhishek Tiwari and committed by
Wei Liu
ac7b0a5c f26c9306

+5 -5
+5 -5
drivers/hv/hv_utils_transport.c
··· 129 129 * device gets released. 130 130 */ 131 131 hvt->mode = HVUTIL_TRANSPORT_CHARDEV; 132 - } 133 - else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) { 132 + } else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) { 134 133 /* 135 134 * We're switching from netlink communication to using char 136 135 * device. Issue the reset first. ··· 194 195 } 195 196 spin_unlock(&hvt_list_lock); 196 197 if (!hvt_found) { 197 - pr_warn("hvt_cn_callback: spurious message received!\n"); 198 + pr_warn("%s: spurious message received!\n", __func__); 198 199 return; 199 200 } 200 201 ··· 209 210 if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) 210 211 hvt_found->on_msg(msg->data, msg->len); 211 212 else 212 - pr_warn("hvt_cn_callback: unexpected netlink message!\n"); 213 + pr_warn("%s: unexpected netlink message!\n", __func__); 213 214 mutex_unlock(&hvt->lock); 214 215 } 215 216 ··· 259 260 hvt->outmsg_len = len; 260 261 hvt->on_read = on_read_cb; 261 262 wake_up_interruptible(&hvt->outmsg_q); 262 - } else 263 + } else { 263 264 ret = -ENOMEM; 265 + } 264 266 out_unlock: 265 267 mutex_unlock(&hvt->lock); 266 268 return ret;