🧹 [code health improvement] mtdsplit: tplink: Remove unused boot_ofs and boot_len fields#97
Conversation
The `boot_ofs` and `boot_len` fields in `struct fw_v1` and `struct fw_v2` were marked as FIXME and completely unused in the codebase. This commit removes them to improve code clarity. To maintain strict ABI compatibility, binary layout, and overall sizes of these packed structures, equivalent byte padding was introduced in both structs. Signed-off-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: Removed unused
boot_ofsandboot_lenfields fromstruct fw_v1andstruct fw_v2inmtdsplit_tplink.c.💡 Why: These fields were marked as FIXME and never referenced in the codebase. Removing them cleans up dead code and improves readability.
✅ Verification: Replaced the removed 8 bytes with explicit padding (
pad1[8]infw_v2and increasingpadfrom 360 to 368 infw_v1) to guarantee the 508-byte total size and internal offsets of the__attribute__((packed))structures remain completely unchanged. Compiled a mock script and ran the full CI test suite successfully to confirm ABI safety.✨ Result: Cleaner firmware header structures without introducing any regressions or binary layout changes.
Signed-off-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
PR created automatically by Jules for task 16964385517997740705 started by @manupawickramasinghe