All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@kernel.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 08/12] iwlwifi: eeprom: clean up macros
Date: Fri,  4 Feb 2022 12:25:07 +0200	[thread overview]
Message-ID: <iwlwifi.20220204122220.2150362427bd.I47a47d0f795dc08361958833b8235ab5de75d154@changeid> (raw)
In-Reply-To: <20220204102511.606112-1-luca@coelho.fi>

From: Johannes Berg <johannes.berg@intel.com>

There are two versions of the same definitions, with and without
IWL_ prefix. Use the ones with IWL_ prefix, keeping the correct
comment (microseconds).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
index b9e86bf972e5..5f386bb1a353 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c
@@ -23,26 +23,22 @@
  */
 #define IWL_EEPROM_ACCESS_TIMEOUT	5000 /* uSec */
 
-#define IWL_EEPROM_SEM_TIMEOUT		10   /* microseconds */
-#define IWL_EEPROM_SEM_RETRY_LIMIT	1000 /* number of attempts (not time) */
-
-
 /*
  * The device's EEPROM semaphore prevents conflicts between driver and uCode
  * when accessing the EEPROM; each access is a series of pulses to/from the
  * EEPROM chip, not a single event, so even reads could conflict if they
  * weren't arbitrated by the semaphore.
  */
+#define IWL_EEPROM_SEM_TIMEOUT		10   /* microseconds */
+#define IWL_EEPROM_SEM_RETRY_LIMIT	1000 /* number of attempts (not time) */
 
-#define	EEPROM_SEM_TIMEOUT 10		/* milliseconds */
-#define EEPROM_SEM_RETRY_LIMIT 1000	/* number of attempts (not time) */
 
 static int iwl_eeprom_acquire_semaphore(struct iwl_trans *trans)
 {
 	u16 count;
 	int ret;
 
-	for (count = 0; count < EEPROM_SEM_RETRY_LIMIT; count++) {
+	for (count = 0; count < IWL_EEPROM_SEM_RETRY_LIMIT; count++) {
 		/* Request semaphore */
 		iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG,
 			    CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
@@ -51,7 +47,7 @@ static int iwl_eeprom_acquire_semaphore(struct iwl_trans *trans)
 		ret = iwl_poll_bit(trans, CSR_HW_IF_CONFIG_REG,
 				CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,
 				CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,
-				EEPROM_SEM_TIMEOUT);
+				IWL_EEPROM_SEM_TIMEOUT);
 		if (ret >= 0) {
 			IWL_DEBUG_EEPROM(trans->dev,
 					 "Acquired semaphore after %d tries.\n",
-- 
2.34.1


  parent reply	other threads:[~2022-02-04 10:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 10:24 [PATCH 00/12] iwlwifi: updates intended for v5.18 2022-02-04 Luca Coelho
2022-02-04 10:25 ` [PATCH 01/12] iwlwifi: mvm: Correctly set fragmented EBS Luca Coelho
2022-02-04 10:25 ` [PATCH 02/12] iwlwifi: yoyo: Avoid using dram data if allocation failed Luca Coelho
2022-02-04 10:25 ` [PATCH 03/12] iwlwifi: scan: Modify return value of a function Luca Coelho
2022-02-04 10:25 ` [PATCH 04/12] iwlwifi: mvm: Passively scan non PSC channels only when requested so Luca Coelho
2022-03-25 17:11   ` Ben Greear
2022-04-04 19:02     ` Peer, Ilan
2022-04-05 19:05       ` Ben Greear
2022-04-06  6:22         ` Peer, Ilan
2022-02-04 10:25 ` [PATCH 05/12] iwlwifi: pcie: adjust to Bz completion descriptor Luca Coelho
2022-02-04 10:25 ` [PATCH 06/12] iwlwifi: pcie: Adapt rx queue write pointer for Bz family Luca Coelho
2022-02-04 10:25 ` [PATCH 07/12] iwlwifi: drv: load tlv debug data earlier Luca Coelho
2022-02-04 10:25 ` Luca Coelho [this message]
2022-02-04 10:25 ` [PATCH 09/12] iwlwifi: remove unused macros Luca Coelho
2022-02-04 10:25 ` [PATCH 10/12] iwlwifi: debugfs: remove useless double condition Luca Coelho
2022-02-04 10:25 ` [PATCH 11/12] iwlwifi: mei: use C99 initializer for device IDs Luca Coelho
2022-02-04 10:25 ` [PATCH 12/12] iwlwifi: mvm: Unify the scan iteration functions Luca Coelho

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=iwlwifi.20220204122220.2150362427bd.I47a47d0f795dc08361958833b8235ab5de75d154@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.