From: Marius Zachmann Date: Thu, 13 Nov 2025 10:00:24 +0000 (+0100) Subject: hwmon: (corsair-cpro) Replace magic values with constants X-Git-Tag: v6.19-rc1~148^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c48eb382e57a9e2d2817f22f11f6c754e601dc8;p=thirdparty%2Flinux.git hwmon: (corsair-cpro) Replace magic values with constants Replace two magic values in ccp_device with existing constants. Signed-off-by: Marius Zachmann Link: https://lore.kernel.org/r/20251113100024.11103-3-mail@mariuszachmann.de [groeck: Updated subject to include subsystem/driver] Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c index f011d26eb0efa..b6e508e43fa17 100644 --- a/drivers/hwmon/corsair-cpro.c +++ b/drivers/hwmon/corsair-cpro.c @@ -90,10 +90,10 @@ struct ccp_device { u8 *cmd_buffer; u8 *buffer; int buffer_recv_size; /* number of received bytes in buffer */ - int target[6]; + int target[NUM_FANS]; DECLARE_BITMAP(temp_cnct, NUM_TEMP_SENSORS); DECLARE_BITMAP(fan_cnct, NUM_FANS); - char fan_label[6][LABEL_LENGTH]; + char fan_label[NUM_FANS][LABEL_LENGTH]; u8 firmware_ver[3]; u8 bootloader_ver[2]; };