Attention is currently required from: Jonathan Zhang, Johnny Lin, Christian Walter, Jeff Li, Tim Chu.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69500 )
Change subject: src/soc/intel/xeon_sp/ras/hest.c: fix HEST table length ......................................................................
Patch Set 6:
(1 comment)
File src/soc/intel/xeon_sp/ras/hest.c:
https://review.coreboot.org/c/coreboot/+/69500/comment/b6293907_1e5ee0f6 PS3, Line 62: void *current; : current = (void *)(hest); : void *next = current; : next = hest + 1;
Thank you for pointing out this problem of arithmetics on pointers to void. I agree with you to avoid this.
By the way, the next won't be in the middle of the header, because `hest + 1' does skip the acpi_hest_t struct. And stoneyridge code also use arithmetics on pointers to void in function acpi_fill_hest.
Oh right. I though it would use the pointer size of the lefthand size but it does not...
To avoid arithmetics on pointers to void completely, is it possible to add CFLAGS -Werror=pointer-arith?
It's not always bad and Linus Torvalds even argued it makes sense in some cases https://lore.kernel.org/lkml/CAHk-=whFKYMrF6euVvziW+drw7-yi1pYdf=uccnzJ8k09D... . I personally prefer integers for aritmetics on pointers (that's why I got confused by hest + 1). I think there are too many cases in coreboot to enable that flag.