summaryrefslogtreecommitdiff
path: root/doc/develop/codingstyle.rst
AgeCommit message (Collapse)Author
2025-09-16doc: Update U-Boot coding style guide with clang-format usageJavier Tia
The U-Boot coding style guide has been updated to include information about using the `.clang-format` configuration file for automatic code formatting. This ensures consistent formatting across the entire codebase and aligns with Linux kernel coding standards. The goal with introducing a predefined coding style is consistency rather than personal preference. The .clang-format file is copied directly from the Linux kernel without any modifications, ensuring complete compatibility with kernel coding standards. Include comprehensive best practices for using clang-format, specifically guidance on formatting only changed blocks versus entire files, creating separate formatting-only commits for better code review, and leveraging git clang-format for targeted formatting. Add examples of editor integrations. This enhancement will help maintainers and contributors to easily adhere to U-Boot coding standards. Signed-off-by: Javier Tia <[email protected]>
2025-04-11doc/develop/codingstyle.rst: Expand to include CONFIG_IS_ENABLED and PHASE_Tom Rini
Expand the conditional compilation section to explain when to use CONFIG_IS_ENABLED rather than IS_ENABLED and provide an example. Next, note what the PHASE_ macro is supposed to be used for as well. Signed-off-by: Tom Rini <[email protected]>
2025-04-11doc/develop/codingstyle.rst: Add a section on conditional compilationTom Rini
In order to make a start on explaining how and when to use certain macros, we need to document their usage somewhere. As a first step, take section 21 of the v6.13 Linux Kernel coding-style document on conditional compilation, verbatim, and add it to our documentation. Further rewording to be clearer about U-Boot will be done next. Signed-off-by: Tom Rini <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07common.h: Remove this file and all referencesTom Rini
With all files that had included this file directly having been updated, we can now remove this file. Signed-off-by: Tom Rini <[email protected]>
2024-02-12doc/develop/codingstyle.rst: Clarify include sectionTom Rini
Rework the section about includes slightly. We should not be using common.h anywhere, so remove that from examples and ask people to send patches removing it when found. Doing this also means we need to reword other parts of this section. Be clearer about using alphabetical ordering. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Igor Opaniuk <[email protected]>
2023-07-28doc: fix typo device_compat/.hHeinrich Schuchardt
%s/device_compat\/.h/device_compat.h/ Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-04-21doc: codingstyle: Python coding styleHeinrich Schuchardt
Indicate that we follow PEP8 and PEP257. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-08-13doc: Drop a reference to TravisSimon Glass
This was widely used by U-Boot for a long time, but is not used anymore, with Gitlab and Azure taking over. Drop the text. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-07-18doc: typo 'formatted' in codingstyle.rstHeinrich Schuchardt
%s/formatted/format/ Fixes: 4211fb2ef6dd ("doc: Migrate CodingStyle wiki page to Sphinx") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-07-14doc: codingstyle: Remove comment about '//' style commentsTom Rini
For some time now we've allowed for '//' style comments, which mirrors the Linux kernel. So drop this point here. Cc: Heinrich Schuchardt <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2022-07-14doc: Migrate CodingStyle wiki page to SphinxTom Rini
Move the current CodingStyle wiki page to doc/develop/codingstyle.rst. The changes here are for formatting or slight rewording so that it reads well when linking to other Sphinx documents. Cc: Heinrich Schuchardt <[email protected]> Signed-off-by: Tom Rini <[email protected]>