Source-Changes-D archive

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

Re: CVS commit: src/sys/dev/pci



On Sun, Feb 27, 2022 at 12:04:58AM +0100, Joerg Sonnenberger wrote:
> Personally, I prefer the use of the C extension in cases like this. The
> "portable" version is less readable...

I would prefer the type correct C++ style variant (and making lint deal
with it, if it doesn't yet). At least gcc is happy with it.

Index: if_wm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.728
diff -u -p -r1.728 if_wm.c
--- if_wm.c	26 Feb 2022 14:53:05 -0000	1.728
+++ if_wm.c	27 Feb 2022 10:48:11 -0000
@@ -10025,7 +10025,7 @@ wm_txrxintr_disable(struct wm_queue *wmq
 	struct wm_softc *sc = wmq->wmq_txq.txq_sc;
 
 	if (__predict_false(!wm_is_using_msix(sc))) {
-		return wm_legacy_intr_disable(sc);
+		return (void)wm_legacy_intr_disable(sc);
 	}
 
 	if (sc->sc_type == WM_T_82574)
@@ -10046,7 +10046,7 @@ wm_txrxintr_enable(struct wm_queue *wmq)
 	wm_itrs_calculate(sc, wmq);
 
 	if (__predict_false(!wm_is_using_msix(sc))) {
-		return wm_legacy_intr_enable(sc);
+		return (void)wm_legacy_intr_enable(sc);
 	}
 
 	/*



Home | Main Index | Thread Index | Old Index