public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/34] staging: rtl8192e: Fix more checkpatch.pl warnings
@ 2015-05-31 18:19 Mateusz Kulikowski
  2015-05-31 18:19 ` [PATCH v5 01/34] staging: rtl8192e: accept const MAC address Mateusz Kulikowski
                   ` (35 more replies)
  0 siblings, 36 replies; 38+ messages in thread
From: Mateusz Kulikowski @ 2015-05-31 18:19 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 (9535ebc5e). 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 v4:
- Rework v4 02/35 patch (__aligned(2)): Threw away __aligned(2) as they 
  don't look good. Instead:
  + Reorder local variables (if needed) - they are always aligned
  + Reorder members of unpacked structures if possible
  Alignment was verified with BUG_ON trap in ether_addr_copy and manually 
  with pahole.
- Remove v4 04/35 patch (Mark unaligned memcpy)
- Fix v4 06/35 patch (ether_addr_equal_unaligned()): use ether_addr_equal()
- Rebase to latest staging-next



Notes from v4:

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 (34):
  staging: rtl8192e: accept const MAC address
  staging: rtl8192e: Make ethernet addresses properly aligned
  staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings
  staging: rtl8192e: Fix DEEP_INDENTATION warning in
    rtllib_parse_info_param()
  staging: rtl8192e: Replace memcmp() with ether_addr_equal()
  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     |   58 +-
 .../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       |   80 +-
 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         |  107 +--
 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               | 1011 +++++++++++---------
 drivers/staging/rtl8192e/rtllib_softmac.c          |  165 ++--
 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, 1260 insertions(+), 2011 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] 38+ messages in thread

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

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

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