hyperv: remove meaningless pr_err() in vmbus_recvpacket_raw()
PATCH 1/1 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.
--- drivers/hv/channel.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/hv/channel.c +1 -5
@@ -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;
Signature · 1 line
1.7.1
Quoted 11 lines
-----Original Message-----
From: Jason Wang [mailto:[email protected]]
Sent: Sunday, June 29, 2014 11:15 PM
To: KY Srinivasan; Haiyang Zhang; [email protected]; linux- [email protected]
Cc: Jason Wang
Subject: [PATCH] hyperv: remove meaninglesspr_err()invmbus_recvpacket_raw()
Quoted 8 lines
All its callers depends on the return value of
-ENOBUFSto reallocate a bigger buffer and retry the receiving. So there's no need to callpr_err()here since it was not a real issue, otherwise syslog will be flooded by this false warning.Cc K. Y. Srinivasan <[email protected]>Cc Haiyang Zhang <[email protected]>Signed-off-by Jason Wang <[email protected]>
Thanks Jason.
Quoted 25 lines
--- drivers/hv/channel.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)drivers/hv/channel.c index renamed from drivers/hv/channel.c +0
-0284cf66..531a593 100644
drivers/hv/channel.c +1
-6@@ -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