linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 08/19] staging: r8188eu: rename fields of struct rt_firmware
Date: Fri,  7 Jan 2022 11:36:09 +0100	[thread overview]
Message-ID: <20220107103620.15648-9-straube.linux@gmail.com> (raw)
In-Reply-To: <20220107103620.15648-1-straube.linux@gmail.com>

Rename fields of struct rt_firmware to avoid camel case.

szFwBuffer -> data
ulFwLength -> size

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 22 +++++++++----------
 drivers/staging/r8188eu/include/drv_types.h   |  4 ++--
 drivers/staging/r8188eu/os_dep/os_intfs.c     |  4 ++--
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 5c1da9dd179b..ee684b37ff91 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -530,15 +530,15 @@ static int load_firmware(struct rt_firmware *rtfw, struct device *device)
 		goto exit;
 	}
 
-	rtfw->szFwBuffer = kzalloc(FW_8188E_SIZE, GFP_KERNEL);
-	if (!rtfw->szFwBuffer) {
-		pr_err("Failed to allocate rtfw->szFwBuffer\n");
+	rtfw->data = kzalloc(FW_8188E_SIZE, GFP_KERNEL);
+	if (!rtfw->data) {
+		pr_err("Failed to allocate rtfw->data\n");
 		ret = _FAIL;
 		goto exit;
 	}
-	memcpy(rtfw->szFwBuffer, fw->data, fw->size);
-	rtfw->ulFwLength = fw->size;
-	dev_dbg(device, "!bUsedWoWLANFw, FmrmwareLen:%d+\n", rtfw->ulFwLength);
+	memcpy(rtfw->data, fw->data, fw->size);
+	rtfw->size = fw->size;
+	dev_dbg(device, "!bUsedWoWLANFw, FmrmwareLen:%d+\n", rtfw->size);
 
 exit:
 	release_firmware(fw);
@@ -558,17 +558,17 @@ s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
 	u32 FirmwareLen;
 	static int log_version;
 
-	if (!dvobj->firmware.szFwBuffer)
+	if (!dvobj->firmware.data)
 		rtStatus = load_firmware(&dvobj->firmware, device);
 	if (rtStatus == _FAIL) {
-		dvobj->firmware.szFwBuffer = NULL;
+		dvobj->firmware.data = NULL;
 		goto Exit;
 	}
-	pFirmwareBuf = dvobj->firmware.szFwBuffer;
-	FirmwareLen = dvobj->firmware.ulFwLength;
+	pFirmwareBuf = dvobj->firmware.data;
+	FirmwareLen = dvobj->firmware.size;
 
 	/*  To Check Fw header. Added by tynli. 2009.12.04. */
-	pFwHdr = (struct rt_firmware_hdr *)dvobj->firmware.szFwBuffer;
+	pFwHdr = (struct rt_firmware_hdr *)dvobj->firmware.data;
 
 	fw_version = le16_to_cpu(pFwHdr->Version);
 	fw_subversion = pFwHdr->Subversion;
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 2dd5ebaaa921..388822dd325d 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -117,8 +117,8 @@ struct registry_priv {
 #define MAX_CONTINUAL_URB_ERR		4
 
 struct rt_firmware {
-	u8			*szFwBuffer;
-	u32			ulFwLength;
+	u8 *data;
+	u32 size;
 };
 
 struct dvobj_priv {
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index b65e44f97826..08d719822062 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -789,8 +789,8 @@ int netdev_close(struct net_device *pnetdev)
 
 	rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
 
-	kfree(dvobj->firmware.szFwBuffer);
-	dvobj->firmware.szFwBuffer = NULL;
+	kfree(dvobj->firmware.data);
+	dvobj->firmware.data = NULL;
 
 	DBG_88E("-88eu_drv - drv_close, bup =%d\n", padapter->bup);
 	return 0;
-- 
2.34.1


  parent reply	other threads:[~2022-01-07 10:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 10:36 [PATCH 00/19] staging: r8188eu: move firmware loading out of the hal layer Michael Straube
2022-01-07 10:36 ` [PATCH 01/19] staging: r8188eu: remove Firmware* from struct hal_data_8188e Michael Straube
2022-01-07 10:36 ` [PATCH 02/19] staging: r8188eu: remove rtl8188e_InitializeFirmwareVars() Michael Straube
2022-01-07 10:36 ` [PATCH 03/19] staging: r8188eu: release_firmware is not called if allocation fails Michael Straube
2022-01-07 11:15   ` Pavel Skripkin
2022-01-07 11:25     ` Greg KH
2022-01-07 11:26       ` Pavel Skripkin
2022-01-07 10:36 ` [PATCH 04/19] staging: r8188eu: rename Exit label in load_firmware() Michael Straube
2022-01-07 10:36 ` [PATCH 05/19] staging: r8188eu: rename rtStatus " Michael Straube
2022-01-07 10:36 ` [PATCH 06/19] staging: r8188eu: convert type of return variable " Michael Straube
2022-01-07 10:36 ` [PATCH 07/19] staging: r8188eu: rename parameter pFirmware of load_firmware() Michael Straube
2022-01-07 10:36 ` Michael Straube [this message]
2022-01-07 10:36 ` [PATCH 09/19] staging: r8188eu: use kmemdup instead of kzalloc and memcpy Michael Straube
2022-01-07 10:36 ` [PATCH 10/19] staging: r8188eu: rename fw related functions to avoid camel case Michael Straube
2022-01-07 10:36 ` [PATCH 11/19] staging: r8188eu: clean up rtw_reset_8051() Michael Straube
2022-01-07 10:36 ` [PATCH 12/19] staging: r8188eu: convert two functions from s32 to int Michael Straube
2022-01-07 10:36 ` [PATCH 13/19] staging: r8188eu: rename Exit label in rtl8188e_firmware_download() Michael Straube
2022-01-07 10:36 ` [PATCH 14/19] staging: r8188eu: rename rtSatus " Michael Straube
2022-01-07 10:36 ` [PATCH 15/19] staging: r8188eu: rename FWDL_ChkSum_rpt Michael Straube
2022-01-07 10:36 ` [PATCH 16/19] staging: r8188eu: rename writeFW_retry Michael Straube
2022-01-07 10:36 ` [PATCH 17/19] staging: r8188eu: rename pFwHdr in rtl8188e_firmware_download() Michael Straube
2022-01-07 10:36 ` [PATCH 18/19] staging: r8188eu: rename pFirmwareBuf and FirmwareLen Michael Straube
2022-01-07 10:36 ` [PATCH 19/19] staging: r8188eu: move firmware loading code out of the hal layer Michael Straube

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=20220107103620.15648-9-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /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;
as well as URLs for NNTP newsgroup(s).