linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8192e: fix CamelCase variables
@ 2022-09-25 12:38 Valentin Vidic
  2022-09-25 20:28 ` Philipp Hortmann
  0 siblings, 1 reply; 2+ messages in thread
From: Valentin Vidic @ 2022-09-25 12:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Philipp Hortmann, linux-staging, linux-kernel, Valentin Vidic

Fix checkpatch warnings for variables: LinkCtrlReg, DeviceID,
RevisionID, IrqLine.

Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
---
v2: rebase on staging-testing branch

 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
index 886bf4ba2adf..81e1bb856c60 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
@@ -16,9 +16,9 @@ static void _rtl92e_parse_pci_configuration(struct pci_dev *pdev,
 	struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
 
 	u8 tmp;
-	u16 LinkCtrlReg;
+	u16 link_ctrl_reg;
 
-	pcie_capability_read_word(priv->pdev, PCI_EXP_LNKCTL, &LinkCtrlReg);
+	pcie_capability_read_word(priv->pdev, PCI_EXP_LNKCTL, &link_ctrl_reg);
 
 	pci_read_config_byte(pdev, 0x98, &tmp);
 	tmp |= BIT4;
@@ -31,28 +31,28 @@ static void _rtl92e_parse_pci_configuration(struct pci_dev *pdev,
 bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
 {
 	struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
-	u16 DeviceID;
-	u8  RevisionID;
-	u16 IrqLine;
+	u16 device_id;
+	u8  revision_id;
+	u16 irq_line;
 
-	DeviceID = pdev->device;
-	RevisionID = pdev->revision;
-	pci_read_config_word(pdev, 0x3C, &IrqLine);
+	device_id = pdev->device;
+	revision_id = pdev->revision;
+	pci_read_config_word(pdev, 0x3C, &irq_line);
 
 	priv->card_8192 = priv->ops->nic_type;
 
-	if (DeviceID == 0x8192) {
-		switch (RevisionID) {
+	if (device_id == 0x8192) {
+		switch (revision_id) {
 		case HAL_HW_PCI_REVISION_ID_8192PCIE:
 			dev_info(&pdev->dev,
 				 "Adapter(8192 PCI-E) is found - DeviceID=%x\n",
-				 DeviceID);
+				 device_id);
 			priv->card_8192 = NIC_8192E;
 			break;
 		case HAL_HW_PCI_REVISION_ID_8192SE:
 			dev_info(&pdev->dev,
 				 "Adapter(8192SE) is found - DeviceID=%x\n",
-				 DeviceID);
+				 device_id);
 			priv->card_8192 = NIC_8192SE;
 			break;
 		default:
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] staging: rtl8192e: fix CamelCase variables
  2022-09-25 12:38 [PATCH v2] staging: rtl8192e: fix CamelCase variables Valentin Vidic
@ 2022-09-25 20:28 ` Philipp Hortmann
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hortmann @ 2022-09-25 20:28 UTC (permalink / raw)
  To: Valentin Vidic, Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel

On 9/25/22 14:38, Valentin Vidic wrote:
> Fix checkpatch warnings for variables: LinkCtrlReg, DeviceID,
> RevisionID, IrqLine.
> 
> Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
> ---
> v2: rebase on staging-testing branch
> 
>   drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 24 ++++++++++-----------
>   1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> index 886bf4ba2adf..81e1bb856c60 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> @@ -16,9 +16,9 @@ static void _rtl92e_parse_pci_configuration(struct pci_dev *pdev,
>   	struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
>   
>   	u8 tmp;
> -	u16 LinkCtrlReg;
> +	u16 link_ctrl_reg;
>   
> -	pcie_capability_read_word(priv->pdev, PCI_EXP_LNKCTL, &LinkCtrlReg);
> +	pcie_capability_read_word(priv->pdev, PCI_EXP_LNKCTL, &link_ctrl_reg);
>   
>   	pci_read_config_byte(pdev, 0x98, &tmp);
>   	tmp |= BIT4;
> @@ -31,28 +31,28 @@ static void _rtl92e_parse_pci_configuration(struct pci_dev *pdev,
>   bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
>   {
>   	struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
> -	u16 DeviceID;
> -	u8  RevisionID;
> -	u16 IrqLine;
> +	u16 device_id;
> +	u8  revision_id;
> +	u16 irq_line;
>   
> -	DeviceID = pdev->device;
> -	RevisionID = pdev->revision;
> -	pci_read_config_word(pdev, 0x3C, &IrqLine);
> +	device_id = pdev->device;
> +	revision_id = pdev->revision;
> +	pci_read_config_word(pdev, 0x3C, &irq_line);
>   
>   	priv->card_8192 = priv->ops->nic_type;
>   
> -	if (DeviceID == 0x8192) {
> -		switch (RevisionID) {
> +	if (device_id == 0x8192) {
> +		switch (revision_id) {
>   		case HAL_HW_PCI_REVISION_ID_8192PCIE:
>   			dev_info(&pdev->dev,
>   				 "Adapter(8192 PCI-E) is found - DeviceID=%x\n",
> -				 DeviceID);
> +				 device_id);
>   			priv->card_8192 = NIC_8192E;
>   			break;
>   		case HAL_HW_PCI_REVISION_ID_8192SE:
>   			dev_info(&pdev->dev,
>   				 "Adapter(8192SE) is found - DeviceID=%x\n",
> -				 DeviceID);
> +				 device_id);
>   			priv->card_8192 = NIC_8192SE;
>   			break;
>   		default:

I do not like that the dev_info messages with DeviceID are not changed 
as well. But that is a formal thing.

But the patch is working:
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-25 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-25 12:38 [PATCH v2] staging: rtl8192e: fix CamelCase variables Valentin Vidic
2022-09-25 20:28 ` Philipp Hortmann

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).