summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil+cisco@kernel.org>2026-07-10 13:07:29 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2026-07-17 10:13:57 +0200
commite6dcc43e5174d685e4e9685d4f241130f5f5f020 (patch)
tree01363f64e9571fe531b017a46fc4430774b8f7cb /drivers
parentbce7236c16c2c6fb99857d90b928db135acf68bb (diff)
downloadlinux-next-e6dcc43e5174d685e4e9685d4f241130f5f5f020.tar.gz
linux-next-e6dcc43e5174d685e4e9685d4f241130f5f5f020.zip
media: cec/core: max_retries -> max_attempts
Rename max_retries to max_attempts. This counter really is for the number of attempts, not the number of retries. Also increase the number of attempts from 2 to 3. Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/cec/core/cec-adap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c
index de0c4fcd8dfe..e9dce0dfd102 100644
--- a/drivers/media/cec/core/cec-adap.c
+++ b/drivers/media/cec/core/cec-adap.c
@@ -1317,7 +1317,7 @@ static int cec_config_log_addr(struct cec_adapter *adap,
{
struct cec_log_addrs *las = &adap->log_addrs;
struct cec_msg msg = { };
- const unsigned int max_retries = 2;
+ const unsigned int max_attempts = 3;
unsigned int i;
int err;
@@ -1328,7 +1328,7 @@ static int cec_config_log_addr(struct cec_adapter *adap,
msg.len = 1;
msg.msg[0] = (log_addr << 4) | log_addr;
- for (i = 0; i < max_retries; i++) {
+ for (i = 0; i < max_attempts; i++) {
err = cec_transmit_msg_fh(adap, &msg, NULL, true);
/*
@@ -1357,19 +1357,19 @@ static int cec_config_log_addr(struct cec_adapter *adap,
if (msg.tx_status & CEC_TX_STATUS_NACK)
break;
/*
- * Retry up to max_retries times if the message was neither
+ * Do up to max_attempts if the message was neither
* OKed or NACKed. This can happen due to e.g. a Lost
* Arbitration condition.
*/
}
/*
- * If we are unable to get an OK or a NACK after max_retries attempts
+ * If we are unable to get an OK or a NACK after max_attempts
* (and note that each attempt already consists of four polls), then
* we assume that something is really weird and that it is not a
* good idea to try and claim this logical address.
*/
- if (i == max_retries) {
+ if (i == max_attempts) {
dprintk(0, "polling for LA %u failed with tx_status=0x%04x\n",
log_addr, msg.tx_status);
return 0;