git: 4f345989700f - main - bcm5974(4): Respect HID_DEBUG option and fix debugging printf

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Wed, 21 Feb 2024 20:32:37 UTC
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f345989700ff962e1f012d732881f1770946c9e

commit 4f345989700ff962e1f012d732881f1770946c9e
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2024-02-21 20:31:39 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-02-21 20:31:39 +0000

    bcm5974(4): Respect HID_DEBUG option and fix debugging printf
    
    Sponsored by:   Serenity Cyber Security
    MFC after:      1 month
---
 sys/dev/hid/bcm5974.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c
index 749f1e7d4b2b..e76e3dfa805c 100644
--- a/sys/dev/hid/bcm5974.c
+++ b/sys/dev/hid/bcm5974.c
@@ -27,6 +27,8 @@
  * SUCH DAMAGE.
  */
 
+#include "opt_hid.h"
+
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/endian.h>
@@ -826,7 +828,7 @@ bcm5974_intr(void *context, void *data, hid_size_t len)
 	if ((len < params->tp->offset + fsize) ||
 	    ((len - params->tp->offset) % fsize) != 0) {
 		DPRINTFN(BCM5974_LLEVEL_INFO, "Invalid length: %d, %x, %x\n",
-		    len, sc->tp_data[0], sc->tp_data[1]);
+		    len, params->tp->offset, fsize);
 		return;
 	}