* [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl
@ 2014-07-13 21:47 Joerg C. Meyer
2014-07-13 22:46 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Joerg C. Meyer @ 2014-07-13 21:47 UTC (permalink / raw)
To: gregkh, chenweilong, davem, sachin.kamat, dingtianhong, joerg
Cc: devel, linux-kernel
Signed-off-by: Joerg C. Meyer <joerg@meyer.homedns.org>
---
drivers/staging/rtl8821ae/cam.c | 57 +++++++++++++++++++----------------------
1 file changed, 27 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/rtl8821ae/cam.c b/drivers/staging/rtl8821ae/cam.c
index 3bc6b3d..835bc3b 100644
--- a/drivers/staging/rtl8821ae/cam.c
+++ b/drivers/staging/rtl8821ae/cam.c
@@ -68,12 +68,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
target_command);
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE %x: %x \n",
+ ("WRITE %x: %x\n",
rtlpriv->cfg->maps[WCAMI], target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
("The Key ID is %d\n", entry_no));
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE %x: %x \n",
+ ("WRITE %x: %x\n",
rtlpriv->cfg->maps[RWCAM], target_command));
} else if (entry_i == 1) {
@@ -89,9 +89,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
target_command);
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE A4: %x \n", target_content));
+ ("WRITE A4: %x\n", target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE A0: %x \n", target_command));
+ ("WRITE A0: %x\n", target_command));
} else {
@@ -109,9 +109,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, u32 entry_no,
udelay(100);
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE A4: %x \n", target_content));
+ ("WRITE A4: %x\n", target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("WRITE A0: %x \n", target_command));
+ ("WRITE A0: %x\n", target_command));
}
}
@@ -127,8 +127,7 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
struct rtl_priv *rtlpriv = rtl_priv(hw);
RT_TRACE(COMP_SEC, DBG_DMESG,
- ("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, "
- "ulUseDK=%x MacAddr %pM\n",
+ ("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n",
ul_entry_idx, ul_key_id, ul_enc_alg,
ul_default_key, mac_addr));
@@ -138,21 +137,20 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
return 0;
}
- if (ul_default_key == 1) {
+ if (ul_default_key == 1)
us_config = CFG_VALID | ((u16) (ul_enc_alg) << 2);
- } else {
+ else
us_config = CFG_VALID | ((ul_enc_alg) << 2) | ul_key_id;
- }
rtl_cam_program_entry(hw, ul_entry_idx, mac_addr,
(u8 *) key_content, us_config);
- RT_TRACE(COMP_SEC, DBG_DMESG, ("end \n"));
+ RT_TRACE(COMP_SEC, DBG_DMESG, ("end\n"));
return 1;
}
-//EXPORT_SYMBOL(rtl_cam_add_one_entry);
+/* EXPORT_SYMBOL(rtl_cam_add_one_entry); */
int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
u8 *mac_addr, u32 ul_key_id)
@@ -169,14 +167,14 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(COMP_SEC, DBG_DMESG,
- ("rtl_cam_delete_one_entry(): WRITE A4: %x \n", 0));
+ ("rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0));
RT_TRACE(COMP_SEC, DBG_DMESG,
- ("rtl_cam_delete_one_entry(): WRITE A0: %x \n", ul_command));
+ ("rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command));
return 0;
}
-//EXPORT_SYMBOL(rtl_cam_delete_one_entry);
+/* EXPORT_SYMBOL(rtl_cam_delete_one_entry); */
void rtl_cam_reset_all_entry(struct ieee80211_hw *hw)
{
@@ -186,7 +184,7 @@ void rtl_cam_reset_all_entry(struct ieee80211_hw *hw)
ul_command = BIT(31) | BIT(30);
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
}
-//EXPORT_SYMBOL(rtl_cam_reset_all_entry);
+/* EXPORT_SYMBOL(rtl_cam_reset_all_entry); */
void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
{
@@ -223,11 +221,11 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(COMP_SEC, DBG_DMESG,
- ("rtl_cam_mark_invalid(): WRITE A4: %x \n", ul_content));
+ ("rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content));
RT_TRACE(COMP_SEC, DBG_DMESG,
- ("rtl_cam_mark_invalid(): WRITE A0: %x \n", ul_command));
+ ("rtl_cam_mark_invalid(): WRITE A0: %x\n", ul_command));
}
-//EXPORT_SYMBOL(rtl_cam_mark_invalid);
+/* EXPORT_SYMBOL(rtl_cam_mark_invalid); */
void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
{
@@ -273,15 +271,15 @@ void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index)
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("rtl_cam_empty_entry(): WRITE A4: %x \n",
+ ("rtl_cam_empty_entry(): WRITE A4: %x\n",
ul_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
- ("rtl_cam_empty_entry(): WRITE A0: %x \n",
+ ("rtl_cam_empty_entry(): WRITE A0: %x\n",
ul_command));
}
}
-//EXPORT_SYMBOL(rtl_cam_empty_entry);
+/* EXPORT_SYMBOL(rtl_cam_empty_entry); */
u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
{
@@ -298,7 +296,7 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
/* Does STA already exist? */
for (i = 4; i < TOTAL_CAM_ENTRY; i++) {
addr = rtlpriv->sec.hwsec_cam_sta_addr[i];
- if(memcmp(addr, sta_addr, ETH_ALEN) == 0)
+ if (memcmp(addr, sta_addr, ETH_ALEN) == 0)
return i;
}
/* Get a free CAM entry. */
@@ -312,11 +310,11 @@ u8 rtl_cam_get_free_entry(struct ieee80211_hw *hw, u8 *sta_addr)
sta_addr, ETH_ALEN);
return entry_idx;
}
- bitmap = bitmap >>1;
+ bitmap = bitmap>>1;
}
return TOTAL_CAM_ENTRY;
}
-//EXPORT_SYMBOL(rtl_cam_get_free_entry);
+/* EXPORT_SYMBOL(rtl_cam_get_free_entry); */
void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
{
@@ -329,7 +327,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
("sta_addr is NULL.\n"));
}
- if ((sta_addr[0]|sta_addr[1]|sta_addr[2]|sta_addr[3]|\
+ if ((sta_addr[0]|sta_addr[1]|sta_addr[2]|sta_addr[3]|
sta_addr[4]|sta_addr[5]) == 0) {
RT_TRACE(COMP_SEC, DBG_EMERG,
("sta_addr is 00:00:00:00:00:00.\n"));
@@ -344,9 +342,8 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
/* Remove from HW Security CAM */
memset(rtlpriv->sec.hwsec_cam_sta_addr[i], 0, ETH_ALEN);
rtlpriv->sec.hwsec_cam_bitmap &= ~(BIT(0) << i);
- printk("&&&&&&&&&del entry %d\n",i);
+ pr_info("&&&&&&&&&del entry %d\n", i);
}
}
- return;
}
-//EXPORT_SYMBOL(rtl_cam_del_entry);
+/* EXPORT_SYMBOL(rtl_cam_del_entry); */
--
2.0.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl
2014-07-13 21:47 [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl Joerg C. Meyer
@ 2014-07-13 22:46 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-07-13 22:46 UTC (permalink / raw)
To: Joerg C. Meyer
Cc: chenweilong, davem, sachin.kamat, dingtianhong, devel, linux-kernel
On Sun, Jul 13, 2014 at 11:47:57PM +0200, Joerg C. Meyer wrote:
> Signed-off-by: Joerg C. Meyer <joerg@meyer.homedns.org>
Your changelog body ended up in the Subject: line (that happens if you
don't put a blank line after the first line in your git commit.
Also, you don't say _what_ issues you fixed here, please be specific.
And if you fix more than one "type" of thing, please break that up into
multiple patches, as you are only allowed to do one-thing-per-patch.
Care to try this again?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-13 22:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-13 21:47 [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl Joerg C. Meyer
2014-07-13 22:46 ` Greg KH
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®