On Tue, May 24, 2022 at 04:17:01PM +0000, Michael Shych wrote: > > > > +static umode_t > > > +emc2305_is_visible(const void *data, enum hwmon_sensor_types type, > > > +u32 attr, int channel) { > > > + int max_channel = emc2305_get_max_channel((struct emc2305_data > > > +*)data); > > > > Unnecessary typecast. > It's required as otherwise there is compilation warning. > Arguable. The critical part is the change from a const pointer to a non-const pointer, which is in general not a good idea. It doesn't matter here, but it would be better to declare the parameter of emc2305_get_max_channel to be a const *. Guenter