[PATCH v4 00/35] staging: rtl8192e: Fix more checkpatch.pl warnings
From: Mateusz Kulikowski
Date: Thu May 21 2015 - 11:54:10 EST
Updated series of patches for rtl8192.
Rebased to latest staging-next (936a0cd52aa). Built and target tested
(tests like for v3 + download of 1Mb file over http).
Side note: quality/performance of this driver is still poor - it drops
a lot of packets (at least when talking to 802.11N/ 2.4G / WPA2 network).
Changes from v3:
- Inserted #1 patch (accept const MAC address) - needed for review-fixes
- #2 reworked as suggested by Joe: where possible, broadcast/zero addresses
are 'static const', re-indent MAC address (address in one line),
use is_zero_ether_addr() instead of memcmp(). I left __aligned() in
most places though.
- #3 updated comment to explicitly state that code was tested
- #4 was left as is - I will post ether_addr_copy_unaligned later on
- #5 patch was re-done - most of original formatting is left intact except where
change was obvious/needed
- #8 Fixed indentation
- #21 Use netdev_dbg in few more places, drop function names in log messages
- #29 Removed condition that is always false
- #35 Fix another SPACING error that was not there when v3 was created
Notes from v3:
This series applies some of review comments by Dan (thanks!) as well as does
further cleanups.
Further series will probably focus more on changing driver architecture into
something that may get accepted into -wireless.
This series should apply cleanly to staging-testing(7192a5dd5)
branches.
One changeset - #14 will not apply cleanly if the following patch will be applied:
[PATCH v2] staging: rtl8192e: Change cpu_to_le16 to le16_to_cpu
It should apply via 3-way merge (only one line of context is different)
Target tested on netbook with rtl8192e card vs Linus master (1a9f064f):
- Module load/unload
- Interface up/down
- Network scanning
- Connect to WPA2 network + ping route
I've found one bug in the driver (it happens also on master) - rtllib doesn't
handle rmmod of active (WPA) r8192e_pci - module refcount drops below 0.
Built-tested for each patch in series on staging-testing
New changes (patch numbers are valid for v3):
- #6 Removal of rtllib_crypt.[ch] - unused files are bad
- #10 Simplification of rtllib_proces_probe_response - fixing LONG_LINES in
process
- #24 Fix new checkpatch warnings (OOM_MESSAGE)
- #25 Remove another unused file (rtl_crypto.h)
- #26-#28 Replace ?: expression with min/max macros
- #29 Remove unused debug messages
- #30 Simplify/Optimize rtl8192_phy_checkBBAndRF()
- #31 Replace RT_TRACE(COMP_ERR,...) with netdev_* errors - this are error
messages that were (and should be) displayed, with this patch it will be
clearly visible where they belong (+log levels were changed to more
appropriate).
- #32 Trivial reindentations
- #33 Simplify awkward WoL reporting in rtl8192E_suspend()
What happened to v2 changesets (patch numbers are valid for v2 unless noted):
- Patches 1-9 were already applied by Greg - Thanks!
- Patch 10 was split and reworked into v3 patches: 1, 2, 3
- Patches 11, 12 were cherry-picked into v3 patches 4, 5
- Patch 13 became a series of patches removing whole RTLLIB_* debug "system"
(v3 patches 7-9, 11-19, 20). Where possible netdev_* was used, but in some
cases it would look awkward so I left with pr_*
- Patch 14 was cherry-picked into v3 patch 21 (Again - thanks for patience Dan)
- Patches 15, 17, 18, 19, 20 were thrown out - they fix some LONG_LINE
warnings, but it's not worth it as readability of code goes down -
I will remove remaining warnings while refactoring the driver
- Patch 16 was cherry-picked into v3 patch 22
- Patch 21 was cherry-picked into v3 patch 23
Notes from v2:
New cleanup patchset for rtl8192e. It fixes (mostly) checkpatch.pl warnings.
When applied, checkpatch.pl warning count drops to 34 (from 1111).
It should apply cleanly to staging-next/testing (c610f7f7) branches.
Series was smoke tested on rtl8192e card vs staging-next:
- Module load/unload
- Interface up/down
Most of changes are related to checkpatch.pl with the exception of
- bugfix - staging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()
This is clearly (in my opinion) typo - I checked two rtl8192e cards from
different vendors and both had DeviceID == 0x8192.
- Removal of unimplemented/unused iwpriv handlers - they just give false sense
of hope to iwpriv user
Additional changes in v2:
- Fix (most) LONG_LINE warnings
- Replace memcpy() with custom macro - later __aligned(2) will be added to
structures (where possible) - I prefer not to do this change before I have
working hardware. Unfortunantely these cards are grumpy and refuse to enable
radio in PC mPCIe slot (even after soldering W_DISABLE override and using two
different antenna sets)
- Fix (most) remaining PREFER_PR_LEVEL warnings
Notes from v1:
This series of patches fixes another set of checkpatch.pl warnings.
Most of the patches are trivial, with the exception of #8, #7 and #5;
Driver logic should not be affected.
Some of the patches cause LONG_LINE warnings, but fix has to wait until
I do more driver refactorings (It's hard to keep line length when variable
names have 30 characters).
Mateusz Kulikowski (35):
staging: rtl8192e: accept const MAC address
staging: rtl8192e: Declare ethernet addresses as __aligned(2)
staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings
staging: rtl8192e: Mark unaligned memcpy()
staging: rtl8192e: Fix DEEP_INDENTATION warning in
rtllib_parse_info_param()
staging: rtl8192e: Replace memcmp() with ether_addr_equal_unaligned()
staging: rtl8192e: Remove rtllib_crypt.[ch]
staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*()
staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING()
staging: rtl8192e: Remove RTLLIB_DEBUG_WX()
staging: rtl8192e: Simplify rtllib_process_probe_response()
staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN()
staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)()
staging: rtl8192e: Remove RTLLIB_DEBUG_QOS()
staging: rtl8192e: Remove RTLLIB_DEBUG_MGMT()
staging: rtl8192e: Remove RTLLIB_DEBUG_INFO()
staging: rtl8192e: Remove RTLLIB_DEBUG()
staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc
entry)
staging: rtl8192e: Remove assert() macro
staging: rtl8192e: Fix PREFER_PR_LEVEL warnings
staging: rtl8192e: Fix LONG_LINE warnings
staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param()
staging: rtl8192e: Remove unimplemented iwpriv handlers
staging: rtl8192e: Fix OOM_MESSAGE warnings
staging: rtl8192e: Remove unused rtl_crypto.h
staging: rtl8192e: Replace ?: with max_t
staging: rtl8192e: Replace ?: with min_t
staging: rtl8192e: Replace ?: with max
staging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...)
staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC
staging: rtl8192e: Replace RT_TRACE(COMP_ERR, ...) with netdev_*
staging: rtl8192e: Fix trivial LONG_LINE errors
staging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting
staging: rtl8192e: Fix SPACING error
drivers/staging/rtl8192e/dot11d.h | 4 +-
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 25 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 59 +-
.../staging/rtl8192e/rtl8192e/r8192E_firmware.c | 43 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 116 ++-
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 22 +-
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 4 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 82 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_crypto.h | 382 --------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 274 ++++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 109 +--
drivers/staging/rtl8192e/rtl819x_BAProc.c | 149 ++-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 54 +-
drivers/staging/rtl8192e/rtl819x_Qos.h | 4 +-
drivers/staging/rtl8192e/rtl819x_TS.h | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 75 +-
drivers/staging/rtl8192e/rtllib.h | 86 +-
drivers/staging/rtl8192e/rtllib_crypt.c | 254 -----
drivers/staging/rtl8192e/rtllib_crypt.h | 34 -
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 2 +-
drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 89 +-
drivers/staging/rtl8192e/rtllib_debug.h | 8 -
drivers/staging/rtl8192e/rtllib_module.c | 63 +-
drivers/staging/rtl8192e/rtllib_rx.c | 1031 +++++++++++---------
drivers/staging/rtl8192e/rtllib_softmac.c | 172 ++--
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 18 +-
drivers/staging/rtl8192e/rtllib_tx.c | 78 +-
drivers/staging/rtl8192e/rtllib_wx.c | 51 +-
31 files changed, 1283 insertions(+), 2020 deletions(-)
delete mode 100644 drivers/staging/rtl8192e/rtl8192e/rtl_crypto.h
delete mode 100644 drivers/staging/rtl8192e/rtllib_crypt.c
delete mode 100644 drivers/staging/rtl8192e/rtllib_crypt.h
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/