Thread (12 messages) 12 messages, 3 authors, 2017-05-22

Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions

From: Stefan Hajnoczi <hidden>
Date: 2017-05-22 09:43:27
Also in: kernel-janitors, kvm, lkml, virtualization

On Sat, May 20, 2017 at 04:32:17PM +0200, SF Markus Elfring wrote:
From: Markus Elfring <redacted>
Date: Sat, 20 May 2017 15:50:30 +0200

Omit seven extra messages for memory allocation failures in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Please include an actual explanation for this change instead of linking
to slides.  Why are you trying to get rid of memory allocation failure
messages?
quoted hunk ↗ jump to hunk
Signed-off-by: Markus Elfring <redacted>
---
 drivers/vhost/scsi.c | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 650533916c19..49d07950e2e5 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -417,5 +417,4 @@ vhost_scsi_allocate_evt(struct vhost_scsi *vs,
 	if (!evt) {
-		vq_err(vq, "Failed to allocate vhost_scsi_evt\n");
#define vq_err(vq, fmt, ...) do {                                  \
                pr_debug(pr_fmt(fmt), ##__VA_ARGS__);       \
                if ((vq)->error_ctx)                               \
                                eventfd_signal((vq)->error_ctx, 1);\
        } while (0)

You silently dropped the eventfd_signal() call.  Please explain.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help