Re: min/max() changes

Harshit Mogalapalli <[email protected]> Mon, 5 Aug 2024 14:38:44 +0530
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
Hi Dan,

>> Let me know if you see any other bugs from the min/max() changes.  Or
>> any bugs at all really.  Feel free.
>>


Some observations on what looks different after smatch and min/max changes.

drivers/hwmon/nct7904.c:621 nct7904_write_fan() warn: add some 
parenthesis here?
drivers/hwmon/nzxt-smart2.c:218 scale_pwm_value() warn: add some 
parenthesis here?
drivers/hwmon/nzxt-smart2.c:549 update_interval_to_control_byte() warn: 
add some parenthesis here?
drivers/hwmon/tmp513.c:274 tmp51x_set_value() warn: add some parenthesis 
here?
drivers/hwmon/w83627ehf.c:806 store_temp_offset() warn: add some 
parenthesis here?
drivers/hwmon/emc1403.c:461 emc1403_set_hyst() warn: add some 
parenthesis here?
drivers/hwmon/emc1403.c:463 emc1403_set_hyst() warn: add some 
parenthesis here?


^^^ These look related to the minmax changes ?( clamp)


Also started seeing these sm_warns from check_precedence.c


drivers/net/can/kvaser_pciefd.c:1154 kvaser_pciefd_setup_board() warn: 
shift has higher precedence than mask
drivers/net/can/kvaser_pciefd.c:1154 kvaser_pciefd_setup_board() warn: 
shift has higher precedence than mask
drivers/net/can/kvaser_pciefd.c:1154 kvaser_pciefd_setup_board() warn: 
subtract is higher precedence than shift


Thanks,
Harshit


>> regards,
>> dan carpenter
>>
> Regards,
> Harshit
>