diff mbox series

[01/11] qtnfmac_pcie: do not store FW name in driver state structure

Message ID 20180924051246.13371-2-igor.mitsyanko.os@quantenna.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series qtnfmac_pcie: extract device-independent PCIe driver code | expand

Commit Message

Igor Mitsyanko Sept. 24, 2018, 5:13 a.m. UTC
Firmware name is only needed at probe stage, no point in keeping it in
driver state structure.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
---
 drivers/net/wireless/quantenna/qtnfmac/bus.h        | 1 -
 drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

Comments

Kalle Valo Sept. 24, 2018, 7:34 a.m. UTC | #1
Igor Mitsyanko SO <igor.mitsyanko.os@quantenna.com> writes:

> Firmware name is only needed at probe stage, no point in keeping it in
> driver state structure.
>
> Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>

This is just cosmetics, but what's that "SO" in the From field? Do note
that if I apply these patches as is that will be stored also to git.
Igor Mitsyanko Sept. 24, 2018, 8:21 a.m. UTC | #2
On 09/24/2018 12:34 AM, Kalle Valo wrote:
> 
> 
> Igor Mitsyanko SO <igor.mitsyanko.os@quantenna.com> writes:
> 
>> Firmware name is only needed at probe stage, no point in keeping it in
>> driver state structure.
>>
>> Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
> 
> This is just cosmetics, but what's that "SO" in the From field? Do note
> that if I apply these patches as is that will be stored also to git.


Looks like something new from my mail system.. Will get rid of that and 
resend the series. Thanks!
diff mbox series

Patch

diff --git a/drivers/net/wireless/quantenna/qtnfmac/bus.h b/drivers/net/wireless/quantenna/qtnfmac/bus.h
index 323e47c..2beca5b 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/bus.h
+++ b/drivers/net/wireless/quantenna/qtnfmac/bus.h
@@ -57,7 +57,6 @@  struct qtnf_bus {
 	struct qtnf_wmac *mac[QTNF_MAX_MAC];
 	struct qtnf_qlink_transport trans;
 	struct qtnf_hw_info hw_info;
-	char fwname[32];
 	struct napi_struct mux_napi;
 	struct net_device mux_dev;
 	struct completion firmware_init_complete;
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
index 3120d49..97cc7f2 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
@@ -1177,13 +1177,14 @@  static void qtnf_fw_work_handler(struct work_struct *work)
 	const struct firmware *fw;
 	int ret;
 	u32 state = QTN_RC_FW_LOADRDY | QTN_RC_FW_QLINK;
+	const char *fwname = QTN_PCI_PEARL_FW_NAME;
 
 	if (flashboot) {
 		state |= QTN_RC_FW_FLASHBOOT;
 	} else {
-		ret = request_firmware(&fw, bus->fwname, &pdev->dev);
+		ret = request_firmware(&fw, fwname, &pdev->dev);
 		if (ret < 0) {
-			pr_err("failed to get firmware %s\n", bus->fwname);
+			pr_err("failed to get firmware %s\n", fwname);
 			goto fw_load_fail;
 		}
 	}
@@ -1205,7 +1206,7 @@  static void qtnf_fw_work_handler(struct work_struct *work)
 	if (flashboot) {
 		pr_info("booting firmware from flash\n");
 	} else {
-		pr_info("starting firmware upload: %s\n", bus->fwname);
+		pr_info("starting firmware upload: %s\n", fwname);
 
 		ret = qtnf_ep_fw_load(priv, fw->data, fw->size);
 		release_firmware(fw);
@@ -1290,7 +1291,6 @@  static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	bus->fw_state = QTNF_FW_STATE_RESET;
 	pcie_priv->pdev = pdev;
 
-	strcpy(bus->fwname, QTN_PCI_PEARL_FW_NAME);
 	init_completion(&bus->firmware_init_complete);
 	mutex_init(&bus->bus_lock);
 	spin_lock_init(&pcie_priv->tx0_lock);