Re: [PATCH 1/2] hw/misc/pca9552: Trace LED On/Off events

2020-06-16 Thread Philippe Mathieu-Daudé
On 6/16/20 7:15 PM, Cédric Le Goater wrote: > After a closer look, > >>> @@ -45,9 +46,15 @@ static void pca9552_update_pin_input(PCA9552State *s) >>> switch (config) { >>> case PCA9552_LED_ON: >>> s->regs[input_reg] |= 1 << input_shift; >>> +if (input_shi

Re: [PATCH 1/2] hw/misc/pca9552: Trace LED On/Off events

2020-06-16 Thread Cédric Le Goater
After a closer look, >> @@ -45,9 +46,15 @@ static void pca9552_update_pin_input(PCA9552State *s) >> switch (config) { >> case PCA9552_LED_ON: >> s->regs[input_reg] |= 1 << input_shift; >> +if (input_shift < s->nr_leds) { This seems like a superfluous test

Re: [PATCH 1/2] hw/misc/pca9552: Trace LED On/Off events

2020-06-16 Thread Cédric Le Goater
On 6/16/20 11:45 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Download an OpenBMC witherspoon flash image : wget https://openpower.xyz/job/openbmc-build/lastSuccessfulBuild/distro=ubuntu,label=builder,ta

[PATCH 1/2] hw/misc/pca9552: Trace LED On/Off events

2020-06-16 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/pca9552.c| 7 +++ hw/misc/trace-events | 3 +++ 2 files changed, 10 insertions(+) diff --git a/hw/misc/pca9552.c b/hw/misc/pca9552.c index cac729e35a..a3d0decbff 100644 --- a/hw/misc/pca9552.c +++ b/hw/misc/pca9552.c @@ -17,6 +17,7 @@ #i