Skip to contentSkip to conversation

hwmon: (aquacomputer_d5next) Move device-specific data into struct aqc_data

PATCH Guenter Roeck 2 participants 2 messages Jun 9, 2022 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw
Quoted 7 lines · Aleksa Savic

As preparation for adding support for more devices in upcoming patches, move device-specific data, such as number of fans, temperature sensors, register offsets etc. to struct aqc_data. This is made possible by the fact that the supported Aquacomputer devices share the same layouts of sensor substructures. This allows aqc_raw_event() and others to stay general and not be cluttered with similar loops for each device.

This is doing way more than that; it removes a lot of defines and replaces them with constants, making it all but impossible to reliably review the patch. That alone makes it unacceptable. On top of that, I am not going to participate in a "thou shall use defines" vs. "thou shall use raw constants" editing war. The driver uses defines for constants. Keep using them.

Guenter

#1 lore raw
Quoted 9 lines · Guenter Roeck
Quoted 7 lines · Aleksa Savic

As preparation for adding support for more devices in upcoming patches, move device-specific data, such as number of fans, temperature sensors, register offsets etc. to struct aqc_data. This is made possible by the fact that the supported Aquacomputer devices share the same layouts of sensor substructures. This allows aqc_raw_event() and others to stay general and not be cluttered with similar loops for each device.

Quoted 8 lines

This is doing way more than that; it removes a lot of defines and replaces them with constants, making it all but impossible to reliably review the patch. That alone makes it unacceptable. On top of that, I am not going to participate in a "thou shall use defines" vs. "thou shall use raw constants" editing war. The driver uses defines for constants. Keep using them.

Guenter

Understood, thanks :). Will rework it in v2.

Aleksa