From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbbEIVTu (ORCPT ); Sat, 9 May 2015 17:19:50 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:34618 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbbEIVTs (ORCPT ); Sat, 9 May 2015 17:19:48 -0400 From: Mateusz Kulikowski To: gregkh@linuxfoundation.org Cc: Mateusz Kulikowski , dan.carpenter@oracle.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 00/33] staging: rtl8192e: Fix more checkpatch.pl warnings Date: Sat, 9 May 2015 23:18:48 +0200 Message-Id: <1431206361-13736-1-git-send-email-mateusz.kulikowski@gmail.com> X-Mailer: git-send-email 1.8.4.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (33): 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_proces_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 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 | 18 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 77 +- 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 | 4 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 108 +-- 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 | 85 +- drivers/staging/rtl8192e/rtllib_debug.h | 8 - drivers/staging/rtl8192e/rtllib_module.c | 63 +- drivers/staging/rtl8192e/rtllib_rx.c | 1003 +++++++++++--------- drivers/staging/rtl8192e/rtllib_softmac.c | 167 ++-- drivers/staging/rtl8192e/rtllib_softmac_wx.c | 18 +- drivers/staging/rtl8192e/rtllib_tx.c | 78 +- drivers/staging/rtl8192e/rtllib_wx.c | 53 +- 30 files changed, 1239 insertions(+), 2012 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