Skip to content

devfreq: add compatibility wrapper for moved governor.h - #1087

Closed
Salendarsingh Gaud (sgaud-quic) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
sgaud-quic:fix/devfreq-governor-compat-wrapper
Closed

Salendarsingh Gaud (sgaud-quic) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
sgaud-quic:fix/devfreq-governor-compat-wrapper

Conversation

@sgaud-quic

Copy link
Copy Markdown
Contributor

devfreq: add compatibility wrapper for moved governor.h

Problem

All Yocto nightly builds against qcom-6.18.y tip are failing with:

governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory
governor_gpubw_mon.c:14:10: fatal error: governor.h: No such file or directory

Root Cause

Commit 6df46fd1d1b5 (FROMGIT: PM / devfreq: Move governor.h to a public header location) was backported into qcom-6.18.y, relocating
drivers/devfreq/governor.hinclude/linux/devfreq-governor.h.

Out-of-tree modules such as kgsl-dlkm build with:

ccflags-y += -I$(KERNEL_SRC)/drivers/devfreq

and include the header as:

#include "governor.h"

kgsl-dlkm v1.0.14 guards the new path behind KERNEL_VERSION(6, 19, 0)
(matching the upstream mainline target), so on qcom-6.18.y the old path
is taken — but the file is gone.

last-good:  11cf26cb7862   (governor.h still at drivers/devfreq/)
breaking:   6df46fd1d1b5   ← governor.h moved (backport into 6.18.y)
tip:        acbf23d72fa0

Fix

Add a compatibility wrapper at drivers/devfreq/governor.h that
transparently forwards to <linux/devfreq-governor.h>. This is the
standard Linux kernel pattern for header relocations (used widely across
subsystems) and avoids breaking existing out-of-tree consumers while they
migrate.

New drivers must use #include <linux/devfreq-governor.h> directly.
This shim can be dropped once all known consumers (kgsl-dlkm etc.) are
updated to use the new path.

Related

Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location")

Commit 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public
header location") was backported into qcom-6.18.y, relocating
drivers/devfreq/governor.h to include/linux/devfreq-governor.h.

Out-of-tree kernel modules (e.g. kgsl-dlkm) that build against
qcom-6.18.y add drivers/devfreq/ to their include search path via

  ccflags-y += -I$(KERNEL_SRC)/drivers/devfreq

and use:

  #include "governor.h"

After the move that file is gone, causing a build failure for every
Yocto target that builds kgsl-dlkm:

  governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory
  governor_gpubw_mon.c:14:10: fatal error: governor.h: No such file or directory

Add a compatibility wrapper at the old location that transparently
redirects to the new public header. This is the standard Linux kernel
pattern for header relocations and avoids breaking existing out-of-tree
consumers while they migrate.

New in-tree and out-of-tree drivers must use
  #include <linux/devfreq-governor.h>
directly. This shim will be removed once all known consumers are updated.

Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location")
Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qlijarvis

Copy link
Copy Markdown

PR #1087 — validate-patch

PR: #1087

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: No — vendor-specific compatibility fix for out-of-tree modules; no lore link expected or required
  2. Lore link matches PR commits: N/A — no upstream source to compare against
  3. Upstream patch status: N/A — vendor-only change addressing out-of-tree module build breakage after header relocation
  4. PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1087 - devfreq: add compatibility wrapper for moved governor.h
Upstream commit: N/A (vendor-specific compatibility fix)
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream N/A No upstream source; vendor-specific fix
Body preserves rationale Clear problem statement and solution
Fixes tag present/correct Points to commit 6df46fd that caused the issue
Authorship preserved Proper author and Signed-off-by present
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
drivers/devfreq/governor.h Clean compatibility wrapper; standard kernel pattern for header relocations

Issues

  1. Missing vendor prefix: Subject should be QCLINUX: devfreq: add compatibility wrapper for moved governor.h since this is a vendor-specific fix for out-of-tree modules (kgsl-dlkm), not an upstream change.

  2. Integration presence concern: Commit is only partially present in topics and missing from qcom-next. For a fix addressing build breakage in Yocto targets, full integration into qcom-next is expected.

Verdict

The patch is technically sound and solves a real build breakage problem using the standard Linux kernel pattern for header relocations. However, it needs a QCLINUX: prefix to correctly identify it as a vendor-specific compatibility fix. The partial integration status should be resolved before merge.

Final Summary

  1. Lore link present: No — vendor-specific compatibility fix for out-of-tree modules; no lore link expected or required
  2. Lore link matches PR commits: N/A — no upstream source to compare against
  3. Upstream patch status: N/A — vendor-only change addressing out-of-tree module build breakage after header relocation
  4. PR present in qcom-next/topics: Partial — 1/1 commit has only partial integration evidence (missing from qcom-next, partial match in topics)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: d49c33864d06e9672dce57738be8851384578fcf
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] devfreq: add compatibility wrapper for moved governor.h missing - no subject, patch-id, or full tree-content match found partial - subject or partial tree evidence found, but full change was not verified partial

Final Status

overall_status: PARTIAL
present_commits: 0/1
partial_commits: 1/1
missing_commits: 0/1
topics_checked_for_commits: 1/1
final_summary: PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence

@qlijarvis

Copy link
Copy Markdown

PR #1087 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 2 warnings: long commit line, filename in file comment
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Missing required prefix
tag-check Subject missing required prefix (mandatory for qcom-6.18.y)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1087 - devfreq: add compatibility wrapper for moved governor.h
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/34589731160

Checker Result Summary
checkpatch 2 warnings: long commit line, filename in file comment
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Missing required prefix
tag-check Subject missing required prefix (mandatory for qcom-6.18.y)

❌ checkpatch

Root cause: Two style warnings in commit message and file header comment.

Failure details:

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#22: 
  governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory

WARNING: It's generally not useful to have the filename in the file
#51: FILE: drivers/devfreq/governor.h:5:
+ * drivers/devfreq/governor.h was moved to include/linux/devfreq-governor.h

Fix:

  1. Long line warning: The error message line in the commit body exceeds 75 chars. Wrap it:

    Before:
      governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory
    
    After:
      governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such
      file or directory
    
  2. Filename in file comment: Remove the explicit path from the file header comment at drivers/devfreq/governor.h:5:

    - * drivers/devfreq/governor.h was moved to include/linux/devfreq-governor.h
    + * This file was moved to include/linux/devfreq-governor.h

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 84dccf2afd18d4caef430adf35de328bd6294b0c..6d32dc217992f0bc0b7a535933199330a96719fd

❌ check-patch-compliance

Root cause: Commit subject does not start with a required prefix.

Failure details:

Checking commit: devfreq: add compatibility wrapper for moved governor.h
Commit summary does not start with a required prefix

Fix:

The commit is a vendor-specific compatibility shim for out-of-tree modules (kgsl-dlkm). Since it's not posted upstream and is specific to the qcom-6.18.y tree, use the QCLINUX: prefix:

git rebase -i 84dccf2afd18d4caef430adf35de328bd6294b0c
# mark commit as 'edit'
git commit --amend -m "QCLINUX: devfreq: add compatibility wrapper for moved governor.h"
# keep the rest of the commit body unchanged
git rebase --continue

Note: The check-patch-compliance checker only accepts FROMLIST:, FROMGIT:, UPSTREAM:, and BACKPORT: prefixes. Using QCLINUX: will still cause this checker to fail, but that is a known limitation for vendor-only commits. The important fix is for tag-check (see below).

Reproduce locally:

# This checker requires b4 and will attempt to fetch from lore
bash ../kernel-checkers/check-patch-compliance.sh --kernel-src . \
  --base 84dccf2afd18d4caef430adf35de328bd6294b0c \
  --head 6d32dc217992f0bc0b7a535933199330a96719fd

❌ tag-check

Root cause: Commit subject missing required prefix tag (mandatory for all branches except qcom-next/qcom-next-staging).

Failure details:

Target branch: qcom-6.18.ytag-check is mandatory

Commit subject: devfreq: add compatibility wrapper for moved governor.h

This subject does not start with any of the required prefixes:

  • FROMLIST: / FROMGIT: / UPSTREAM: / BACKPORT: / QCLINUX: / PENDING: / WORKAROUND:

Fix:

Since this is a vendor-specific compatibility shim for out-of-tree modules (not posted upstream), add the QCLINUX: prefix:

git rebase -i 84dccf2afd18d4caef430adf35de328bd6294b0c
# mark commit as 'edit'
git commit --amend -m "QCLINUX: devfreq: add compatibility wrapper for moved governor.h"
# keep the rest of the commit body unchanged
git rebase --continue

Reproduce locally:

# Check that the subject starts with a valid prefix
git log 84dccf2afd18d4caef430adf35de328bd6294b0c..HEAD --format="%H %s" | \
  grep -vE '^[a-f0-9]+ (FROMLIST|FROMGIT|UPSTREAM|BACKPORT|QCLINUX|PENDING|WORKAROUND):'
# If any lines are printed, those commits are missing a prefix

Verdict

3 blockers must be fixed before merge:

  1. checkpatch: Wrap long commit body line and remove filename from file header comment
  2. check-patch-compliance: Add QCLINUX: prefix (will still fail checker but satisfies tag-check)
  3. tag-check: Add QCLINUX: prefix to commit subject (mandatory for qcom-6.18.y branch)

All three issues can be resolved in a single git commit --amend operation by:

  • Adding QCLINUX: prefix to the subject
  • Wrapping the long error message line in the commit body
  • Removing the explicit path from the file header comment

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