mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Valentin Vidic <vvidic@valentin-vidic.from.hr>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: fix CamelCase variables
Date: Sun, 18 Sep 2022 16:59:52 +0200	[thread overview]
Message-ID: <2239be8b-8dd1-0e82-7e1e-49b94b89b052@gmail.com> (raw)
In-Reply-To: <20220918113041.3805576-1-vvidic@valentin-vidic.from.hr>

On 9/18/22 13:30, Valentin Vidic wrote:
> Fix checkpatch warnings for variables: LinkCtrlReg, DeviceID,
> RevisionID, IrqLine.
> 
> Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
> ---
>   drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 26 ++++++++++-----------
>   1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> index 1d992d5c4e17..7a9a24935da9 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
> @@ -16,11 +16,11 @@ 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);
>   
> -	RT_TRACE(COMP_INIT, "Link Control Register =%x\n", LinkCtrlReg);
> +	RT_TRACE(COMP_INIT, "Link Control Register =%x\n", link_ctrl_reg);
>   
>   	pci_read_config_byte(pdev, 0x98, &tmp);
>   	tmp |= BIT4;
> @@ -33,28 +33,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:

The only thing I do not like so much is that the comment with CamelCase 
"DeviceID" is not changed.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150


  reply	other threads:[~2022-09-18 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 11:30 Valentin Vidic
2022-09-18 14:59 ` Philipp Hortmann [this message]
2022-09-24 11:00 ` Greg Kroah-Hartman

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=2239be8b-8dd1-0e82-7e1e-49b94b89b052@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=vvidic@valentin-vidic.from.hr \
    /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

all inboxes | Powered by JetHome®