mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marius Zachmann <mail@mariuszachmann.de>
To: linux@roeck-us.net
Cc: mail@mariuszachmann.de, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Replace magic values with constants
Date: Thu, 13 Nov 2025 11:00:24 +0100	[thread overview]
Message-ID: <20251113100024.11103-3-mail@mariuszachmann.de> (raw)
In-Reply-To: <20251113100024.11103-1-mail@mariuszachmann.de>

Replace two magic values in ccp_device with
existing constants.

Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
---
 drivers/hwmon/corsair-cpro.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c
index 6e1c415f3e26..e755353dd461 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];
 };
-- 
2.51.2


  parent reply	other threads:[~2025-11-13 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 10:00 [PATCH 0/2] hwmon: corsair-cpro: Read negative temperatures and remove magic values Marius Zachmann
2025-11-13 10:00 ` [PATCH 1/2] Read temperature as a signed value Marius Zachmann
2025-11-13 20:19   ` Guenter Roeck
2025-11-13 10:00 ` Marius Zachmann [this message]
2025-11-13 20:22   ` [PATCH 2/2] Replace magic values with constants Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251113100024.11103-3-mail@mariuszachmann.de \
    --to=mail@mariuszachmann.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®