Skip to contentSkip to conversation

ARM: MISRA C:2012 Rule 5.6

DISCUSSION Federico Serafini 3 participants 3 messages Dec 7, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 12 lines · Federico Serafini

Hello everyone,

Rule 5.6 states that a typedef name shall be a unique identifier. This is to avoid developer confusion.

For ARM, the violations left [1] are generated by two definitions of the type phys_addr_t within two different files.
I would like to ask if this is intentional or not:
if it is intentional and it is not causing any confusion between XEN developers, then I think violations involving phys_addr_t can be deviated.

Quoted 2 lines

[1]
https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/ARM64-2023/429/PROJECT.ecd;/by_service/MC3R1.R5.6.html

Adding XEN mailing list in CC.

Signature · 3 lines
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)
#2 lore raw
Quoted 13 lines · Federico Serafini
Quoted 12 lines · Federico Serafini

Hello everyone,

Rule 5.6 states that a typedef name shall be a unique identifier. This is to avoid developer confusion.

For ARM, the violations left [1] are generated by two definitions of the type phys_addr_t within two different files.
I would like to ask if this is intentional or not:
if it is intentional and it is not causing any confusion between XEN developers, then I think violations involving phys_addr_t can be deviated.

Quoted 4 lines
Quoted 2 lines

[1]
https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/ARM64-2023/429/PROJECT.ecd;/by_service/MC3R1.R5.6.html

Adding XEN mailing list in CC.

Thanks.

These are files ported from Linux, where I assume the typedef-s were added to limit the changes which would need making elsewhere. Still I think that's exactly what we (now) have xen/linux-compat.h for. IOW - just move the typedef-s there?

Jan

#3 lore raw
Quoted 17 lines · Jan Beulich
Quoted 16 lines · Federico Serafini
Quoted 14 lines · Federico Serafini

Hello everyone,

Rule 5.6 states that a typedef name shall be a unique identifier. This is to avoid developer confusion.

For ARM, the violations left [1] are generated by two definitions of the type phys_addr_t within two different files.
I would like to ask if this is intentional or not:
if it is intentional and it is not causing any confusion between XEN developers, then I think violations involving phys_addr_t can be deviated.

[1]
https://saas.eclairit.com:3787/fs/var/local/eclair/XEN.ecdf/ECLAIR_normal/staging/ARM64-2023/429/PROJECT.ecd;/by_service/MC3R1.R5.6.html

Quoted 8 lines
Quoted 1 line

Adding XEN mailing list in CC.

Thanks.

These are files ported from Linux, where I assume the typedef-s were added to limit the changes which would need making elsewhere. Still I think that's exactly what we (now) have xen/linux-compat.h for. IOW - just move the typedef-s there?

+1. I was about to suggest the same.

Cheers,

Signature · 1 line
Julien Grall