Skip to content

drivers: i3c: npcx: Fix warning and verbosity - #117357

Open
edersondisouza wants to merge 2 commits into
zephyrproject-rtos:mainfrom
edersondisouza:npcx-less-verbose
Open

drivers: i3c: npcx: Fix warning and verbosity#117357
edersondisouza wants to merge 2 commits into
zephyrproject-rtos:mainfrom
edersondisouza:npcx-less-verbose

Conversation

@edersondisouza

Copy link
Copy Markdown
Contributor

Two issues:

  • Guard IBI raise for IBI is enabled;
  • Be less verbose on target read underruns.

Found those when playing with polling MCTP over I3C (CONFIG_MCTP_I3C_CONTROLLER_POLLING_MODE=y).

npcx_i3c_target_ibi_raise() is defined unconditionally, but the
.ibi_raise entry of the driver API that references it sits inside a
CONFIG_I3C_USE_IBI guard. Building with CONFIG_I3C_USE_IBI=n leaves
the function unreferenced and the compiler warns:

  warning: 'npcx_i3c_target_ibi_raise' defined but not used
  [-Wunused-function]

Wrap the function in the same guard as its only user.

Assisted-by: Copilot-CLI:claude-opus-5
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
An underrun maybe expected if, for instance, the controller is polling
to know if there's something to read. However, current logging was
logging URUNNACK (the underrun condition) with error level, which was
annoying (many messages per second depending on the controller's polling
rate).

This patch changes it so that underruns are only logged at debug level.

Assisted-by: Copilot-CLI:claude-opus-5
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants