Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci vioif(4): added __predct_false to error check



details:   https://anonhg.NetBSD.org/src/rev/ed7206b501db
branches:  trunk
changeset: 373966:ed7206b501db
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Mar 23 02:33:34 2023 +0000

description:
vioif(4): added __predct_false to error check

diffstat:

 sys/dev/pci/if_vioif.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e60e9fa606c6 -r ed7206b501db sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Thu Mar 23 02:30:14 2023 +0000
+++ b/sys/dev/pci/if_vioif.c    Thu Mar 23 02:33:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.96 2023/03/23 02:30:14 yamaguchi Exp $  */
+/*     $NetBSD: if_vioif.c,v 1.97 2023/03/23 02:33:34 yamaguchi Exp $  */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.96 2023/03/23 02:30:14 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.97 2023/03/23 02:33:34 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1532,7 +1532,7 @@
                r = virtio_enqueue_prep(vsc, vq, &slot);
                if (r == EAGAIN)
                        break;
-               if (r != 0)
+               if (__predict_false(r != 0))
                        panic("enqueue_prep for rx buffers");
 
                map = &rxq->rxq_maps[slot];



Home | Main Index | Thread Index | Old Index