hyperv: remove meaningless pr_err() in vmbus_recvpacket_raw()
diff mbox series

Message ID 1404108888-1329-1-git-send-email-jasowang@redhat.com
State New, archived
Headers show
Series
  • hyperv: remove meaningless pr_err() in vmbus_recvpacket_raw()
Related show

Commit Message

Jason Wang June 30, 2014, 6:14 a.m. UTC
All its callers depends on the return value of -ENOBUFS to reallocate a
bigger buffer and retry the receiving. So there's no need to call
pr_err() here since it was not a real issue, otherwise syslog will be
flooded by this false warning.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/hv/channel.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

Comments

KY Srinivasan June 30, 2014, 2:51 p.m. UTC | #1
> -----Original Message-----
> From: Jason Wang [mailto:jasowang@redhat.com]
> Sent: Sunday, June 29, 2014 11:15 PM
> To: KY Srinivasan; Haiyang Zhang; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org
> Cc: Jason Wang
> Subject: [PATCH] hyperv: remove meaningless pr_err() in
> vmbus_recvpacket_raw()
> 
> All its callers depends on the return value of -ENOBUFS to reallocate a bigger
> buffer and retry the receiving. So there's no need to call
> pr_err() here since it was not a real issue, otherwise syslog will be flooded by
> this false warning.
> 
> Cc: K. Y. Srinivasan <kys@microsoft.com>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Thanks Jason.

Signed-off-by:  K. Y. Srinivasan <kys@microsoft.com>

> ---
>  drivers/hv/channel.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index
> 284cf66..531a593 100644
> --- a/drivers/hv/channel.c
> +++ b/drivers/hv/channel.c
> @@ -808,12 +808,8 @@ int vmbus_recvpacket_raw(struct vmbus_channel
> *channel, void *buffer,
> 
>  	*buffer_actual_len = packetlen;
> 
> -	if (packetlen > bufferlen) {
> -		pr_err("Buffer too small - needed %d bytes but "
> -			"got space for only %d bytes\n",
> -			packetlen, bufferlen);
> +	if (packetlen > bufferlen)
>  		return -ENOBUFS;
> -	}
> 
>  	*requestid = desc.trans_id;
> 
> --
> 1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 284cf66..531a593 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -808,12 +808,8 @@  int vmbus_recvpacket_raw(struct vmbus_channel *channel, void *buffer,
 
 	*buffer_actual_len = packetlen;
 
-	if (packetlen > bufferlen) {
-		pr_err("Buffer too small - needed %d bytes but "
-			"got space for only %d bytes\n",
-			packetlen, bufferlen);
+	if (packetlen > bufferlen)
 		return -ENOBUFS;
-	}
 
 	*requestid = desc.trans_id;