* [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
@ 2020-03-18 21:12 ` Camylla Goncalves Cantanheide
0 siblings, 0 replies; 7+ messages in thread
From: Camylla Goncalves Cantanheide @ 2020-03-18 21:12 UTC (permalink / raw)
To: gregkh, devel, linux-kernel, lkcamp
The variables of function setKey triggered a 'Avoid CamelCase'
warning from checkpatch.pl. This patch renames these
variables to correct this warning.
Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 52 +++++++++++++-------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 93a15d57e..3aa87296d 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4877,50 +4877,50 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
write_nic_byte(dev, SECR, SECR_value);
}
-void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
- u8 *MacAddr, u8 DefaultKey, u32 *KeyContent)
+void setKey(struct net_device *dev, u8 entry_no, u8 key_idx, u16 key_type,
+ u8 *mac_addr, u8 default_key, u32 *key_content)
{
- u32 TargetCommand = 0;
- u32 TargetContent = 0;
- u16 usConfig = 0;
+ u32 target_cmd = 0;
+ u32 content = 0;
+ u16 config = 0;
u8 i;
- if (EntryNo >= TOTAL_CAM_ENTRY)
+ if (entry_no >= TOTAL_CAM_ENTRY)
RT_TRACE(COMP_ERR, "cam entry exceeds in %s\n", __func__);
RT_TRACE(COMP_SEC,
"====>to %s, dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n",
- __func__, dev, EntryNo, KeyIndex, KeyType, MacAddr);
+ __func__, dev, entry_no, key_idx, key_type, mac_addr);
- if (DefaultKey)
- usConfig |= BIT(15) | (KeyType << 2);
+ if (default_key)
+ config |= BIT(15) | (key_type << 2);
else
- usConfig |= BIT(15) | (KeyType << 2) | KeyIndex;
+ config |= BIT(15) | (key_type << 2) | key_idx;
for (i = 0; i < CAM_CONTENT_COUNT; i++) {
- TargetCommand = i + CAM_CONTENT_COUNT * EntryNo;
- TargetCommand |= BIT(31) | BIT(16);
+ target_cmd = i + CAM_CONTENT_COUNT * entry_no;
+ target_cmd |= BIT(31) | BIT(16);
if (i == 0) { /* MAC|Config */
- TargetContent = (u32)(*(MacAddr + 0)) << 16 |
- (u32)(*(MacAddr + 1)) << 24 |
- (u32)usConfig;
+ content = (u32)(*(mac_addr + 0)) << 16 |
+ (u32)(*(mac_addr + 1)) << 24 |
+ (u32)config;
- write_nic_dword(dev, WCAMI, TargetContent);
- write_nic_dword(dev, RWCAM, TargetCommand);
+ write_nic_dword(dev, WCAMI, content);
+ write_nic_dword(dev, RWCAM, target_cmd);
} else if (i == 1) { /* MAC */
- TargetContent = (u32)(*(MacAddr + 2)) |
- (u32)(*(MacAddr + 3)) << 8 |
- (u32)(*(MacAddr + 4)) << 16 |
- (u32)(*(MacAddr + 5)) << 24;
- write_nic_dword(dev, WCAMI, TargetContent);
- write_nic_dword(dev, RWCAM, TargetCommand);
+ content = (u32)(*(mac_addr + 2)) |
+ (u32)(*(mac_addr + 3)) << 8 |
+ (u32)(*(mac_addr + 4)) << 16 |
+ (u32)(*(mac_addr + 5)) << 24;
+ write_nic_dword(dev, WCAMI, content);
+ write_nic_dword(dev, RWCAM, target_cmd);
} else {
/* Key Material */
- if (KeyContent) {
+ if (key_content) {
write_nic_dword(dev, WCAMI,
- *(KeyContent + i - 2));
- write_nic_dword(dev, RWCAM, TargetCommand);
+ *(key_content + i - 2));
+ write_nic_dword(dev, RWCAM, target_cmd);
}
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
@ 2020-03-18 21:12 ` Camylla Goncalves Cantanheide
0 siblings, 0 replies; 7+ messages in thread
From: Camylla Goncalves Cantanheide @ 2020-03-18 21:12 UTC (permalink / raw)
To: gregkh, devel, linux-kernel, lkcamp
The variables of function setKey triggered a 'Avoid CamelCase'
warning from checkpatch.pl. This patch renames these
variables to correct this warning.
Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 52 +++++++++++++-------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 93a15d57e..3aa87296d 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4877,50 +4877,50 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
write_nic_byte(dev, SECR, SECR_value);
}
-void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
- u8 *MacAddr, u8 DefaultKey, u32 *KeyContent)
+void setKey(struct net_device *dev, u8 entry_no, u8 key_idx, u16 key_type,
+ u8 *mac_addr, u8 default_key, u32 *key_content)
{
- u32 TargetCommand = 0;
- u32 TargetContent = 0;
- u16 usConfig = 0;
+ u32 target_cmd = 0;
+ u32 content = 0;
+ u16 config = 0;
u8 i;
- if (EntryNo >= TOTAL_CAM_ENTRY)
+ if (entry_no >= TOTAL_CAM_ENTRY)
RT_TRACE(COMP_ERR, "cam entry exceeds in %s\n", __func__);
RT_TRACE(COMP_SEC,
"====>to %s, dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n",
- __func__, dev, EntryNo, KeyIndex, KeyType, MacAddr);
+ __func__, dev, entry_no, key_idx, key_type, mac_addr);
- if (DefaultKey)
- usConfig |= BIT(15) | (KeyType << 2);
+ if (default_key)
+ config |= BIT(15) | (key_type << 2);
else
- usConfig |= BIT(15) | (KeyType << 2) | KeyIndex;
+ config |= BIT(15) | (key_type << 2) | key_idx;
for (i = 0; i < CAM_CONTENT_COUNT; i++) {
- TargetCommand = i + CAM_CONTENT_COUNT * EntryNo;
- TargetCommand |= BIT(31) | BIT(16);
+ target_cmd = i + CAM_CONTENT_COUNT * entry_no;
+ target_cmd |= BIT(31) | BIT(16);
if (i == 0) { /* MAC|Config */
- TargetContent = (u32)(*(MacAddr + 0)) << 16 |
- (u32)(*(MacAddr + 1)) << 24 |
- (u32)usConfig;
+ content = (u32)(*(mac_addr + 0)) << 16 |
+ (u32)(*(mac_addr + 1)) << 24 |
+ (u32)config;
- write_nic_dword(dev, WCAMI, TargetContent);
- write_nic_dword(dev, RWCAM, TargetCommand);
+ write_nic_dword(dev, WCAMI, content);
+ write_nic_dword(dev, RWCAM, target_cmd);
} else if (i == 1) { /* MAC */
- TargetContent = (u32)(*(MacAddr + 2)) |
- (u32)(*(MacAddr + 3)) << 8 |
- (u32)(*(MacAddr + 4)) << 16 |
- (u32)(*(MacAddr + 5)) << 24;
- write_nic_dword(dev, WCAMI, TargetContent);
- write_nic_dword(dev, RWCAM, TargetCommand);
+ content = (u32)(*(mac_addr + 2)) |
+ (u32)(*(mac_addr + 3)) << 8 |
+ (u32)(*(mac_addr + 4)) << 16 |
+ (u32)(*(mac_addr + 5)) << 24;
+ write_nic_dword(dev, WCAMI, content);
+ write_nic_dword(dev, RWCAM, target_cmd);
} else {
/* Key Material */
- if (KeyContent) {
+ if (key_content) {
write_nic_dword(dev, WCAMI,
- *(KeyContent + i - 2));
- write_nic_dword(dev, RWCAM, TargetCommand);
+ *(key_content + i - 2));
+ write_nic_dword(dev, RWCAM, target_cmd);
}
}
}
--
2.20.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
2020-03-18 21:12 ` Camylla Goncalves Cantanheide
@ 2020-03-19 1:58 ` Joe Perches
-1 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2020-03-19 1:58 UTC (permalink / raw)
To: Camylla Goncalves Cantanheide, gregkh, devel, linux-kernel, lkcamp
On Wed, 2020-03-18 at 21:12 +0000, Camylla Goncalves Cantanheide wrote:
> The variables of function setKey triggered a 'Avoid CamelCase'
> warning from checkpatch.pl. This patch renames these
> variables to correct this warning.
Please always try to improve the code for humans to read
over correcting mindless checkpatch messages.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
@ 2020-03-19 1:58 ` Joe Perches
0 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2020-03-19 1:58 UTC (permalink / raw)
To: Camylla Goncalves Cantanheide, gregkh, devel, linux-kernel, lkcamp
On Wed, 2020-03-18 at 21:12 +0000, Camylla Goncalves Cantanheide wrote:
> The variables of function setKey triggered a 'Avoid CamelCase'
> warning from checkpatch.pl. This patch renames these
> variables to correct this warning.
Please always try to improve the code for humans to read
over correcting mindless checkpatch messages.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
2020-03-18 21:12 ` Camylla Goncalves Cantanheide
@ 2020-03-19 14:14 ` Greg KH
-1 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2020-03-19 14:14 UTC (permalink / raw)
To: Camylla Goncalves Cantanheide; +Cc: devel, linux-kernel, lkcamp
On Wed, Mar 18, 2020 at 09:12:05PM +0000, Camylla Goncalves Cantanheide wrote:
> The variables of function setKey triggered a 'Avoid CamelCase'
> warning from checkpatch.pl. This patch renames these
> variables to correct this warning.
>
> Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 52 +++++++++++++-------------
> 1 file changed, 26 insertions(+), 26 deletions(-)
This does not apply to my tree at all :(
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
@ 2020-03-19 14:14 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2020-03-19 14:14 UTC (permalink / raw)
To: Camylla Goncalves Cantanheide; +Cc: devel, lkcamp, linux-kernel
On Wed, Mar 18, 2020 at 09:12:05PM +0000, Camylla Goncalves Cantanheide wrote:
> The variables of function setKey triggered a 'Avoid CamelCase'
> warning from checkpatch.pl. This patch renames these
> variables to correct this warning.
>
> Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 52 +++++++++++++-------------
> 1 file changed, 26 insertions(+), 26 deletions(-)
This does not apply to my tree at all :(
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables
[not found] ` <CAG3pErLnRA-02XfG1pbvv7F=gU06=yTMByuvpX0QjiZvDVqFxw@mail.gmail.com>
@ 2020-04-10 2:26 ` Joe Perches
0 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2020-04-10 2:26 UTC (permalink / raw)
To: Camylla Cantanheide; +Cc: Greg Kroah-Hartman, LKML, lkcamp
On Thu, 2020-04-09 at 23:09 -0300, Camylla Cantanheide wrote:
> Hi Joe,
>
> Thanks for your review, I'm new to this and I would like to learn.
>
> I didn't undertand your coment, I was hoping if you could help me clarify a
> bit.
I sent you a suggested patch clarifying the code
rather than clarifying the naming just before this.
https://lore.kernel.org/lkml/a421ed974d7c675a7d41405d483c7645004d4125.camel@perches.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-10 2:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 21:12 [PATCH v2] staging: rtl8192u: Corrects 'Avoid CamelCase' for variables Camylla Goncalves Cantanheide
2020-03-18 21:12 ` Camylla Goncalves Cantanheide
2020-03-19 1:58 ` Joe Perches
2020-03-19 1:58 ` Joe Perches
[not found] ` <CAG3pErLnRA-02XfG1pbvv7F=gU06=yTMByuvpX0QjiZvDVqFxw@mail.gmail.com>
2020-04-10 2:26 ` Joe Perches
2020-03-19 14:14 ` Greg KH
2020-03-19 14:14 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.