Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const as much as possible #18

Closed
atsju opened this issue Nov 10, 2020 · 4 comments
Closed

const as much as possible #18

atsju opened this issue Nov 10, 2020 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists enhancement New feature or request hal HAL-LL driver-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet

Comments

@atsju
Copy link

atsju commented Nov 10, 2020

uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)

Should be : uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, const uint32_t pBuffer[], uint32_t BufferLength)
This tells the user and the compiler that function will not modify the content of buffer. There are other occurrence in the HAL. Please check them all. This remark is also true for other HAL, not L4 specific.

Note this is not the same as #17.
Edit : it is indeed duplicate of #15

@RKOUSTM RKOUSTM self-assigned this Nov 12, 2020
@RKOUSTM RKOUSTM added hal HAL-LL driver-related issue or pull-request. duplicate This issue or pull request already exists labels Nov 12, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Nov 12, 2020

Hi @atsju,

Thank you for this detailed report. This issue has also been previously reported by other users (link).

This is one of the main points in the tasks queue of our development teams. We cannot share a date regarding its deployment and publication. We count on your patience and comprehension.

Thank you again for this report.

With regards,

@RKOUSTM RKOUSTM added the spotted before customer Spotted and fixed internally before being pointed out by users but not published yet label Nov 17, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Nov 19, 2020

Hi @atsju,

First, allow me to thank you for your contribution. The final decision of our technical committee is no plan to add a const inside the function. The reported point is already highlighted during the MISRA-C 2012 compliance rework (Rule-8.13). It has been decided, from the quality point of view, to derogate this rule as fixing it will break the compatibility with almost all HAL APIs and then update all examples and applications within the Cube deliverable and also on user application side.

Please, allow me to close this issue. Thank you for your comprehension.

With regards,

@RKOUSTM RKOUSTM closed this as completed Nov 19, 2020
@atsju
Copy link
Author

atsju commented Nov 19, 2020

@RKOUSTM I answered there : STMicroelectronics/STM32CubeF4#10

ST is quite new to open-sourcing the code on Github and you are doing well.
I just wanted to give you a kind advice (take it or not): note that other projets close issues as soon as they are spotted to be duplicate. This permits to centralise discutions to original ticket and to see the importance of the issue. It also reduces your maintenance task when a decision is made about a ticket it is only one and not all your duplicates.

@ALABSTM ALABSTM added the enhancement New feature or request label Aug 7, 2023
@ALABSTM
Copy link
Contributor

ALABSTM commented Aug 7, 2023

Duplicate of #15

@ALABSTM ALABSTM marked this as a duplicate of #17 Aug 7, 2023
@ALABSTM ALABSTM marked this as a duplicate of #15 Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request hal HAL-LL driver-related issue or pull-request. spotted before customer Spotted and fixed internally before being pointed out by users but not published yet
Projects
None yet
Development

No branches or pull requests

3 participants