Skip to content

GLINK wakelock changes (debug)#1247

Open
jprakash-qc wants to merge 1 commit into
qualcomm-linux:tech/pmic/miscfrom
jprakash-qc:tech/pmic/misc
Open

GLINK wakelock changes (debug)#1247
jprakash-qc wants to merge 1 commit into
qualcomm-linux:tech/pmic/miscfrom
jprakash-qc:tech/pmic/misc

Conversation

@jprakash-qc

Copy link
Copy Markdown

No description provided.

@qcomlnxci qcomlnxci requested review from a team, QUIC-kamalw, fenglinw-qcom and kotarake and removed request for a team May 27, 2026 05:36
@qlijarvis

Copy link
Copy Markdown

PR #1247 — validate-patch

PR: #1247

Verdict Issues Detailed Report
10 Full report

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in either commit message
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Not upstream — no evidence these patches were posted to any mailing list
  4. PR present in qcom-next: Not checked — cannot verify without proper commit attribution
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1247 (ucsi wakelock + sysfs control)
Upstream commit: N/A
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream No upstream link to compare against
Body preserves rationale Commit messages are empty — no description, no rationale
Fixes tag present/correct No Fixes tag present
Authorship preserved N/A No upstream source to verify against
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
drivers/usb/typec/ucsi/ucsi_glink.c ⚠️ Changes appear reasonable but lack upstream attribution

Issues

Commit 1: "ucsi wakelock"

  • ❌ No lore.kernel.org link in commit message
  • ❌ No vendor prefix (UPSTREAM:/FROMLIST:/QCLINUX:/PENDING:/WORKAROUND:)
  • ❌ Empty commit body — no description of why wakelock is needed
  • ❌ No Signed-off-by chain beyond author
  • ⚠️ Adds pm_wakeup_event() with 200ms timeout but comment says "10s gives sufficient margin" — inconsistency between comment and code

Commit 2: "sysfs control"

  • ❌ No lore.kernel.org link in commit message
  • ❌ No vendor prefix
  • ❌ Empty commit body — no description of purpose or use case
  • ❌ No Signed-off-by chain beyond author
  • ⚠️ Adds sysfs ABI without Documentation/ABI/ entry (required for new sysfs attributes)

Verdict

Do not merge. Both commits lack proper attribution, commit message bodies, and upstream links. The changes appear to be original work that should either:

  1. Be posted upstream first (use FROMLIST: prefix + lore link), or
  2. Be marked as vendor-only (use QCLINUX: prefix if not suitable for upstream)

Additionally, commit messages must include a description of the problem being solved and the rationale for the solution.

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in either commit message
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Not upstream — no evidence these patches were posted to any mailing list
  4. PR present in qcom-next: Not checked — cannot verify without proper commit attribution

@qlijarvis

Copy link
Copy Markdown

PR #1247 — checker-log-analyzer

PR: #1247
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26492992919

Checker Result Summary
Checker Result Summary
checkpatch 2 commits with missing commit descriptions
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance 2 commits missing required prefix
tag-check 2 commits missing subject prefix (mandatory for tech/pmic/misc branch)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1247 - ucsi wakelock and sysfs control
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26492992919
Target branch: tech/pmic/misc

Checker Result Summary
checkpatch 2 commits with missing commit descriptions
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance 2 commits missing required prefix
tag-check 2 commits missing subject prefix (mandatory for tech/pmic/misc branch)

❌ checkpatch

Root cause: Both commits lack commit message body descriptions.

Failure details:

Commit d9a47eb66a8e ("ucsi wakelock")
WARNING: Missing commit description - Add an appropriate one

Commit e392cf124d4b ("sysfs control")
WARNING: Missing commit description - Add an appropriate one

Fix: Add a proper commit message body explaining:

  • Commit 1 (ucsi wakelock): Why the wakeup lock is needed, what problem it solves (e.g., preventing system suspend during UCSI notification handling), and the rationale for the 200ms timeout.
  • Commit 2 (sysfs control): Why the sysfs attribute is needed, what use case it serves, and how it allows runtime configuration of the wakeup timeout.

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git df3ae9703774b70a7b7758b53498a25de9f87174..e392cf124d4bfe60775b0e3a54c0c20030a8dc12

❌ check-patch-compliance

Root cause: Both commits lack the required subject-line prefix for upstream traceability.

Failure details:

Checking commit: ucsi wakelock
Commit summary does not start with a required prefix

Checking commit: sysfs control
Commit summary does not start with a required prefix

Fix: Add the appropriate prefix to each commit subject:

Prefix When to use
FROMLIST: Patch posted to lore.kernel.org but not yet merged
FROMGIT: Patch taken from a maintainer git tree
UPSTREAM: Patch merged into Linus's mainline tree
BACKPORT: Upstream patch backported with modifications
QCLINUX: Vendor-only change (note: will still fail this checker)

If these patches are vendor-only and not posted upstream, use QCLINUX: prefix (though the checker will still fail — this is a known limitation). If they are posted or will be posted upstream, use FROMLIST: and add a Link: tag pointing to the lore.kernel.org URL.

Example fix:

git rebase -i df3ae9703774b70a7b7758b53498a25de9f87174
# Mark both commits as 'edit'
git commit --amend -m "QCLINUX: usb: typec: ucsi_glink: Add wakeup lock for notification handling"
git rebase --continue
git commit --amend -m "QCLINUX: usb: typec: ucsi_glink: Add sysfs control for wakeup timeout"
git rebase --continue

❌ tag-check

Root cause: Target branch tech/pmic/misc requires all commits to have a subject-line prefix tag, but both commits are missing it.

Failure details:

Commit d9a47eb66a8e ("ucsi wakelock"): subject line does not start with a required prefix.
Commit e392cf124d4b ("sysfs control"): subject line does not start with a required prefix.

All branches except qcom-next and qcom-next-staging require one of:
FROMLIST: / FROMGIT: / UPSTREAM: / BACKPORT: / QCLINUX: / PENDING: / WORKAROUND:

Fix: Same as check-patch-compliance — add the appropriate prefix to both commit subjects. Choose based on the patch origin:

  • Vendor-only → QCLINUX:
  • Posted to lore → FROMLIST:
  • In maintainer tree → FROMGIT:
  • Merged upstream → UPSTREAM:

⚠️ Additional Issue: Undocumented sysfs attribute

Root cause: Commit 2 adds a new sysfs attribute wakeup_timeout_ms but does not document it in Documentation/ABI/.

Details:
The patch adds DEVICE_ATTR_RW(wakeup_timeout_ms) which creates /sys/devices/.../wakeup_timeout_ms. All new sysfs attributes must be documented per kernel ABI policy.

Fix: Add a documentation file:

# Create Documentation/ABI/testing/sysfs-driver-ucsi-glink
cat > Documentation/ABI/testing/sysfs-driver-ucsi-glink <<EOF
What:		/sys/bus/platform/drivers/pmic_glink_ucsi/*/wakeup_timeout_ms
Date:		May 2026
KernelVersion:	6.15
Contact:	Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Description:
		Wakeup timeout in milliseconds for UCSI notification handling.
		When a UCSI notification is received, the driver holds a wakeup
		lock for this duration to prevent system suspend while the
		notification chain completes. Default is 200ms.
EOF

Include this file in commit 2 or as a separate commit in the series.


Verdict

3 blockers must be fixed before merge:

  1. Add commit message bodies to both commits explaining the changes.
  2. Add subject-line prefix (QCLINUX: or FROMLIST:) to both commits.
  3. Document the new sysfs attribute in Documentation/ABI/testing/.

Once fixed, re-run the checkers to verify all issues are resolved.

@jprakash-qc jprakash-qc left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

DNM, this is for testing first

Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
@qcomlnxci qcomlnxci requested a review from a team June 3, 2026 11:50
@qlijarvis

Copy link
Copy Markdown

PR #1247 — validate-patch

PR: #1247

Verdict Issues Detailed Report
11 Full report

Final Summary

  1. Lore link present: No — no Link tag or lore reference in commit message
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — no evidence of upstream posting; likely vendor-only or work-in-progress
  4. PR present in qcom-next: Not checked — patch quality issues prevent merge consideration

Recommendation: Author must:

  • Write a proper commit message explaining the suspend/resume bug, root cause, and solution
  • Fix the 200ms vs 10s timeout discrepancy (code or comment is wrong)
  • Remove commented-out code or explain why it's preserved
  • Add proper subsystem prefix to subject
  • Clarify upstream status (post upstream first, or mark as QCLINUX: if vendor-only)
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1247 - ucsi wakelock
Upstream commit: N/A
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream No upstream reference; subject is non-descriptive ("ucsi wakelock")
Body preserves rationale No commit body; missing problem statement, solution, and rationale
Fixes tag present/correct No Fixes tag; unclear what bug this addresses
Authorship preserved N/A Cannot verify without upstream reference
Backport note (if applicable) No Link tag or upstream reference

Diff

File Status Notes
drivers/usb/typec/ucsi/ucsi_glink.c Contains commented-out code; timeout constant mismatch with comment

Issues

Critical:

  • No commit message body: The commit has only a 3-word subject with zero explanation of the problem being solved, why wakelock is needed, or what symptoms this fixes
  • Commented-out code: Line 355 contains //pm_wakeup_event(ucsi->dev, UCSI_GLINK_WAKEUP_TIMEOUT_MS); which should either be removed or the rationale for keeping it explained
  • Timeout constant mismatch: UCSI_GLINK_WAKEUP_TIMEOUT_MS is defined as 200ms, but the comment above it says "10s gives sufficient margin" — this is a 50x discrepancy
  • No upstream reference: No Link tag, no lore.kernel.org URL, no indication whether this is posted upstream, vendor-only, or a backport
  • Missing subsystem prefix: Subject should follow kernel convention: "usb: typec: ucsi_glink: "

Code quality:

  • The comment block (lines 17-24) describes a 10-second timeout rationale but the actual constant is 200ms
  • Using pm_wakeup_hard_event() without timeout is unusual; the commented line suggests pm_wakeup_event() with timeout was considered but abandoned without explanation

Commit message requirements (missing):

  • Problem statement: What suspend/resume issue does this fix?
  • Solution rationale: Why is a wakelock needed here?
  • Testing: How was this verified?
  • Impact: What devices/scenarios does this affect?

Verdict

Reject — This patch cannot be merged without a complete rewrite of the commit message, resolution of the timeout constant discrepancy, removal or explanation of commented code, and clarification of upstream status.

Final Summary

  1. Lore link present: No — no Link tag or lore reference in commit message
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — no evidence of upstream posting; likely vendor-only or work-in-progress
  4. PR present in qcom-next: Not checked — patch quality issues prevent merge consideration

Recommendation: Author must:

  • Write a proper commit message explaining the suspend/resume bug, root cause, and solution
  • Fix the 200ms vs 10s timeout discrepancy (code or comment is wrong)
  • Remove commented-out code or explain why it's preserved
  • Add proper subsystem prefix to subject
  • Clarify upstream status (post upstream first, or mark as QCLINUX: if vendor-only)

@qlijarvis

Copy link
Copy Markdown

PR #1247 — checker-log-analyzer

PR: #1247
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26882854509

Checker Result Summary
Checker Result Summary
checkpatch Missing commit description warning
dt-binding-check ⏭️ Skipped - no DT binding changes
dtb-check ⏭️ Skipped - no devicetree changes
sparse-check Passed
check-uapi-headers Passed - no UAPI changes
check-patch-compliance Missing required subject prefix
tag-check N/A Not applicable for tech/pmic/misc branch
qcom-next-check N/A Not applicable for tech/pmic/misc branch

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1247 - ucsi wakelock
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26882854509

Checker Result Summary
checkpatch Missing commit description warning
dt-binding-check ⏭️ Skipped - no DT binding changes
dtb-check ⏭️ Skipped - no devicetree changes
sparse-check Passed
check-uapi-headers Passed - no UAPI changes
check-patch-compliance Missing required subject prefix
tag-check N/A Not applicable for tech/pmic/misc branch
qcom-next-check N/A Not applicable for tech/pmic/misc branch

❌ checkpatch

Root cause: Commit subject "ucsi wakelock" lacks a proper commit description body.

Failure details:

WARNING: Missing commit description - Add an appropriate one

8269b21e091790f9a6240617a0cc3b5a8a4527d6 total: 0 errors, 1 warnings, 0 checks, 38 lines checked

Commit 8269b21e0917 ("ucsi wakelock") has style problems, please review.

Fix: Add a proper commit message body explaining:

  • What the patch does (adds wakelock support to ucsi_glink driver)
  • Why it's needed (prevent system suspend during USB Type-C notifications)
  • How it works (uses pm_wakeup_hard_event() to hold wakelock during async notification processing)

Also note: The patch contains a commented-out line (//pm_wakeup_event(...)) that should either be removed or explained.

Reproduce locally:

./scripts/checkpatch.pl --strict --summary-file --ignore FILE_PATH_CHANGES --git 8b79525f5fd0f6893b67ea128db176132eafbabc..56422f2e849dcc6da13ab260f61c92a225b4b687

❌ check-patch-compliance

Root cause: Commit subject "ucsi wakelock" does not start with a required subsystem prefix.

Failure details:

Checking commit: ucsi wakelock
Commit summary does not start with a required prefix

Fix: Add the appropriate subsystem prefix to the commit subject. Based on the file path drivers/usb/typec/ucsi/ucsi_glink.c, the subject should be:

usb: typec: ucsi: glink: Add wakelock support for notification handling

Or more concisely:

usb: typec: ucsi_glink: Add wakelock for async notifications

Reproduce locally:

# Check git log for similar commits in the same subsystem
git log --oneline drivers/usb/typec/ucsi/ucsi_glink.c

Verdict

2 blockers must be fixed before merge:

  1. Add proper commit message body - Explain what the patch does, why it's needed, and how it works. Remove or explain the commented-out code.

  2. Fix commit subject prefix - Use usb: typec: ucsi_glink: prefix to match kernel subsystem conventions.

Additional observations:

  • The patch defines UCSI_GLINK_WAKEUP_TIMEOUT_MS as 200ms but the comment mentions "10s gives sufficient margin" - this inconsistency should be clarified.
  • The commented-out line //pm_wakeup_event(ucsi->dev, UCSI_GLINK_WAKEUP_TIMEOUT_MS); suggests the author may have switched approaches - this should be removed or the rationale explained in the commit message.
  • Consider whether pm_wakeup_hard_event() (indefinite wakelock) is the right choice vs. pm_wakeup_event() with a timeout.

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.

2 participants