public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/35] staging: rtl8192e: Fix more checkpatch.pl warnings
@ 2015-05-21 15:53 Mateusz Kulikowski
  2015-05-21 15:53 ` [PATCH v4 01/35] staging: rtl8192e: accept const MAC address Mateusz Kulikowski
                   ` (35 more replies)
  0 siblings, 36 replies; 46+ messages in thread
From: Mateusz Kulikowski @ 2015-05-21 15:53 UTC (permalink / raw)
  To: gregkh; +Cc: Mateusz Kulikowski, dan.carpenter, joe, devel, linux-kernel

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


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

end of thread, other threads:[~2015-05-31  3:16 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 15:53 [PATCH v4 00/35] staging: rtl8192e: Fix more checkpatch.pl warnings Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 01/35] staging: rtl8192e: accept const MAC address Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 02/35] staging: rtl8192e: Declare ethernet addresses as __aligned(2) Mateusz Kulikowski
2015-05-25 13:53   ` Dan Carpenter
2015-05-26 20:25     ` Mateusz Kulikowski
2015-05-26 21:04       ` Joe Perches
2015-05-27  0:22       ` Dan Carpenter
2015-05-21 15:53 ` [PATCH v4 03/35] staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 04/35] staging: rtl8192e: Mark unaligned memcpy() Mateusz Kulikowski
2015-05-25 13:55   ` Dan Carpenter
2015-05-21 15:53 ` [PATCH v4 05/35] staging: rtl8192e: Fix DEEP_INDENTATION warning in rtllib_parse_info_param() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 06/35] staging: rtl8192e: Replace memcmp() with ether_addr_equal_unaligned() Mateusz Kulikowski
2015-05-25 14:03   ` Dan Carpenter
2015-05-25 17:37     ` Joe Perches
2015-05-26 19:55       ` Mateusz Kulikowski
2015-05-26 19:24     ` Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 07/35] staging: rtl8192e: Remove rtllib_crypt.[ch] Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 08/35] staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 09/35] staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 10/35] staging: rtl8192e: Remove RTLLIB_DEBUG_WX() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 11/35] staging: rtl8192e: Simplify rtllib_process_probe_response() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 12/35] staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 13/35] staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 14/35] staging: rtl8192e: Remove RTLLIB_DEBUG_QOS() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 15/35] staging: rtl8192e: Remove RTLLIB_DEBUG_MGMT() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 16/35] staging: rtl8192e: Remove RTLLIB_DEBUG_INFO() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 17/35] staging: rtl8192e: Remove RTLLIB_DEBUG() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 18/35] staging: rtl8192e: Remove RTLLIB_DEBUG_DATA() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 19/35] staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry) Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 20/35] staging: rtl8192e: Remove assert() macro Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 21/35] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 22/35] staging: rtl8192e: Fix LONG_LINE warnings Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 23/35] staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param() Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 24/35] staging: rtl8192e: Remove unimplemented iwpriv handlers Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 25/35] staging: rtl8192e: Fix OOM_MESSAGE warnings Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 26/35] staging: rtl8192e: Remove unused rtl_crypto.h Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 27/35] staging: rtl8192e: Replace ?: with max_t Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 28/35] staging: rtl8192e: Replace ?: with min_t Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 29/35] staging: rtl8192e: Replace ?: with max Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 30/35] staging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...) Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 31/35] staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 32/35] staging: rtl8192e: Replace RT_TRACE(COMP_ERR, ...) with netdev_* Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 33/35] staging: rtl8192e: Fix trivial LONG_LINE errors Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 34/35] staging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting Mateusz Kulikowski
2015-05-21 15:53 ` [PATCH v4 35/35] staging: rtl8192e: Fix SPACING error Mateusz Kulikowski
2015-05-31  3:03 ` [PATCH v4 00/35] staging: rtl8192e: Fix more checkpatch.pl warnings Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox