diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-28 11:29:15 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-28 12:26:36 +0000 |
| commit | 7ae915d6b6e1a4283131f8fc61818c88f3ab160e (patch) | |
| tree | 15528c4cb2ed14f9f8f3479ae30b091f290bebd1 /pkg/aflow/flow/patching/patching.go | |
| parent | e6de017c0d386010e36d85a04424fddb9f52f067 (diff) | |
pkg/aflow/flow/patching: provide some WARNING-specific instructions
Diffstat (limited to 'pkg/aflow/flow/patching/patching.go')
| -rw-r--r-- | pkg/aflow/flow/patching/patching.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/aflow/flow/patching/patching.go b/pkg/aflow/flow/patching/patching.go index f3ee89f28..cacbba9b5 100644 --- a/pkg/aflow/flow/patching/patching.go +++ b/pkg/aflow/flow/patching/patching.go @@ -103,8 +103,6 @@ You are an experienced Linux kernel developer tasked with debugging a kernel cra You need to provide a detailed explanation of the root cause for another developer to be able to write a fix for the bug based on your explanation. Your final reply must contain only the explanation. - -Call some codesearch tools first. ` const debuggingPrompt = ` @@ -118,6 +116,12 @@ You are an experienced Linux kernel developer tasked with creating a fix for a k Use the codeedit tool to do code edits. Note: you will not see your changes when looking at the code using codesearch tools. Your final reply should contain explanation of what you did in the patch and why. + +{{if titleIsWarning .BugTitle}} +If you will end up removing the WARN_ON macro because the condition can legitimately happen, +add a pr_err call that logs that the unlikely condition has happened. The pr_err message +must not include "WARNING" string. +{{end}} ` const patchPrompt = ` @@ -183,4 +187,10 @@ The diff of the bug fix is: Additional description of the patch: {{.PatchExplanation}} + +{{if titleIsWarning .BugTitle}} +If the patch removes the WARN_ON macro, refer to the fact that WARN_ON +must not be used for conditions that can legitimately happen, and that pr_err +should be used instead if necessary. +{{end}} ` |
