| #
34000665 |
| 12-Jun-2025 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "fix(libc): add missing curly braces" into integration
|
| #
60e5aee1 |
| 25-Apr-2024 |
Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(libc): add missing curly braces
This corrects the MISRA violation C2012-15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement. Enclosed statement body w
fix(libc): add missing curly braces
This corrects the MISRA violation C2012-15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement. Enclosed statement body within the curly braces.
In spite of generic guidance for 3rd party libraries (https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#misra-compliance) libc contains some MISRA-C fixes done by commit d5ccb754af86 ("libc: Fix some MISRA defects") in 2021. Also from history it is not clear where libc is coming from that's why there is no way to fix violation in base library.
Change-Id: I9007cfc8019e885cd294dbbd68e6b3f65a6071ba Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
1282be58 |
| 06-May-2025 |
Yann Gautier <yann.gautier@st.com> |
Merge "fix(libc): add const qualifier" into integration
|
| #
58587e53 |
| 25-Apr-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "fix(libc): typecast expressions to match data type" into integration
|
| #
dd0d4331 |
| 23-Apr-2024 |
Nithin G <nithing@amd.com> |
fix(libc): typecast expressions to match data type
This corrects the MISRA violation C2012-10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the s
fix(libc): typecast expressions to match data type
This corrects the MISRA violation C2012-10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category. The condition is explicitly checked against 0U, appending 'U' and typecasting for unsigned comparison.
In spite of generic guidance for 3rd party libraries (https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#misra-compliance) libc contains some MISRA-C fixes done by commit d5ccb754af86 ("libc: Fix some MISRA defects") in 2021. Also from history it is not clear where libc is coming from that's why there is no way to fix violation in base library.
Change-Id: I44ff44bc636a2544eb92f48f2caed9b7ac9e0935 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
42d2ee13 |
| 17-Apr-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "fix(libc): typecast operands to match data type" into integration
|
| #
26cc2854 |
| 24-Apr-2024 |
Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(libc): typecast operands to match data type
This corrects the MISRA violation C2012-10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a diff
fix(libc): typecast operands to match data type
This corrects the MISRA violation C2012-10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category. The condition is explicitly checked against 0U, appending 'U' and typecasting for unsigned comparison.
In spite of generic guidance for 3rd party libraries (https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#misra-compliance) libc contains some MISRA-C fixes done by commit d5ccb754af86 ("libc: Fix some MISRA defects") in 2021. Also from history it is not clear where libc is coming from that's why there is no way to fix violation in base library.
Change-Id: Ibad03a758001b3a7779b488ee5e19c9ceee51134 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
b71d0827 |
| 19-Apr-2024 |
Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(libc): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer.
In spite of generi
fix(libc): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer.
In spite of generic guidance for 3rd party libraries (https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#misra-compliance) libc contains some MISRA-C fixes done by commit d5ccb754af86 ("libc: Fix some MISRA defects") in 2021. Also from history it is not clear where libc is coming from that's why there is no way to fix violation in base library.
Change-Id: I9d6ec6df08358adf0832a53485d080d8b93b0e29 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
7263183b |
| 30-Nov-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "feat(libc): add printf support for space padding" into integration
|
| #
0926d2df |
| 08-Nov-2023 |
Juan Pablo Conde <juanpablo.conde@arm.com> |
feat(libc): add printf support for space padding
This patch makes printf capable of padding strings with spaces to their left, allowing right-aligning numeric values and strings. It uses the same wi
feat(libc): add printf support for space padding
This patch makes printf capable of padding strings with spaces to their left, allowing right-aligning numeric values and strings. It uses the same width field for the format specifier as in the original libc function : %<width><type> (e.g.: %10d pads an integer value with spaces to the left to complete 10 characters).
Change-Id: Ib7b5519dae17742181352ce58e507a05ba5250d4 Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
show more ...
|
| #
94e27bc1 |
| 14-Jul-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(libc): add %X to printf/snprintf" into integration
|
| #
483edc20 |
| 13-Jul-2023 |
Matt Schulte <matsch@google.com> |
feat(libc): add %X to printf/snprintf
Enables printing captial hex chars as well as lowercase
Change-Id: I4dc48c3db97b908f0bb344d7765807967de8cf02 Signed-off-by: Matt Schulte <matsch@google.com>
|
| #
3011e1af |
| 11-May-2023 |
Joanna Farley <joanna.farley@arm.com> |
Merge changes from topic "ms/external_deps" into integration
* changes: feat(libc): add %c to printf/snprintf feat(compiler-rt): update source files chore(libfdt): update to v1.7.0 source files
|
| #
44d9706e |
| 09-May-2023 |
Maksims Svecovs <maksims.svecovs@arm.com> |
feat(libc): add %c to printf/snprintf
Adds %c support for printf and snprintf to print one character. Required by most recent MbedTLS 3.4.0.
Change-Id: I4d9b2725127a929d58946353324f99ff22b3b28b Sig
feat(libc): add %c to printf/snprintf
Adds %c support for printf and snprintf to print one character. Required by most recent MbedTLS 3.4.0.
Change-Id: I4d9b2725127a929d58946353324f99ff22b3b28b Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
show more ...
|
| #
aa9d3150 |
| 30-Sep-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge "chore(libc): clean up includes in lib/libc/printf.c" into integration
|
| #
c5862af7 |
| 28-Sep-2022 |
Jorge Troncoso <jatron@google.com> |
chore(libc): clean up includes in lib/libc/printf.c
stddef.h is needed for the definition of size_t stdio.h is needed for the declaration of putchar
Signed-off-by: Jorge Troncoso <jatron@google.com
chore(libc): clean up includes in lib/libc/printf.c
stddef.h is needed for the definition of size_t stdio.h is needed for the declaration of putchar
Signed-off-by: Jorge Troncoso <jatron@google.com> Change-Id: I72dac843dbbfc440cff0f9e9d13669b78a812abc
show more ...
|
| #
2aaed860 |
| 23-Sep-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge "refactor(libc): clean up dependencies in libc" into integration
|
| #
885e2683 |
| 12-Sep-2022 |
Claus Pedersen <claustbp@google.com> |
refactor(libc): clean up dependencies in libc
- Removing platform dependencies from libc modules. - Replacing panicking with actual error handling. - Debug macros are included indirectly from assert
refactor(libc): clean up dependencies in libc
- Removing platform dependencies from libc modules. - Replacing panicking with actual error handling. - Debug macros are included indirectly from assert.h. Removing "platform_def.h" from assert.h and adding "common/debug.h" where the macros are used. - Removing hack for fixing PLAT_LOG_LEVEL_ASSERT to 40. Instead removing assert with expression, as this does not provide additional information.
Signed-off-by: Claus Pedersen <claustbp@google.com> Change-Id: Icc201ea7b63c1277e423c1cfd13fd6816c2bc568
show more ...
|
| #
0b2b83ea |
| 21-Jan-2021 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge changes I2add6b4b,I9b296372,I7af2f1d1 into integration
* changes: libc/snprintf: use macro to reduce duplicated code libc/snprintf: add support to print "%" character libc/printf: add su
Merge changes I2add6b4b,I9b296372,I7af2f1d1 into integration
* changes: libc/snprintf: use macro to reduce duplicated code libc/snprintf: add support to print "%" character libc/printf: add support to print "%" character
show more ...
|
| #
128c5f02 |
| 27-Oct-2020 |
Heyi Guo <guoheyi@linux.alibaba.com> |
libc/printf: add support to print "%" character
Enable printf() in TF-A to print "%" character as C standard, which may be used in platform porting to print percentage information.
Signed-off-by: H
libc/printf: add support to print "%" character
Enable printf() in TF-A to print "%" character as C standard, which may be used in platform porting to print percentage information.
Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com> Change-Id: I7af2f1d153548e426f423fce15dc48b0da56c622
show more ...
|
| #
9a207532 |
| 04-Jan-2019 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1726 from antonio-nino-diaz-arm/an/includes
Sanitise includes across codebase
|
| #
09d40e0e |
| 14-Dec-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - inclu
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them).
For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems.
Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| #
3ed87a49 |
| 03-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
Merge pull request #1584 from danielboulby-arm/db/Switches
Ensure the flow through switch statements is clear
|
| #
a08a2014 |
| 22-Jun-2018 |
Daniel Boulby <daniel.boulby@arm.com> |
Ensure the flow through switch statements is clear
Ensure case clauses: * Terminate with an unconditional break, return or goto statement. * Use conditional break, return or goto statements as l
Ensure the flow through switch statements is clear
Ensure case clauses: * Terminate with an unconditional break, return or goto statement. * Use conditional break, return or goto statements as long as the end of the case clause is unreachable; such case clauses must terminate with assert(0) /* Unreachable */ or an unconditional __dead2 function call * Only fallthough when doing otherwise would result in less readable/maintainable code; such case clauses must terminate with a /* Fallthrough */ comment to make it clear this is the case and indicate that a fallthrough is intended.
This reduces the chance of bugs appearing due to unintended flow through a switch statement
Change-Id: I70fc2d1f4fd679042397dec12fd1982976646168 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
show more ...
|
| #
f60a5004 |
| 30-Aug-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1546 from antonio-nino-diaz-arm/an/log-misra
Fix some MISRA defect in log helpers
|