Skip to content

Conversation

@bardliao
Copy link
Collaborator

Command Ignored is a valid response of SoundWire. It could happen when an invalid interrupt occurs when the device is not attached. The driver will try to access the device and will get an Ignored response. It is harmless to ignore the unexpected interrupt. Lower the trace level to not scare users.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts logging behavior for SoundWire Command Ignored responses by downgrading error messages to warnings. The Command Ignored response (-ENODATA) is a valid status that can occur when accessing unattached devices during unexpected interrupts, and treating it as an error unnecessarily alarms users.

Key Changes:

  • Added conditional logging based on error type, using dev_warn() for -ENODATA instead of dev_err()
  • Applied this pattern to both direct register read failures and slave alert handling failures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"SDW_SCP_INT1 read failed:%d\n", ret);
if (ret == -ENODATA)
dev_warn(&slave->dev,
"SDW_SCP_INT1 read command was ignored:%d\n", ret);
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after colon in warning message. Should be 'was ignored: %d' for consistency with the error message on line 1672.

Suggested change
"SDW_SCP_INT1 read command was ignored:%d\n", ret);
"SDW_SCP_INT1 read command was ignored: %d\n", ret);

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no space on line 1672, too.

"SDW_SCP_INT1 read failed:%d\n", ret);
if (ret == -ENODATA)
dev_warn(&slave->dev,
"SDW_SCP_INT1 read command was ignored:%d\n", ret);
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Including the error code (%d) in the warning message is redundant since -ENODATA is already confirmed by the condition. The error code adds no additional value for this specific case.

Suggested change
"SDW_SCP_INT1 read command was ignored:%d\n", ret);
"SDW_SCP_INT1 read command was ignored\n");

Copilot uses AI. Check for mistakes.
Command Ignored is a valid response of SoundWire. It could happen when
an invalid interrupt occurs when the device is not attached.
The driver will try to access the device and will get an Ignored response.
It is harmless to ignore the unexpected interrupt. Lower the trace level
to not scare users.

Signed-off-by: Bard Liao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant