Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34092 )
Change subject: ec/lenovo/pmh7: Fix error conversion from 'int' to 'signed char:1' ......................................................................
Patch Set 6:
What does this fix? Where is the conversion?
Please see https://qa.coreboot.org/job/coreboot-gerrit/110495/consoleFull:
/cb-build/coreboot-gerrit.0/default/LENOVO_T410/mainboard/lenovo/t410/static.c:74:22: error: conversion from 'int' to 'signed char:1' changes value from '1' to '-1' [-Werror=conversion] .backlight_enable = 0x01, ^~~~ /cb-build/coreboot-gerrit.0/default/LENOVO_T410/mainboard/lenovo/t410/static.c:75:23: error: conversion from 'int' to 'signed char:1' changes value from '1' to '-1' [-Werror=conversion] .dock_event_enable = 0x01, ^~~~
Where is the test that this patch fixes it? I don't think it does.
What the error tells us:
* GCC treats `.backlight_enable` and `.dock_event_enable` as `signed char:1`. Making that explicit in `chip.h` shouldn't change anything. * The problem is that both are declared as `signed` with only 1 bit width. This means the only possible values are `0` and `-1`. Hence the error, when assigning `1`.
The proper solution should be to make them `unsigned` or get rid of the `:1`.