Fix checkpatch warnings for struct member pFirmware.
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 ++++----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 4b9249195b5a..6308a25e064c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -707,19 +707,19 @@ bool rtl92e_start_adapter(struct net_device *dev)
rtl92e_writeb(dev, ANAPAR, 0x37);
mdelay(500);
}
- priv->pFirmware->status = FW_STATUS_0_INIT;
+ priv->pfirmware->status = FW_STATUS_0_INIT;
if (priv->RegRfOff)
priv->rtllib->eRFPowerState = eRfOff;
ulRegRead = rtl92e_readl(dev, CPU_GEN);
- if (priv->pFirmware->status == FW_STATUS_0_INIT)
+ if (priv->pfirmware->status == FW_STATUS_0_INIT)
ulRegRead |= CPU_GEN_SYSTEM_RESET;
- else if (priv->pFirmware->status == FW_STATUS_5_READY)
+ else if (priv->pfirmware->status == FW_STATUS_5_READY)
ulRegRead |= CPU_GEN_FIRMWARE_RESET;
else
netdev_err(dev, "%s(): undefined firmware state: %d.\n",
- __func__, priv->pFirmware->status);
+ __func__, priv->pfirmware->status);
rtl92e_writel(dev, CPU_GEN, ulRegRead);
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
index 38110fa4f36d..364f34acd81c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
@@ -51,7 +51,7 @@ static bool _rtl92e_fw_check_ready(struct net_device *dev,
u8 load_fw_status)
{
struct r8192_priv *priv = rtllib_priv(dev);
- struct rt_firmware *pfirmware = priv->pFirmware;
+ struct rt_firmware *pfirmware = priv->pfirmware;
bool rt_status = true;
switch (load_fw_status) {
@@ -138,7 +138,7 @@ bool rtl92e_init_fw(struct net_device *dev)
enum opt_rst_type rst_opt = OPT_SYSTEM_RESET;
enum firmware_init_step starting_state = FW_INIT_STEP0_BOOT;
- struct rt_firmware *pfirmware = priv->pFirmware;
+ struct rt_firmware *pfirmware = priv->pfirmware;
netdev_dbg(dev, " PlatformInitFirmware()==>\n");
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 671fe547639b..fea01e2ba5ab 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -907,8 +907,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->card_type = PCI;
- priv->pFirmware = vzalloc(sizeof(struct rt_firmware));
- if (!priv->pFirmware)
+ priv->pfirmware = vzalloc(sizeof(*priv->pfirmware));
+ if (!priv->pfirmware)
netdev_err(dev,
"rtl8192e: Unable to allocate space for firmware\n");
@@ -2409,8 +2409,8 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)
priv->polling_timer_on = 0;
_rtl92e_down(dev, true);
rtl92e_dm_deinit(dev);
- vfree(priv->pFirmware);
- priv->pFirmware = NULL;
+ vfree(priv->pfirmware);
+ priv->pfirmware = NULL;
_rtl92e_free_rx_ring(dev);
for (i = 0; i < MAX_TX_QUEUE_COUNT; i++)
_rtl92e_free_tx_ring(dev, i);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 093887bcd463..b7b934932b43 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -343,7 +343,7 @@ struct r8192_priv {
enum acm_method AcmMethod;
- struct rt_firmware *pFirmware;
+ struct rt_firmware *pfirmware;
enum rtl819x_loopback LoopbackMode;
struct timer_list watch_dog_timer;
--
2.30.2
On Sun, Sep 18, 2022 at 01:49:26PM +0200, Valentin Vidic wrote:
> Fix checkpatch warnings for struct member pFirmware.
>
> Signed-off-by: Valentin Vidic <[email protected]>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 ++++----
> drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 4 ++--
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 ++++----
> drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +-
> 4 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index 4b9249195b5a..6308a25e064c 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -707,19 +707,19 @@ bool rtl92e_start_adapter(struct net_device *dev)
> rtl92e_writeb(dev, ANAPAR, 0x37);
> mdelay(500);
> }
> - priv->pFirmware->status = FW_STATUS_0_INIT;
> + priv->pfirmware->status = FW_STATUS_0_INIT;
What does "pfirmware" mean here?
If you fix up camelcase warnings, please do so in a way that is the
proper Linux kernel style, not just making everything lowercase.
Look up Hungarian notation and why the original was named this way and
why this isn't needed in Linux at all (i.e. we have modern compilers.)
thanks,
greg k-h
On Sun, Sep 18, 2022 at 03:49:52PM +0200, Greg Kroah-Hartman wrote:
> What does "pfirmware" mean here?
>
> If you fix up camelcase warnings, please do so in a way that is the
> proper Linux kernel style, not just making everything lowercase.
>
> Look up Hungarian notation and why the original was named this way and
> why this isn't needed in Linux at all (i.e. we have modern compilers.)
The rest of the driver does not use Hungarian notation, so I assume this
was something like platform or packed firmware. However, I could not
find any more info in the git log, so maybe just drop the prefix as it
is the only firmware in that struct?
--
Valentin