Linux-HyperV List
 help / color / mirror / Atom feed
* [PATCH] x86/hyperv: Cosmetic changes for hv_utils_transport.c
@ 2025-07-30 10:37 Abhishek Tiwari
  2025-07-30 11:08 ` Naman Jain
  0 siblings, 1 reply; 3+ messages in thread
From: Abhishek Tiwari @ 2025-07-30 10:37 UTC (permalink / raw)
  To: abhitiwari, kys, haiyangz, wei.liu, decui, linux-hyperv,
	linux-kernel, ssengar
  Cc: Abhishek Tiwari

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>
---
 drivers/hv/hv_utils_transport.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
index 832885198643..b3de35ff6334 100644
--- a/drivers/hv/hv_utils_transport.c
+++ b/drivers/hv/hv_utils_transport.c
@@ -129,8 +129,7 @@ static int hvt_op_open(struct inode *inode, struct file *file)
 		 * device gets released.
 		 */
 		hvt->mode = HVUTIL_TRANSPORT_CHARDEV;
-	}
-	else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
+	} else if (hvt->mode == HVUTIL_TRANSPORT_NETLINK) {
 		/*
 		 * We're switching from netlink communication to using char
 		 * device. Issue the reset first.
@@ -195,7 +194,7 @@ static void hvt_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
 	}
 	spin_unlock(&hvt_list_lock);
 	if (!hvt_found) {
-		pr_warn("hvt_cn_callback: spurious message received!\n");
+		pr_warn("%s: spurious message received!\n", __func__);
 		return;
 	}
 
@@ -210,7 +209,7 @@ static void hvt_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
 	if (hvt->mode == HVUTIL_TRANSPORT_NETLINK)
 		hvt_found->on_msg(msg->data, msg->len);
 	else
-		pr_warn("hvt_cn_callback: unexpected netlink message!\n");
+		pr_warn("%s: unexpected netlink message!\n", __func__);
 	mutex_unlock(&hvt->lock);
 }
 
@@ -260,8 +259,9 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len,
 		hvt->outmsg_len = len;
 		hvt->on_read = on_read_cb;
 		wake_up_interruptible(&hvt->outmsg_q);
-	} else
+	} else {
 		ret = -ENOMEM;
+	}
 out_unlock:
 	mutex_unlock(&hvt->lock);
 	return ret;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/hyperv: Cosmetic changes for hv_utils_transport.c
  2025-07-30 10:37 [PATCH] x86/hyperv: Cosmetic changes for hv_utils_transport.c Abhishek Tiwari
@ 2025-07-30 11:08 ` Naman Jain
  2025-07-30 12:48   ` Abhishek Tiwari
  0 siblings, 1 reply; 3+ messages in thread
From: Naman Jain @ 2025-07-30 11:08 UTC (permalink / raw)
  To: Abhishek Tiwari, abhitiwari, kys, haiyangz, wei.liu, decui,
	linux-hyperv, linux-kernel, ssengar



On 7/30/2025 4:07 PM, Abhishek Tiwari wrote:
> 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>

Please use a different prefix for Subject.
Replace "x86/hyperv:" with "Drivers: hv: util:"

We generally follow the naming practice used for a file, which can be
seen in git log <file_path>.

Rest LGTM. Post above change:
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>

Regards,
Naman


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/hyperv: Cosmetic changes for hv_utils_transport.c
  2025-07-30 11:08 ` Naman Jain
@ 2025-07-30 12:48   ` Abhishek Tiwari
  0 siblings, 0 replies; 3+ messages in thread
From: Abhishek Tiwari @ 2025-07-30 12:48 UTC (permalink / raw)
  To: Naman Jain
  Cc: abhitiwari, kys, haiyangz, wei.liu, decui, linux-hyperv,
	linux-kernel, ssengar

On Wed, Jul 30, 2025 at 04:38:33PM +0530, Naman Jain wrote:
> 
> 
> On 7/30/2025 4:07 PM, Abhishek Tiwari wrote:
> >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>
> 
> Please use a different prefix for Subject.
> Replace "x86/hyperv:" with "Drivers: hv: util:"
> 
> We generally follow the naming practice used for a file, which can be
> seen in git log <file_path>.
> 
> Rest LGTM. Post above change:
> Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
> 
> Regards,
> Naman

Sure, thanks.
I will do the suggested commit message changes in the v2 patch.

Regards,
Abhishek.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-30 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 10:37 [PATCH] x86/hyperv: Cosmetic changes for hv_utils_transport.c Abhishek Tiwari
2025-07-30 11:08 ` Naman Jain
2025-07-30 12:48   ` Abhishek Tiwari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox