Repository navigation
fix: correct m_Version to m_Capabilities in PCI - #848
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes a copy-paste error in PCI device information handling so the Capabilities field consistently reads from m_Capabilities instead of m_Version, while preserving Version behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 修复已正确应用,无需额外修改。 // setInfoFromTomlOneByOne() 中: // ret = setTomlAttribute(mapInfo, "Capabilities", m_Capabilities); // loadOtherDeviceInfo() 中: // addOtherDeviceInfo("Capabilities", m_Capabilities);本报告由 AI 代码审查工具自动生成 |
1. Root cause: DeviceOtherPCI setTomlAttribute and loadOtherDeviceInfo used m_Version instead of m_Capabilities due to copy-paste error 2. Fix: replace m_Version with m_Capabilities at lines 39 and 102 3. Impact: PCI device Capabilities now correctly reads and displays the field instead of Version Log: Fix PCI device Capabilities showing Version value Influence: 1. Verify PCI device Capabilities field displays correct value 2. Verify PCI device Version field is unaffected 3. Test with PCI devices having both Version and Capabilities fix: 修复PCI设备Capabilities误用m_Version的问题 1. 根因:DeviceOtherPCI的setTomlAttribute和loadOtherDeviceInfo 因copy-paste错误使用了m_Version而非m_Capabilities 2. 方案:将第39行和第102行的m_Version改为m_Capabilities 3. 影响:PCI设备Capabilities字段现在正确读取和显示,Version字段不受影响 Log: 修复PCI设备Capabilities显示Version值的问题 Influence: 1. 验证PCI设备Capabilities字段显示正确值 2. 验证PCI设备Version字段不受影响 3. 测试同时具有Version和Capabilities的PCI设备
8e03c3b to
43040d8
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Follow-up to PR #901. Upstream a684f10 (PR #848) fixed DEF-DM-OTHERPCI-CAPABILITIES-VERSION: "Capabilities" now writes and displays m_Capabilities instead of m_Version. Align the 4 affected cases in ut_deviceotherpci.cpp with the fixed behavior; 84/84 pass. Log: 缺陷修复后对齐 DeviceOtherPCI 测试断言 Influence: 仅测试代码, 不影响业务逻辑
fix: correct m_Version to m_Capabilities in PCI
loadOtherDeviceInfo used m_Version instead of m_Capabilities
due to copy-paste error
displays the field instead of Version
Log: Fix PCI device Capabilities showing Version value
Influence:
fix: 修复PCI设备Capabilities误用m_Version的问题
因copy-paste错误使用了m_Version而非m_Capabilities
Log: 修复PCI设备Capabilities显示Version值的问题
Influence:
Summary by Sourcery
Fix PCI device information mapping so Capabilities is reported independently from Version.
Bug Fixes:
Chores: