Skip to content

🧹 [code health improvement] mtdsplit: tplink: Remove unused boot_ofs and boot_len fields#97

Merged
ManupaKDU merged 1 commit into
mainfrom
health/mtdsplit-tplink-boot-ofs-16964385517997740705
May 22, 2026
Merged

🧹 [code health improvement] mtdsplit: tplink: Remove unused boot_ofs and boot_len fields#97
ManupaKDU merged 1 commit into
mainfrom
health/mtdsplit-tplink-boot-ofs-16964385517997740705

Conversation

@ManupaKDU
Copy link
Copy Markdown

🎯 What: Removed unused boot_ofs and boot_len fields from struct fw_v1 and struct fw_v2 in mtdsplit_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] in fw_v2 and increasing pad from 360 to 368 in fw_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

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>
@google-labs-jules
Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@ManupaKDU ManupaKDU merged commit 79ea825 into main May 22, 2026
197 checks passed
@ManupaKDU ManupaKDU deleted the health/mtdsplit-tplink-boot-ofs-16964385517997740705 branch May 22, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant