From: sashiko-bot@kernel.org
To: "Ramesh Ramalingam" <r-ramalingam@ti.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 03/17] wifi: cc33xx: Add debug.h
Date: Thu, 03 Dec 2026 07:26:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-247288@kernel.org> (raw)
In-Reply-To: <20261203070906.1294171-4-r-ramalingam@ti.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] wifi: cc33xx: debug.h is not self-contained due to missing
kernel includes
- [Low] wifi: cc33xx: debug macros and debug_level are no-ops without
DYNAMIC_DEBUG
--
commit f51a97b31fa519e45c24343fe1cf9fecb56c8f46
Author: Michael Nemanov <michael.nemanov@ti.com>
wifi: cc33xx: Add debug.h
This commit adds the debug header for the cc33xx wireless driver, defining
debug level bitmasks and logging macros for debug messages and hex dumps.
> diff --git a/drivers/net/wireless/ti/cc33xx/debug.h b/drivers/net/wireless/ti/cc33xx/debug.h
> new file mode 100644
> index 0000000000000..0f47942d4ecbf
> --- /dev/null
> +++ b/drivers/net/wireless/ti/cc33xx/debug.h
> @@ -0,0 +1,70 @@
> +/* SPDX-License-Identifier: GPL-2.0-only
> + *
> + * Copyright (C) 2022-2026 Texas Instruments Incorporated - https://www.ti.com/
> + */
> +
> +#ifndef __DEBUG_H__
> +#define __DEBUG_H__
> +
> +#define DRIVER_NAME "cc33xx"
> +#define DRIVER_PREFIX DRIVER_NAME ": "
> +
> +enum {
> + DEBUG_NONE = 0,
> + DEBUG_IRQ = BIT(0),
[ ... ]
> + DEBUG_ALL = GENMASK(31, 0),
> + DEBUG_NO_DATAPATH = (DEBUG_ALL & ~DEBUG_IRQ & ~DEBUG_TX & ~DEBUG_RX & ~DEBUG_CORE_STATUS),
> +};
> +
> +extern u32 cc33xx_debug_level;
[Severity: Low]
Should debug.h include the kernel headers it depends on so it can be
compiled standalone?
The header has no #include directives, yet uses BIT(), GENMASK(), and u32
at file scope, and its macros expand unlikely(), dev_dbg(),
print_hex_dump_debug(), DUMP_PREFIX_OFFSET, min_t(), size_t, and true.
Including debug.h standalone or before cc33xx.h will fail to compile.
[ ... ]
> +#define cc33xx_debug(dev, level, fmt, arg...) \
> + do { \
> + if (unlikely((level) & cc33xx_debug_level)) \
> + dev_dbg(dev, fmt, ##arg); \
> + } while (0)
> +
> +#define cc33xx_dump(level, prefix, buf, len) \
> + do { \
> + if ((level) & cc33xx_debug_level) \
> + print_hex_dump_debug(DRIVER_PREFIX prefix, \
> + DUMP_PREFIX_OFFSET, 16, 1, \
> + buf, \
> + min_t(size_t, len, DEBUG_DUMP_LIMIT), \
> + 0); \
> + } while (0)
> +
> +#define cc33xx_dump_ascii(level, prefix, buf, len) \
> + do { \
> + if ((level) & cc33xx_debug_level) \
> + print_hex_dump_debug(DRIVER_PREFIX prefix, \
> + DUMP_PREFIX_OFFSET, 16, 1, \
> + buf, \
> + min_t(size_t, len, DEBUG_DUMP_LIMIT), \
> + true); \
> + } while (0)
[Severity: Low]
Do cc33xx_debug(), cc33xx_dump(), and cc33xx_dump_ascii() become no-ops
when CONFIG_DYNAMIC_DEBUG is disabled?
Without CONFIG_DYNAMIC_DEBUG or -DDEBUG (which commit "wifi: cc33xx: Add
Kconfig, Makefile" does not set), dev_dbg() compiles to dev_no_printk()
and print_hex_dump_debug() is an empty stub. Writing to debug_level
from commit "wifi: cc33xx: Add main.c" then silently produces no output.
A !CONFIG_DYNAMIC_DEBUG fallback to dev_printk(KERN_DEBUG, ...) and
print_hex_dump(), as in fc3d1db5b60e ("wlcore: make debug prints work
without dynamic debug"), would need cc33xx_debug_level to default to
DEBUG_NONE in that build to avoid flooding boot logs.
When CONFIG_DYNAMIC_DEBUG is enabled, the DEBUG_NO_DATAPATH default also
inverts the unlikely() hint in cc33xx_debug() for non-datapath callsites
while double-gating datapath logs behind both dyndbg and debug_level.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203070906.1294171-1-r-ramalingam@ti.com?part=3
next prev parent reply other threads:[~2026-12-03 7:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 7:08 [PATCH v6 00/17] wifi: cc33xx: Add driver for new TI CC33xx wireless device family Ramesh Ramalingam
2026-12-03 7:08 ` [PATCH v6 01/17] dt-bindings: net: wireless: cc33xx: Add ti,cc33xx.yaml Ramesh Ramalingam
2026-12-03 7:20 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 02/17] wifi: cc33xx: Add cc33xx.h, cc33xx_i.h Ramesh Ramalingam
2026-12-03 7:31 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 03/17] wifi: cc33xx: Add debug.h Ramesh Ramalingam
2026-12-03 7:26 ` sashiko-bot [this message]
2026-12-03 7:08 ` [PATCH v6 04/17] wifi: cc33xx: Add sdio.c, io.c, io.h Ramesh Ramalingam
2026-12-03 7:33 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 05/17] wifi: cc33xx: Add cmd.c, cmd.h Ramesh Ramalingam
2026-12-03 7:42 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 06/17] wifi: cc33xx: Add acx.c, acx.h Ramesh Ramalingam
2026-12-03 7:32 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 07/17] wifi: cc33xx: Add event.c, event.h Ramesh Ramalingam
2026-12-03 7:31 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 08/17] wifi: cc33xx: Add boot.c, boot.h Ramesh Ramalingam
2026-12-03 7:38 ` sashiko-bot
2026-12-03 7:08 ` [PATCH v6 09/17] wifi: cc33xx: Add main.c Ramesh Ramalingam
2026-12-03 7:08 ` [PATCH v6 10/17] wifi: cc33xx: Add rx.c, rx.h Ramesh Ramalingam
2026-12-03 7:33 ` sashiko-bot
2026-12-03 7:09 ` [PATCH v6 11/17] wifi: cc33xx: Add tx.c, tx.h Ramesh Ramalingam
2026-12-03 7:47 ` sashiko-bot
2026-12-03 7:09 ` [PATCH v6 12/17] wifi: cc33xx: Add init.c, init.h Ramesh Ramalingam
2026-12-03 7:43 ` sashiko-bot
2026-12-03 7:09 ` [PATCH v6 13/17] wifi: cc33xx: Add scan.c, scan.h Ramesh Ramalingam
[not found] ` <20261203070906.1294171-16-r-ramalingam@ti.com>
2026-12-03 7:43 ` [PATCH v6 15/17] wifi: cc33xx: Add ps.c, ps.h sashiko-bot
[not found] ` <20261203070906.1294171-18-r-ramalingam@ti.com>
2026-12-03 7:46 ` [PATCH v6 17/17] wifi: cc33xx: Add Kconfig, Makefile sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-247288@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=r-ramalingam@ti.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox