]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agoMerge 4.1-rc2 into staging-next
Greg Kroah-Hartman [Fri, 8 May 2015 12:38:55 +0000 (14:38 +0200)]
Merge 4.1-rc2 into staging-next

We want the fixes in here to make merges and testing easier.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rts5208: Replace timeval with timespec64
Ksenija Stanojevic [Thu, 30 Apr 2015 17:00:23 +0000 (19:00 +0200)]
Staging: rts5208: Replace timeval with timespec64

struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: don't redefine container_of()
Marti Bolivar [Fri, 1 May 2015 21:10:59 +0000 (17:10 -0400)]
staging: rtl8192u: don't redefine container_of()

This file already includes <linux/kernel.h>.

Signed-off-by: Marti Bolivar <mbolivarmullen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: ad7606_par: Constify platform_device_id
Krzysztof Kozlowski [Fri, 1 May 2015 15:43:22 +0000 (00:43 +0900)]
staging: iio: ad7606_par: Constify platform_device_id

The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers/staging: include <module.h> for modular android tegra_ion code
Paul Gortmaker [Fri, 1 May 2015 01:47:46 +0000 (21:47 -0400)]
drivers/staging: include <module.h> for modular android tegra_ion code

This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hj�nnev�g" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192e: delete local copy of iee80211 reason codes.
Paul Gortmaker [Mon, 27 Apr 2015 05:25:41 +0000 (01:25 -0400)]
rtl8192e: delete local copy of iee80211 reason codes.

This driver has a copy of the standard reason codes from the file
<linux/ieee80211.h> but with slightly different name fields.

Delete the local copy and remap the only two use cases onto the names
used by the global implementation with the same values.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: delete another embedded instance of generic reason codes
Paul Gortmaker [Mon, 27 Apr 2015 05:25:40 +0000 (01:25 -0400)]
rtl8192u: delete another embedded instance of generic reason codes

We have global copies of all these reason codes.  We don't need local
copies.  Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: don't duplicate ieee80211 constants for status/auth/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)]
rtl8192u: don't duplicate ieee80211 constants for status/auth/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: align local ieee80211_wmm_ac_param struct fields with global
Paul Gortmaker [Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)]
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global

The <linux/ieee80211.h> and this local file both have a struct of the
same name.  They also have the same field sizes and generally the
same fields, as can be seen here:

   ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {'
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param {
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit;
   drivers/staging/rtl8192u/ieee80211/ieee80211.h-};
   --
   include/linux/ieee80211.h:struct ieee80211_wmm_ac_param {
   include/linux/ieee80211.h-      u8 aci_aifsn; /* AIFSN, ACM, ACI */
   include/linux/ieee80211.h-      u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
   include/linux/ieee80211.h-      __le16 txop_limit;
   include/linux/ieee80211.h-} __packed;
   ~/git/linux-head$

Here we just align the local field names with the main system one.  Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.

Not that the replacement:

 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
 for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done

implicitly shows that only one of the three fields is currently used.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: promote auth_mode to a full 8 bits
Paul Gortmaker [Mon, 27 Apr 2015 05:25:37 +0000 (01:25 -0400)]
rtl8192u: promote auth_mode to a full 8 bits

Currently LEAP is defined to two locally but the identically named
global constant is 128 in <linux/ieee80211.h>.  In order for us to
switch over to using the global value, we need to adjust the local
storage which is currently not enough to hold the larger value.

This is now consistent with the similar struct used in
drivers/net/wireless/ipw2x00/libipw.h and other drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8192u: don't trample on <linux/ieee80211.h> struct namespace
Paul Gortmaker [Mon, 27 Apr 2015 05:25:36 +0000 (01:25 -0400)]
rtl8192u: don't trample on <linux/ieee80211.h> struct namespace

In order to start reducing the duplicated code/constants/macros in this
driver, we need to include <linux/ieee80211.h> to provide the defacto
versions.  However this driver has structs with the same name as the
ones in the main include, so namespace collision prevents us from doing
step #1.

Since the structs actually differ in their respective fields, we can't
simply delete the local ones without impacting the runtime; a conversion
to use the global ones can be considered at a later date if desired.

Rename the ones here with a vendor specific prefix so that we won't have
the namespace collision, and hence can continue on with the cleanup.

Automated conversion done with:

    for i in `find . -name '*.[ch]'` ; do \
      sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \
    done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8712: don't duplicate ieee80211 constants for status/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:35 +0000 (01:25 -0400)]
rtl8712: don't duplicate ieee80211 constants for status/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agortl8188eu: don't duplicate ieee80211 constants for status/reason
Paul Gortmaker [Mon, 27 Apr 2015 05:25:34 +0000 (01:25 -0400)]
rtl8188eu: don't duplicate ieee80211 constants for status/reason

These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Checkpatch fix: lines longer than 80 columns
Guillaume Brogi [Sun, 26 Apr 2015 12:40:23 +0000 (14:40 +0200)]
staging: vt6655: Checkpatch fix: lines longer than 80 columns

This patch fixes lines longer than 80 columns in mac.c.
5 lines longer than 80 columns remain for the sake of readability.

Signed-off-by: Guillaume Brogi <gui-gui@netcourrier.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: remove unused functions
Sudip Mukherjee [Thu, 23 Apr 2015 13:38:17 +0000 (19:08 +0530)]
staging: sm7xxfb: remove unused functions

removed the smtc_alloc_fb_info() and smtc_free_fb_info() functions which
were not used anymore.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm7xxfb: use framebuffer_alloc and release
Sudip Mukherjee [Thu, 23 Apr 2015 13:38:16 +0000 (19:08 +0530)]
staging: sm7xxfb: use framebuffer_alloc and release

use the standard framebuffer_alloc() and framebuffer_release() instead
of custom defined function. for making that change we had to change a
member of the private structure from a variable to pointer and had to
touch almost all places of the file. since fb was changed into a pointer
so all instance of "sfb->fb." has been changed into "sfb->fb->".
now we will get build warning about smtc_alloc_fb_info() and
smtc_free_fb_info() to be unused which will be removed in the next
patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gsc_hdpi: Remove dead code
Gujulan Elango, Hari Prasath (H.) [Fri, 24 Apr 2015 06:58:11 +0000 (06:58 +0000)]
staging: gsc_hdpi: Remove dead code

This patch removes commented code from this driver.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: Remove redundant initalization of the .owner field
Gujulan Elango, Hari Prasath (H.) [Thu, 23 Apr 2015 13:03:07 +0000 (13:03 +0000)]
staging: fsl-mc: Remove redundant initalization of the .owner field

This patch removes the redundant static initialization of the .owner field from
this driver as it is being overidden by the call from the platform driver register

Signed-off-by: Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750: Fix the Makefile option error
Binbin Zhou [Wed, 22 Apr 2015 03:37:26 +0000 (11:37 +0800)]
staging: sm750: Fix the Makefile option error

The sm750fb's Kconfig option is CONFIG_FB_SM750, not CONFIG_FB_SM7XX.
Thus fix it to make the sm750fb can be built successfully.

Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@@lemote.com>
Acked-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove commented code
Luca Ceresoli [Thu, 16 Apr 2015 21:28:07 +0000 (23:28 +0200)]
staging: rtl8188eu: remove commented code

This code is commented since the initial commit. Probably it is a remnant of
old code.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove useless comment
Luca Ceresoli [Thu, 16 Apr 2015 21:28:06 +0000 (23:28 +0200)]
staging: rtl8188eu: remove useless comment

"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: fix lines over 80 characters
Luca Ceresoli [Thu, 16 Apr 2015 21:28:05 +0000 (23:28 +0200)]
staging: rtl8188eu: fix lines over 80 characters

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: simplify nested ifs
Luca Ceresoli [Thu, 16 Apr 2015 21:28:04 +0000 (23:28 +0200)]
staging: rtl8188eu: simplify nested ifs

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: document enum where it is declared
Luca Ceresoli [Thu, 16 Apr 2015 21:28:03 +0000 (23:28 +0200)]
staging: rtl8188eu: document enum where it is declared

The comment "/* open system */" is repeated verbatim in several places where
dot11AuthAlgrthm_Open is referenced, but not where it is declared.

Move it to be only at its declaration.

This also fixes some "line over 80 characters" checkpatch warnings.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: fix comments over 80 characters
Luca Ceresoli [Thu, 16 Apr 2015 21:28:02 +0000 (23:28 +0200)]
staging: rtl8188eu: fix comments over 80 characters

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: remove duplicated comments
Luca Ceresoli [Thu, 16 Apr 2015 21:28:01 +0000 (23:28 +0200)]
staging: rtl8188eu: remove duplicated comments

There are identical comments near the static variable declaration, around
lines 118~120.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: hal: Remove trailing whitespace in odm.c
Edward Lipinsky [Sat, 18 Apr 2015 16:35:19 +0000 (09:35 -0700)]
Staging: rtl8723au: hal: Remove trailing whitespace in odm.c

This patch fixes the checkpatch.pl error:

ERROR: trailing whitespace

Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dt3155v4l: remove unused including <linux/version.h>
Wei Yongjun [Thu, 16 Apr 2015 13:08:38 +0000 (21:08 +0800)]
staging: dt3155v4l: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: ion_test: unregister the platform device
Phong Tran [Fri, 3 Apr 2015 14:07:02 +0000 (21:07 +0700)]
staging: android: ion_test: unregister the platform device

The driver has to unregister from platform device when it's unloaded

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: ion_test: unregister the misc device
Phong Tran [Fri, 3 Apr 2015 14:07:01 +0000 (21:07 +0700)]
staging: android: ion_test: unregister the misc device

Add the remove() method for deregister from misc device
when it's unloaded.

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:32 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter()

rtl8192_pci_findadapter() was looking for invalid DeviceID (0x8172),
instead of proper for rtl8192e/se devices (0x8192)

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:31 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c

Separate parts of dm_TXPowerTrackingCallback_TSSI() into two new functions:
- dm_tx_update_tssi_weak_signal()
- dm_tx_update_tssi_strong_signal()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param()
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:30 +0000 (23:47 +0200)]
staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param()

- Replace ?: with min_t
- Remove condition that is always true

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix LINE_SPACING warning
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:29 +0000 (23:47 +0200)]
staging: rtl8192e: Fix LINE_SPACING warning

Trivial fix - add newline in dm_InitializeTXPowerTracking_TSSI()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Remove bb tx gains from r8192_priv
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:28 +0000 (23:47 +0200)]
staging: rtl8192e: Remove bb tx gains from r8192_priv

r8192_priv structure had 2 big arrays with tx gain register values:
- cck_txbbgain_table
- cck_txbbgain_ch14_table
- txbbgain_table

This arrays were read-only - filled in driver init code and look
like firmware/chip-specific.

This patch removes them from r8192_priv and puts them in (global) variables.

tx_bb_gain is also flattened - register values are stored in array;
Amplification value can be calculated using dm_tx_bb_gain_idx_to_amplify().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SPACING errors
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:27 +0000 (23:47 +0200)]
staging: rtl8192e: Fix SPACING errors

Fix several SPACING errors to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: remove r819xE_phyreg.h
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:26 +0000 (23:47 +0200)]
staging: rtl8192e: remove r819xE_phyreg.h

This file is not used and its contents are duplicated in r8192E_phyreg.h.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:25 +0000 (23:47 +0200)]
staging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h

Both files have the same contents (with the exception of comments).
One of them will not survive future commits.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix SPACE_BEFORE_TAB warnings
Mateusz Kulikowski [Mon, 13 Apr 2015 21:47:24 +0000 (23:47 +0200)]
staging: rtl8192e: Fix SPACE_BEFORE_TAB warnings

Reformat r8192E_phyreg.h to make checkpatch happy.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Make core functions static
Nickolaus Woodruff [Sun, 12 Apr 2015 16:42:03 +0000 (12:42 -0400)]
staging: rtl8192u: Make core functions static

This patch fixes the following sparse warnings in r8192U_core.c:

  CHECK   drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol
'rtl819x_watchdog_wqcallback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol
'watch_dog_timer_callback' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol
'_rtl8192_up' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol
'rtl8192_close' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol
'rtl8192_restart' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol
'rtl8192_irq_rx_tasklet' was not declared. Should it be static?
drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol
'rtl8192_cancel_deferred_work' was not declared. Should it be static?

Signed-off-by: Nickolaus Woodruff <nickolauswoodruff@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: use a better MODULE_DESCRIPTION()
Ian Abbott [Fri, 1 May 2015 17:04:03 +0000 (18:04 +0100)]
staging: comedi: mite: use a better MODULE_DESCRIPTION()

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: whitespace changes in function declarations
Ian Abbott [Fri, 1 May 2015 17:04:02 +0000 (18:04 +0100)]
staging: comedi: mite.h: whitespace changes in function declarations

Reformat some function declarations to avoid bunching up near column 80.

Also add a blank line after a `struct` definition.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.c: reformat comments
Ian Abbott [Fri, 1 May 2015 17:04:01 +0000 (18:04 +0100)]
staging: comedi: mite.c: reformat comments

Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: reformat some comments
Ian Abbott [Fri, 1 May 2015 17:04:00 +0000 (18:04 +0100)]
staging: comedi: mite.h: reformat some comments

Use the usual style for block comments.  Squash double spaces after
comment opening sequences.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant
Ian Abbott [Fri, 1 May 2015 17:03:59 +0000 (18:03 +0100)]
staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant

"mite.h" relies on a lot of things declared including "../comedi_pci.h",
but doesn't need anything in "../comedi_pci.h" itself.  None of the
Comedi modules that include "mite.h" rely on it to include
"../comedi_pci.h" on their behalf.

Remove the inclusion of "../comedi_pci.h" from "mite.h", and add enough
other includes and (incomplete) `struct` declarations to make it compile
without warnings or errors even when included first in a .c file.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.c: remove commented out USE_KMALLOC
Ian Abbott [Fri, 1 May 2015 17:03:58 +0000 (18:03 +0100)]
staging: comedi: mite.c: remove commented out USE_KMALLOC

The definition of the macro `USE_KMALLOC` is commented out, and nothing
refers to it.  Remove the commented out macro.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite.h: remove PCIMIO_COMPAT
Ian Abbott [Fri, 1 May 2015 17:03:57 +0000 (18:03 +0100)]
staging: comedi: mite.h: remove PCIMIO_COMPAT

The macro `PCIMIO_COMPAT` is defined, but never used.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: move #include <linux/slab.h>
Ian Abbott [Fri, 1 May 2015 17:03:56 +0000 (18:03 +0100)]
staging: comedi: mite: move #include <linux/slab.h>

The Comedi driver modules build fine if the inclusion of <linux/slab.h>
is removed from "mite.h", so remove it.  However, since "mite.c" calls
`kzalloc()`, include <linux/slab.h> there.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove redundant check
Giedrius Statkevičius [Fri, 10 Apr 2015 14:48:55 +0000 (17:48 +0300)]
staging: dgnc: remove redundant check

count doesn't get changed in between identical checks in
dgnc_tty_write() so remove the second check

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove dead code in dgnc_tty_write()
Giedrius Statkevičius [Fri, 10 Apr 2015 14:48:54 +0000 (17:48 +0300)]
staging: dgnc: remove dead code in dgnc_tty_write()

Remove the dead code protected by in_user in dgnc_tty_write() because it
is set to 0 and never changed to 1 thus the code in ifs never gets
executed.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ion: chunk_heap: use pr_debug for heap creation print
Mitchel Humpherys [Fri, 10 Apr 2015 01:10:03 +0000 (18:10 -0700)]
staging: ion: chunk_heap: use pr_debug for heap creation print

We're currently printing to the kernel log at `info' level when we
successfully create the chunk heap, but success messages should be done
at `debug' level.  Fix this.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove redundant !ch checks
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:31 +0000 (02:42 +0300)]
staging: dgnc: remove redundant !ch checks

Remove checks that are redundant since we don't have boards with partially
initialized ->channels[i].

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:30 +0000 (02:42 +0300)]
staging: dgnc: don't forget to check if ->channels[i] is NULL in dgnc_tty_uninit()

Add a check if ->channels[i] is NULL because a NULL pointer may be dereferenced
in case one of the allocations failed

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: clean up allocation of ->channels[i]
Giedrius Statkevičius [Thu, 9 Apr 2015 23:42:29 +0000 (02:42 +0300)]
staging: dgnc: clean up allocation of ->channels[i]

Check if kzalloc fails in dgnc_tty_init() and if it does then free all
previously allocated ->channels[i] and set them to NULL. This makes the code
less error/bug prone because instead of needing programmers attention to add
checks everywhere we do that in one place. Also, remove a bogus comment and
check in the same loop because ->channels[i] isn't allocated anywhere else.
Finally, remove a unnecessary check if ->channels[i] is NULL in the next loop
because it can't be.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: Fix spelling error in TODO
Robin Karlsson [Thu, 9 Apr 2015 22:12:16 +0000 (00:12 +0200)]
Staging: sm750fb: Fix spelling error in TODO

Fixed spelling error in TODO.

Signed-off-by: Robin Karlsson <s.r.karlsson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: Remove space after parenthesis
Amitoj Kaur Chawla [Wed, 8 Apr 2015 16:55:06 +0000 (22:25 +0530)]
Staging: sm750fb: Remove space after parenthesis

Fixed error by removing space after open parenthesis '('
Problem found using checkpatch.pl
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: remove some dead code from dgnc_tty.c
Giedrius Statkevičius [Wed, 8 Apr 2015 13:37:15 +0000 (16:37 +0300)]
staging: dgnc: remove some dead code from dgnc_tty.c

Remove some dead code that will never be executed or which serves no purpose

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fixed multiple spelling errors.
Carlos E. Garcia [Fri, 24 Apr 2015 13:40:42 +0000 (09:40 -0400)]
Staging: fixed multiple spelling errors.

Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: fbtft: fbtft-bus.c: Fix different address space warning on I/O mem
Tolga Ceylan [Sat, 2 May 2015 06:40:35 +0000 (23:40 -0700)]
drivers: staging: fbtft: fbtft-bus.c: Fix different address space warning on I/O mem

To fix sparse warning of incorrect type in assignment
(different address space), added annotation __iomem to
vmem8 and modified direct reads with ioread8().

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/lustre/ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node
Julia Lawall [Sun, 3 May 2015 13:21:44 +0000 (15:21 +0200)]
staging/lustre/ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node

Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node.  The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).

// <smpl>
@@ expression ptr,cptab,cpt,size; @@
- OBD_CPT_ALLOC(ptr, cptab, cpt, size)
+ ptr = kzalloc_node(size, GFP_NOFS, cfs_cpt_spread_node(cptab, cpt))
// </smpl>

Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case.  Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: lustre: lustre: Replace OBD_CPT_ALLOC etc by kzalloc_node
Julia Lawall [Sun, 3 May 2015 13:21:43 +0000 (15:21 +0200)]
drivers: staging: lustre: lustre: Replace OBD_CPT_ALLOC etc by kzalloc_node

Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node.  The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).

// <smpl>
@@ expression ptr,cptab,cpt,size; @@
- OBD_CPT_ALLOC(ptr, cptab, cpt, size)
+ ptr = kzalloc_node(size, GFP_NOFS, cfs_cpt_spread_node(cptab, cpt))
// </smpl>

Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case.  Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node
Julia Lawall [Sun, 3 May 2015 13:21:42 +0000 (15:21 +0200)]
staging: lustre: ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node

Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by
corresponding calls to kzalloc_node.  The semantic patch for the
OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/).

// <smpl>
@@ expression ptr,cptab,cpt,size; @@
- OBD_CPT_ALLOC(ptr, cptab, cpt, size)
+ ptr = kzalloc_node(size, GFP_NOFS, cfs_cpt_spread_node(cptab, cpt))
// </smpl>

Note that the original OBD macros would check if the cptab argument was
NULL and fall back on kzalloc in that case.  Oleg Drokin argues that this
test is not needed because the code containing these calls is only invoked
after initialization has been completed, in which case the possible cptab
arguments are not NULL.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: service: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:47 +0000 (21:37 +0200)]
staging: lustre: ptlrpc: service: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);

@@ expression ptr; @@

- if (ptr != NULL) {
  kfree(ptr);
  ptr = NULL;
- }
// </smpl>

In the first case, specific labels are introduced to free only what is needed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: sec_plain: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:48 +0000 (21:37 +0200)]
staging: lustre: ptlrpc: sec_plain: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: ptlrpc: lproc_ptlrpc: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:49 +0000 (21:37 +0200)]
Staging: lustre: ptlrpc: lproc_ptlrpc: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

In the first case, the only cleanup needed is the unlock, so jump to that
directly.

Likewise, in the first two failure cases of ptlrpc_lprocfs_nrs_seq_write,
no cleanup is needed, so just drop the goto and return directly.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: osc: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:50 +0000 (21:37 +0200)]
Staging: lustre: osc: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdecho: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:51 +0000 (21:37 +0200)]
staging: lustre: obdecho: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: obd_mount: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:52 +0000 (21:37 +0200)]
staging: lustre: obdclass: obd_mount: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);

@@ expression ptr; @@

- if (ptr != NULL) {
  kfree(ptr);
  ptr = NULL;
- }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: obd_config: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:53 +0000 (21:37 +0200)]
staging: lustre: obdclass: obd_config: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that identifies this issue is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

The first part of the patch introduces new labels to avoid unnecessary
calls to kfree.  In addition, lprof->lp_md is always null in the cleanup
code at the end of the function, so that kfree is just dropped.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: llog: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:54 +0000 (21:37 +0200)]
staging: lustre: obdclass: llog: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: genops: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:55 +0000 (21:37 +0200)]
staging: lustre: obdclass: genops: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: mdc: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:56 +0000 (21:37 +0200)]
staging: lustre: mdc: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lov: lov_dev: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:57 +0000 (21:37 +0200)]
staging: lustre: lov: lov_dev: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lmv: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:58 +0000 (21:37 +0200)]
staging: lustre: lmv: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: statahead: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:37:59 +0000 (21:37 +0200)]
staging: lustre: llite: statahead: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: llite: llite_lib: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:00 +0000 (21:38 +0200)]
Staging: lustre: llite: llite_lib: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: llite: file: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:01 +0000 (21:38 +0200)]
Staging: lustre: llite: file: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that finds this issue is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

In the first case, llss can never be null at the point of the kfree anyway.

In the second set of changes, the gotos are either eliminated, when no
freeing is needed (hss failure case), or rewritten so that there is no call
to free on data that has not yet been allocated (free_hss goto case).
There is no goto at which attr is not null, so the out label is simply
dropped.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: llite: dir: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:02 +0000 (21:38 +0200)]
Staging: lustre: llite: dir: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

This patch additionally simplifies one case where the free, and thus the
jump to the end of the function, is not needed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: libcfs: linux: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:03 +0000 (21:38 +0200)]
staging: lustre: libcfs: linux: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL) {
  kfree(ptr);
  ptr = NULL;
- }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: ldlm_resource: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:04 +0000 (21:38 +0200)]
staging: lustre: ldlm: ldlm_resource: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL) {
  kfree(ptr);
  ptr = NULL;
- }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: ldlm_lock: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:05 +0000 (21:38 +0200)]
staging: lustre: ldlm: ldlm_lock: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: ldlm_lib: remove unneeded null test before free
Julia Lawall [Fri, 1 May 2015 19:38:06 +0000 (21:38 +0200)]
staging: lustre: ldlm: ldlm_lib: remove unneeded null test before free

Kfree can cope with a null argument, so drop null tests.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr; @@

- if (ptr != NULL)
  kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:12 +0000 (17:51 +0200)]
staging: lustre: ptlrpc: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: osc: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:13 +0000 (17:51 +0200)]
staging: lustre: osc: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdecho: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:14 +0000 (17:51 +0200)]
staging: lustre: obdecho: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:15 +0000 (17:51 +0200)]
staging: lustre: obdclass: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: mgc: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:16 +0000 (17:51 +0200)]
staging: lustre: mgc: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: mdc: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:17 +0000 (17:51 +0200)]
staging: lustre: mdc: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lmv: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:18 +0000 (17:51 +0200)]
staging: lustre: lmv: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:19 +0000 (17:51 +0200)]
staging: lustre: ldlm: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:20 +0000 (17:51 +0200)]
staging: lustre: lclient: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: fld: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:21 +0000 (17:51 +0200)]
Staging: lustre: fld: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fid: Use kzalloc and kfree
Julia Lawall [Fri, 1 May 2015 15:51:22 +0000 (17:51 +0200)]
staging: lustre: fid: Use kzalloc and kfree

Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.

A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoLinux 4.1-rc2
Linus Torvalds [Mon, 4 May 2015 02:22:23 +0000 (19:22 -0700)]
Linux 4.1-rc2

9 years agoMerge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Mon, 4 May 2015 01:23:53 +0000 (18:23 -0700)]
Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Some miscellaneous bug fixes and some final on-disk and ABI changes
  for ext4 encryption which provide better security and performance"

* tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix growing of tiny filesystems
  ext4: move check under lock scope to close a race.
  ext4: fix data corruption caused by unwritten and delayed extents
  ext4 crypto: remove duplicated encryption mode definitions
  ext4 crypto: do not select from EXT4_FS_ENCRYPTION
  ext4 crypto: add padding to filenames before encrypting
  ext4 crypto: simplify and speed up filename encryption

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 4 May 2015 01:15:48 +0000 (18:15 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "One intel fix, one rockchip fix, and a bunch of radeon fixes for some
  regressions from audio rework and vm stability"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915/chv: Implement WaDisableShadowRegForCpd
  drm/radeon: fix userptr return value checking (v2)
  drm/radeon: check new address before removing old one
  drm/radeon: reset BOs address after clearing it.
  drm/radeon: fix lockup when BOs aren't part of the VM on release
  drm/radeon: add SI DPM quirk for Sapphire R9 270 Dual-X 2G GDDR5
  drm/radeon: adjust pll when audio is not enabled
  drm/radeon: only enable audio streams if the monitor supports it
  drm/radeon: only mark audio as connected if the monitor supports it (v3)
  drm/radeon/audio: don't enable packets until the end
  drm/radeon: drop dce6_dp_enable
  drm/radeon: fix ordering of AVI packet setup
  drm/radeon: Use drm_calloc_ab for CS relocs
  drm/rockchip: fix error check when getting irq
  MAINTAINERS: add entry for Rockchip drm drivers

9 years agoMerge tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Sun, 3 May 2015 22:56:47 +0000 (08:56 +1000)]
Merge tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes

Just a single intel fix
* tag 'drm-intel-fixes-2015-04-30' of git://anongit.freedesktop.org/drm-intel:
  drm/i915/chv: Implement WaDisableShadowRegForCpd

9 years agoMerge branch 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip into...
Dave Airlie [Sun, 3 May 2015 22:56:27 +0000 (08:56 +1000)]
Merge branch 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes

one fix and maintainers update
* 'drm-next0420' of https://github.com/markyzq/kernel-drm-rockchip:
  drm/rockchip: fix error check when getting irq
  MAINTAINERS: add entry for Rockchip drm drivers

9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 3 May 2015 20:22:32 +0000 (13:22 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is three logical fixes (as 5 patches).

  The 3ware class of drivers were causing an oops with multiqueue by
  tearing down the command mappings after completing the command (where
  the variables in the command used to tear down the mapping were
  no-longer valid).  There's also a fix for the qnap iscsi target which
  was choking on us sending it commands that were too long and a fix for
  the reworked aha1542 allocating GFP_KERNEL under a lock"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  3w-9xxx: fix command completion race
  3w-xxxx: fix command completion race
  3w-sas: fix command completion race
  aha1542: Allocate memory before taking a lock
  SCSI: add 1024 max sectors black list flag

9 years agoMerge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 3 May 2015 17:49:04 +0000 (10:49 -0700)]
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave dmaengine fixes from Vinod Koul:
 "Here are the fixes in dmaengine subsystem for rc2:

   - privatecnt fix for slave dma request API by Christopher

   - warn fix for PM ifdef in usb-dmac by Geert

   - fix hardware dependency for xgene by Jean"

* 'next' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: increment privatecnt when using dma_get_any_slave_channel
  dmaengine: xgene: Set hardware dependency
  dmaengine: usb-dmac: Protect PM-only functions to kill warning