Module Name: src Committed By: hans Date: Sun Mar 23 12:19:32 UTC 2025
Modified Files: src/sys/dev/wscons: wsmouse.c Log Message: wsmouse(4): fix bogus DIAGNOSTIC checks Similar to wskbd(4), these checks should be done always, and the only thing DIAGNOSTIC about them should be the printing of the message. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/wscons/wsmouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wscons/wsmouse.c diff -u src/sys/dev/wscons/wsmouse.c:1.73 src/sys/dev/wscons/wsmouse.c:1.74 --- src/sys/dev/wscons/wsmouse.c:1.73 Sun Jul 30 10:45:11 2023 +++ src/sys/dev/wscons/wsmouse.c Sun Mar 23 12:19:32 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: wsmouse.c,v 1.73 2023/07/30 10:45:11 riastradh Exp $ */ +/* $NetBSD: wsmouse.c,v 1.74 2025/03/23 12:19:32 hans Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -104,7 +104,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.73 2023/07/30 10:45:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.74 2025/03/23 12:19:32 hans Exp $"); #include "wsmouse.h" #include "wsdisplay.h" @@ -381,12 +381,12 @@ wsmouse_input(device_t wsmousedev, u_int if (evar == NULL) goto out; -#ifdef DIAGNOSTIC if (evar->q == NULL) { +#ifdef DIAGNOSTIC printf("wsmouse_input: evar->q=NULL\n"); +#endif goto out; } -#endif #if NWSMUX > 0 DPRINTFN(5,("wsmouse_input: %s mux=%p, evar=%p\n", @@ -789,12 +789,12 @@ wsmouseread(dev_t dev, struct uio *uio, if (sc->sc_dying) return (EIO); -#ifdef DIAGNOSTIC if (sc->sc_base.me_evp == NULL) { +#ifdef DIAGNOSTIC printf("wsmouseread: evp == NULL\n"); +#endif return (EINVAL); } -#endif sc->sc_refcnt++; error = wsevent_read(sc->sc_base.me_evp, uio, flags);