GitHub/LineageOS/android_kernel_motorola_exynos9610.git
11 years agostaging: rtl8712: re-use native mac_pton() helper
Andy Shevchenko [Fri, 13 Sep 2013 14:59:43 +0000 (17:59 +0300)]
staging: rtl8712: re-use native mac_pton() helper

There is a nice helper to parse MAC. Let's use it and remove custom
implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: Fix typo in staging/dwc2
Masanari Iida [Fri, 13 Sep 2013 14:34:36 +0000 (23:34 +0900)]
staging: dwc2: Fix typo in staging/dwc2

Correct spelling typo in comments

Singend-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: silicom: introduce bp_dev_get_idx_bsf() and use it
Andy Shevchenko [Fri, 13 Sep 2013 06:44:31 +0000 (09:44 +0300)]
staging: silicom: introduce bp_dev_get_idx_bsf() and use it

There are two places where duplicate code is located. Moreover, there is a
custom implementation of the sscanf() functionality. This patch makes code
quite simplier and cleaner.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: remove unnecessary braces
Jon Bernard [Fri, 13 Sep 2013 17:29:30 +0000 (13:29 -0400)]
Staging: lustre: remove unnecessary braces

This is a patch to the lvfs_lib.c file that removes unnecessary braces from an
if statement found by the checkpatch.pl tool.

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: fix formatting mistake in Kconfig
Jon Bernard [Wed, 11 Sep 2013 20:41:53 +0000 (16:41 -0400)]
Staging: lustre: fix formatting mistake in Kconfig

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: fix a brace coding style issue in fsfilt.c
Jon Bernard [Fri, 13 Sep 2013 00:04:22 +0000 (20:04 -0400)]
Staging: lustre: fix a brace coding style issue in fsfilt.c

This is a patch to the fsfilt.c file that fixes up a brace warning found by the
checkpatch.pl tool.

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: fix assignment in if condition in fsfilt.c
Jon Bernard [Fri, 13 Sep 2013 00:04:33 +0000 (20:04 -0400)]
Staging: lustre: fix assignment in if condition in fsfilt.c

This is a patch to the fsfilt.c file that fixes up three assignment in if
condition errors found by the checkpatch.pl tool.

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: kobjects.c: Use correct values when changing voice.
Christopher Brannon [Wed, 11 Sep 2013 17:05:27 +0000 (10:05 -0700)]
staging: speakup: kobjects.c: Use correct values when changing voice.

When a new voice is selected, we set volume and pitch appropriate for
the voice.  We need to use the numeric index corresponding to the
voice when indexing into the volume and pitch tables, rather than
the raw user input that was used to select the voice.
Note that using the raw input can also lead to an invalid memory read
in the case of invalid or malicious user input.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/speakup/kobjects.c: Code improvement.
Raphael S.Carvalho [Mon, 2 Sep 2013 22:20:18 +0000 (19:20 -0300)]
staging/speakup/kobjects.c: Code improvement.

Well, there is no need to use strcmp since we can make a test of similar semantic by using the var_id field of param.
I moved the test into the VAR_NUM:VAR_TIME case since VAR_STRING will never be "voice".

spk_xlate isn't used anymore (in line 628), then there is no difference between using cp and buf in VAR_STRING case.
Besides, buf is a const char and those changes remove one uneeded line.

I created the function spk_reset_default_value because it clarifies the code and allows code reusing.

Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: Add dependencies for ISA card drivers
Ben Hutchings [Sun, 1 Sep 2013 18:55:58 +0000 (19:55 +0100)]
Staging: speakup: Add dependencies for ISA card drivers

Several speakup drivers are for ISA cards and are useless on systems
without ISA slots.  Make them depend on ISA || COMPILE_TEST.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in rtl8188eu/core/rtw_xmit.c
Larry Finger [Wed, 4 Sep 2013 20:56:11 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in rtl8188eu/core/rtw_xmit.c

Smatch reports the following:
  CHECK   drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/core/rtw_xmit.c:1570 dequeue_one_xmitframe() info: ignoring unreachable code.

This code uses a while construction that has an unconditional break. This part
of the code was restructured to use an if statement and the dead code was
removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warnings in core/rtw_recv.c
Larry Finger [Wed, 4 Sep 2013 20:56:10 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warnings in core/rtw_recv.c

Smatch reports the following:
drivers/staging/rtl8188eu/core/rtw_recv.c:211 rtw_free_recvframe() warn: variable dereferenced before check 'precvframe' (see line 207)
drivers/staging/rtl8188eu/core/rtw_recv.c:1803 amsdu_to_msdu() warn: variable dereferenced before check 'sub_skb' (see line 1784)

The code was rearranged to eliminate the dereference before the check.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in hal/HalPhyRf_8188e.c
Larry Finger [Wed, 4 Sep 2013 20:56:09 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in hal/HalPhyRf_8188e.c

Smatch reported the following warning:
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c:1876 PHY_APCalibrate_8188E() info: ignoring unreachable code.

Once the unreachable code was removed, the entire routine was removed, which
led to the warning that phy_APCalibrate_8188E() was not used. It was also deleted
along with some unused defines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in core/rtw_wlan_util.c
Larry Finger [Wed, 4 Sep 2013 20:56:08 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in core/rtw_wlan_util.c

A misplaced _func_exit_ macro leads to the following smatch warning:
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1105 rtw_check_bcn_info() info: ignoring unreachable code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warnings in odm_HWConfig.c
Larry Finger [Wed, 4 Sep 2013 20:56:06 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warnings in odm_HWConfig.c

Smatch reports the following warnings:
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:302 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxPwr' 2 <= 2
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:319 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxMIMOSignalStrength' 2 <= 2
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxSNR' 2 <= 2
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2
drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'dm_odm->PhyDbgInfo.RxSNRdB' 2 <= 2

These warnings are again due to the number of radio patchs being increased
to 3 without adjustments to the array sizes.

A duplicate and redundant definition was also removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warnings in core/rtw_xmit.c
Larry Finger [Wed, 4 Sep 2013 20:56:05 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warnings in core/rtw_xmit.c

Smatch reports the following:
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:1500 hal_EfusePgPacketWriteData() info: ignoring unreachable code.
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2188 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2190 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2196 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2197 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14

The first of these is trivial. The rest are due to an off-by-one error
in a loop over the channels.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warnings for hal/rtl8188e_phycfg.c
Larry Finger [Wed, 4 Sep 2013 20:56:04 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warnings for hal/rtl8188e_phycfg.c

Smatch reports the following:
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:857 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:864 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2

The array in question is large enough to handle RADIO_PATH_X, where X is A or B.
The lines in question refer to RADIO_PATH_C, which is defined as 2.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in os_dep/ioctl_linux.c
Larry Finger [Wed, 4 Sep 2013 20:56:03 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in os_dep/ioctl_linux.c

Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4891 set_group_key() warn: missing break? reassigning 'keylen'

As it suggests, there is a missing break statement.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warnings in os_dep/ioctl_linux.c
Larry Finger [Wed, 4 Sep 2013 20:56:02 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warnings in os_dep/ioctl_linux.c

Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:941 rtw_wx_set_pmkid() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:1042 rtw_wx_get_range() warn: assigning (-78) to unsigned variable 'range->avg_qual.level'
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:2629 rtw_get_ap_info() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4043 rtw_rereg_nd_name() warn: add some parenthesis here?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4052 rtw_rereg_nd_name() warn: add some parenthesis here?

The warnings calling for adding parentheses all have "if (!memcmp() == true)" and
are fixed by removing the "==true" part.

The warning where a negative number is stored in an unsigned variable is fixed
by biasing the result by 256.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in hal/usb_ops_linux.c
Larry Finger [Wed, 4 Sep 2013 20:56:01 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in hal/usb_ops_linux.c

Smatch reports the following warning:
drivers/staging/rtl8188eu/hal/usb_ops_linux.c:614 usb_read_port() warn: variable dereferenced before check 'precvbuf' (see line 611)

Fixing this particular warning required some refactoring of the code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in os_dep/osdep_service.c
Larry Finger [Wed, 4 Sep 2013 20:56:00 +0000 (15:56 -0500)]
staging: r8188eu: Fix smatch warning in os_dep/osdep_service.c

Smatch reports the following warning:
drivers/staging/rtl8188eu/os_dep/osdep_service.c:634 rtw_change_ifname() warn: variable dereferenced before check 'padapter' (see line 630)

The dereference in question is deferred until the validity of 'padapter' is verified.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix a smatch warnings in core/rtw_recv.c
Larry Finger [Wed, 4 Sep 2013 20:55:59 +0000 (15:55 -0500)]
staging: r8188eu: Fix a smatch warnings in core/rtw_recv.c

Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/recv_linux.c:227 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 139)

The test in this location is removed and added in the free routine.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix some smatch errors in core/rtw_efuse.c
Larry Finger [Wed, 4 Sep 2013 20:55:58 +0000 (15:55 -0500)]
staging: r8188eu: Fix some smatch errors in core/rtw_efuse.c

Smatch reports the following situations:

drivers/staging/rtl8188eu/core/rtw_efuse.c:589 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:598 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:681 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8
drivers/staging/rtl8188eu/core/rtw_efuse.c:690 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8

In these cases, it is possible to write beyond the end of an array.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Remove unreachable code in core/rtw_br_ext.c
Larry Finger [Wed, 4 Sep 2013 20:55:57 +0000 (15:55 -0500)]
staging: r8188eu: Remove unreachable code in core/rtw_br_ext.c

In this file, a "return -1" immediately follows a "return 0". Remove the
second line.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
Larry Finger [Wed, 4 Sep 2013 20:55:56 +0000 (15:55 -0500)]
staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.

Smatch shows the following warning:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code.

The cause is a module exit tracing statement after a return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch warning in os_dep/usb_intf.c
Larry Finger [Wed, 4 Sep 2013 20:55:55 +0000 (15:55 -0500)]
staging: r8188eu: Fix smatch warning in os_dep/usb_intf.c

Smatch reports the following warning:

  CHECK   drivers/staging/rtl8188eu/os_dep/usb_intf.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c:740 rtw_usb_if1_init() info: redundant null check on padapter->HalData calling kfree()

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c
Larry Finger [Wed, 4 Sep 2013 20:55:54 +0000 (15:55 -0500)]
staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c

Smatch reports the following warning:
"drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8328 mlme_evt_hdl()
 error: buffer overflow 'wlanevents' 24 <= 24"

  8321          /*  checking if event code is valid */
  8322          if (evt_code >= MAX_C2HEVT) {
                    ^^^^^^^^^^^^^^^^^^^^^^
  8323                  RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nEvent Code(%d) mismatch!\n", evt_code));
  8324                  goto _abort_event_;
  8325          }
  8326
  8327          /*  checking if event size match the event parm size */
  8328          if ((wlanevents[evt_code].parmsize != 0) &&
                     ^^^^^^^^^^^^^^^^^^^^
  8329              (wlanevents[evt_code].parmsize != evt_sz)) {
  8330                  RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
  8331                           ("\nEvent(%d) Parm Size mismatch (%d vs %d)!\n",
  8332                           evt_code, wlanevents[evt_code].parmsize, evt_sz));
  8333                  goto _abort_event_;
  8334          }

This warning results because the number of items in "enum rtw_c2h_event",
which determines the value of MAX_C2HEVT, is one more than in "struct wlanevents".
Adding an extra dummy event to the latter fixes the problem.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
Larry Finger [Wed, 4 Sep 2013 20:55:53 +0000 (15:55 -0500)]
staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c

Smatch reports the following warning:
"drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2008
Hal_ReadPowerValueFromPROM_8188E()
 error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5"

drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
  2005                          /* 2.4G default value */
  2006                          for (group = 0; group < MAX_CHNL_GROUP_24G; group++) {
  2007                                  pwrInfo24G->IndexCCK_Base[rfPath][group] =      EEPROM_DEFAULT_24G_INDEX;
  2008                                  pwrInfo24G->IndexBW40_Base[rfPath][group] =     EEPROM_DEFAULT_24G_INDEX;

The reason is that IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements, but
IndexBW40_Base is smaller by 1. Make them both have MAX_CHNL_GROUP_24G
elements.

Reported by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: Remove commented out block with compare_ether_addr
Joe Perches [Sun, 1 Sep 2013 22:41:00 +0000 (15:41 -0700)]
staging: vt6655: Remove commented out block with compare_ether_addr

compare_ether_addr is being removed so remove
even the commented out code referring to it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: Convert uses of compare_ether_addr to ether_addr_equal
Joe Perches [Sun, 1 Sep 2013 19:15:47 +0000 (12:15 -0700)]
Staging: Convert uses of compare_ether_addr to ether_addr_equal

Preliminary to removing compare_ether_addr altogether:

Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Additionally:

Used is_zero_ether_addr, removed now unused variable
Converted uses of &foo[0] to foo

Done via cocci script: (and a little typing)

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
- !compare_ether_addr(a, b)
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- compare_ether_addr(a, b)
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- !ether_addr_equal(a, b) == 0
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- !ether_addr_equal(a, b) != 0
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- ether_addr_equal(a, b) == 0
+ !ether_addr_equal(a, b)

@@
expression a,b;
@@
- ether_addr_equal(a, b) != 0
+ ether_addr_equal(a, b)

@@
expression a,b;
@@
- !!ether_addr_equal(a, b)
+ ether_addr_equal(a, b)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: wlan-ng: cfg80211.c: replaced printk() with netdev_warn()
Avinash Kumar [Fri, 6 Sep 2013 16:14:51 +0000 (21:44 +0530)]
staging: wlan-ng: cfg80211.c: replaced printk() with netdev_warn()

replaced printk functions used for debug messages by respective netdev_warn
netdev_err functions.

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: wlan-ng: hfa384x_usb.c: replaced printk() debugs with netdev_warn()/netdev_err()
Avinash Kumar [Fri, 6 Sep 2013 16:51:49 +0000 (22:21 +0530)]
staging: wlan-ng: hfa384x_usb.c: replaced printk() debugs with netdev_warn()/netdev_err()

replaced the printk debug lines with respective netdev_warn()/netdev_err()

Signed-off-by: Avinash kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: fwserial: wrap a line that exceeds 80 characters
Jon Bernard [Tue, 10 Sep 2013 22:00:01 +0000 (18:00 -0400)]
Staging: fwserial: wrap a line that exceeds 80 characters

This is a patch to fwserial.c that wraps a line which previously exceeded the 80
character limit warning found by checkpatch.pl.  This driver is now warning and
error free, according to checkpatch.pl

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: nvm: fixed space prohibition
Aldo Iljazi [Tue, 10 Sep 2013 15:44:39 +0000 (18:44 +0300)]
Staging: bcm: nvm: fixed space prohibition

Fixed space prohibition before semicolon, particularly:

nvm.c:106: WARNING: space prohibited before semicolon
nvm.c:1098: WARNING: space prohibited before semicolon
nvm.c:1279: WARNING: space prohibited before semicolon
nvm.c:2834: WARNING: space prohibited before semicolon
nvm.c:3361: WARNING: space prohibited before semicolon
nvm.c:4453: WARNING: space prohibited before semicolon

Signed-off-by: Aldo Iljazi <neonsync1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8188eu: rtw_wlan_util.c: Fixed checkpatch.pl warnings.
Faris de Haan [Tue, 10 Sep 2013 08:38:23 +0000 (10:38 +0200)]
Staging: rtl8188eu: rtw_wlan_util.c: Fixed checkpatch.pl warnings.

Fixed a few of the coding style issues reported by checkpatch.pl

Signed-off-by: Faris de Haan <farisdehaan@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgrp: Remove casting the return value which is a void pointer
Jingoo Han [Mon, 9 Sep 2013 05:17:32 +0000 (14:17 +0900)]
staging: dgrp: Remove casting the return value which is a void pointer

Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: rtl8188eu: checkpatch.pl warnings removed
Faris de Haan [Mon, 9 Sep 2013 15:34:44 +0000 (17:34 +0200)]
Staging: rtl8188eu: checkpatch.pl warnings removed

Fixed some of the coding style issues reported by checkpatch.pl

Signed-off-by: Faris de Haan <farisdehaan@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: bcm: InterfaceMisc.c: fixed styling issue in casting (foo*)->(foo *)
Avinash Kumar [Thu, 5 Sep 2013 17:32:16 +0000 (23:02 +0530)]
staging: bcm: InterfaceMisc.c: fixed styling issue in casting (foo*)->(foo *)

fixed styling issue in pointer typecast.

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Add some items to the TODO list
Mark Einon [Wed, 11 Sep 2013 13:14:46 +0000 (14:14 +0100)]
staging: et131x: Add some items to the TODO list

Adding some trivial formatting suggestions made by Dan Carpenter to
the TODO.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Removing some unecessary braces
Mark Einon [Wed, 11 Sep 2013 13:14:45 +0000 (14:14 +0100)]
staging: et131x: Removing some unecessary braces

Remove braces from a few single line if statements.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unused rcv_pend_lock spinlock
Mark Einon [Wed, 11 Sep 2013 13:14:44 +0000 (14:14 +0100)]
staging: et131x: Remove unused rcv_pend_lock spinlock

The rcv_pend_lock spinlock isn't used anymore. remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Remove unused spinlock
Mark Einon [Wed, 11 Sep 2013 13:14:43 +0000 (14:14 +0100)]
staging: et131x: Remove unused spinlock

phy_lock is no longer used in any useful code, it's all been moved into
a phy_device. Remove the lock definition and init.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgnc: removes parentheses around return statements
Lidza Louina [Mon, 9 Sep 2013 19:01:23 +0000 (15:01 -0400)]
staging: dgnc: removes parentheses around return statements

This patch removes parentheses around return
statements. They aren't needed.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgnc: renames board_t to dgnc_board
Lidza Louina [Mon, 9 Sep 2013 19:01:22 +0000 (15:01 -0400)]
staging: dgnc: renames board_t to dgnc_board

This patch renames the struct board_t to dgnc_board. board_t
wasn't a good name for it since the _t suffix is for typedefs.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: Remove casting the return value which is a void pointer
Jingoo Han [Mon, 9 Sep 2013 05:19:48 +0000 (14:19 +0900)]
staging: dgap: Remove casting the return value which is a void pointer

Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: Remove version check in dgap_kcompat.h
Sachin Kamat [Sat, 31 Aug 2013 05:28:23 +0000 (10:58 +0530)]
staging: dgap: Remove version check in dgap_kcompat.h

Code should be for the kernel version it is merged in.
Version check is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: Remove version check in dgap_driver.c
Sachin Kamat [Sat, 31 Aug 2013 05:28:22 +0000 (10:58 +0530)]
staging: dgap: Remove version check in dgap_driver.c

Code should be for the kernel version it is merged in.
Version check is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: change MODULE_DESCRIPTION
H Hartley Sweeten [Fri, 30 Aug 2013 18:49:02 +0000 (11:49 -0700)]
staging: comedi: comedi_parport: change MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something useful instead of the
generic "Comedi low-level driver".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: use dev->read_subdev in interrupt handler
H Hartley Sweeten [Fri, 30 Aug 2013 18:48:44 +0000 (11:48 -0700)]
staging: comedi: comedi_parport: use dev->read_subdev in interrupt handler

Use the dev->read_subdev to get the comedi_subdevice instead of accessing
the dev->subdevices array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: rename parport_intr_insn()
H Hartley Sweeten [Fri, 30 Aug 2013 18:48:27 +0000 (11:48 -0700)]
staging: comedi: comedi_parport: rename parport_intr_insn()

For aesthetic reasons, rename this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: reorder #include's
H Hartley Sweeten [Fri, 30 Aug 2013 18:48:10 +0000 (11:48 -0700)]
staging: comedi: comedi_parport: reorder #include's

For aesthetic reasons, reorder the #include list.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up multi-line comments
H Hartley Sweeten [Fri, 30 Aug 2013 18:47:51 +0000 (11:47 -0700)]
staging: comedi: comedi_parport: tidy up multi-line comments

Tidy up the multi-line comments to follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up parport_attach()
H Hartley Sweeten [Fri, 30 Aug 2013 18:47:31 +0000 (11:47 -0700)]
staging: comedi: comedi_parport: tidy up parport_attach()

Add some whitespace to tidy up the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: don't fail attach if irq is not available
H Hartley Sweeten [Fri, 30 Aug 2013 18:47:11 +0000 (11:47 -0700)]
staging: comedi: comedi_parport: don't fail attach if irq is not available

Interrupt support in this driver is optional. Don't fail the attach of the
board if the request_irq() fails.

Only allocate and setup the subdevice for the interrupt if the request_irq()
was successful.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: remove 'enable_irq' from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:46:53 +0000 (11:46 -0700)]
staging: comedi: comedi_parport: remove 'enable_irq' from private data

The enabled state of the interrupt can be checked by reading the control
register.

Remove 'enabled_irq' from the private data.

Since the private data is now empty, remove it completely and remove the
allocation of it in parport_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: remove 'c_data' from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:46:30 +0000 (11:46 -0700)]
staging: comedi: comedi_parport: remove 'c_data' from private data

The control register for the parallel port is readable so there is no need
to cache the current value in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up parport_insn_c()
H Hartley Sweeten [Fri, 30 Aug 2013 18:46:11 +0000 (11:46 -0700)]
staging: comedi: comedi_parport: tidy up parport_insn_c()

Rename this function to better describe it's use.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up parport_insn_b()
H Hartley Sweeten [Fri, 30 Aug 2013 18:45:53 +0000 (11:45 -0700)]
staging: comedi: comedi_parport: tidy up parport_insn_b()

Rename this function to better describe it's use.

Tidy it up to follow the normal comedi (*insn_bits) for DI subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: fix parport_insn_config_a()
H Hartley Sweeten [Fri, 30 Aug 2013 18:45:25 +0000 (11:45 -0700)]
staging: comedi: comedi_parport: fix parport_insn_config_a()

This is the (*insn_config) function for a DIO subdevice. It should be
using the data[0] value as the "instruction" to perform on the subdevice.

Use the comedi_dio_insn_config() helper to properly handle instructions.

Also, rename the function to better describe it's use.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up parport_insn_a()
H Hartley Sweeten [Fri, 30 Aug 2013 18:45:02 +0000 (11:45 -0700)]
staging: comedi: comedi_parport: tidy up parport_insn_a()

Rename this function to better describe it's use.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: remove 'a_data' from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:44:43 +0000 (11:44 -0700)]
staging: comedi: comedi_parport: remove 'a_data' from private data

Use the subdevice s->state to hold the current state of the data register
outputs instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_parport: tidy up the register map
H Hartley Sweeten [Fri, 30 Aug 2013 18:44:19 +0000 (11:44 -0700)]
staging: comedi: comedi_parport: tidy up the register map

Rename the register map defines to better describe the hardware.

Add defines for the control register bits that enable the irq and
change the direction of the data register. This gets rid of the
"magic" numbers.

Remove PARPORT_SIZE, it's only used when requesting the i/o region
with comedi_request_region().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: s626: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:10:56 +0000 (11:10 -0700)]
staging: comedi: s626: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: me_daq: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:10:39 +0000 (11:10 -0700)]
staging: comedi: me_daq: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: me4000: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:10:20 +0000 (11:10 -0700)]
staging: comedi: me4000: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ii_pci20kc: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:10:01 +0000 (11:10 -0700)]
staging: comedi: ii_pci20kc: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_3xxx: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:09:44 +0000 (11:09 -0700)]
staging: comedi: addi_apci_3xxx: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: addi_apci_16xx: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:09:27 +0000 (11:09 -0700)]
staging: comedi: addi_apci_16xx: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: hwdrv_apci3120: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:09:07 +0000 (11:09 -0700)]
staging: comedi: hwdrv_apci3120: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ssv_dnp: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:08:50 +0000 (11:08 -0700)]
staging: comedi: ssv_dnp: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Also, fix a bug where the state of the channels is returned in data[0].
The comedi core expects it to be returned in data[1].

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adq12b: remove digital_state from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:08:31 +0000 (11:08 -0700)]
staging: comedi: adq12b: remove digital_state from private data

Use the subdevice 'state' variable instead of carrying the state of
the output channels in the private data.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das16m1: remove do_bits from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:08:12 +0000 (11:08 -0700)]
staging: comedi: das16m1: remove do_bits from private data

Use the subdevice 'state' variable instead of carrying the state of
the output channels in the private data.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das1800: remove do_bits from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:07:52 +0000 (11:07 -0700)]
staging: comedi: das1800: remove do_bits from private data

Use the subdevice 'state' variable instead of carrying the state of
the output channels in the private data.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das08: use s->state in das08_do_wbits()
H Hartley Sweeten [Fri, 30 Aug 2013 18:07:35 +0000 (11:07 -0700)]
staging: comedi: das08: use s->state in das08_do_wbits()

Use the subdevice 'state' variable instead of having to calculate the
current state based on the do_mux_bits in the private data.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: das08: remove do_bits from private data
H Hartley Sweeten [Fri, 30 Aug 2013 18:07:17 +0000 (11:07 -0700)]
staging: comedi: das08: remove do_bits from private data

Use the subdevice 'state' variable instead of carrying the state of
the output channels in the private data.

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: vmk80xx: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:06:58 +0000 (11:06 -0700)]
staging: comedi: vmk80xx: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Tidy up the vmk80xx_do_insn_bits() function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_mio_common: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:06:38 +0000 (11:06 -0700)]
staging: comedi: ni_mio_common: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

Remove the DEBUG_DIO, its just added noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: drivers: use comedi_dio_update_state() for complex cases
H Hartley Sweeten [Fri, 30 Aug 2013 18:06:17 +0000 (11:06 -0700)]
staging: comedi: drivers: use comedi_dio_update_state() for complex cases

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state for more complex cases where the hardware is only
updated based on the 'mask' of the channels that are modified.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: drivers: use comedi_dio_update_state() for simple cases
H Hartley Sweeten [Fri, 30 Aug 2013 18:05:58 +0000 (11:05 -0700)]
staging: comedi: drivers: use comedi_dio_update_state() for simple cases

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state for simple cases where the hardware is updated
when any channel is modified.

Also, fix a bug in the amplc_pc263 and amplc_pci263 drivers where the
current state is not returned in data[1].

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: usbdux drivers: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:05:38 +0000 (11:05 -0700)]
staging: comedi: usbdux drivers: use comedi_dio_update_state()

Use comedi_dio_update_state() to handle the boilerplate code to update
the subdevice s->state.

These drivers always need to update the hardware in order to update
the i/o configuration regardless of if the state has changed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: skel: use comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:05:16 +0000 (11:05 -0700)]
staging: comedi: skel: use comedi_dio_update_state()

Convert this driver to use the comedi_dio_update_state() helper
function.

Tidy up the comments to reflect the new code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: drivers: introduce comedi_dio_update_state()
H Hartley Sweeten [Fri, 30 Aug 2013 18:04:56 +0000 (11:04 -0700)]
staging: comedi: drivers: introduce comedi_dio_update_state()

The (*insn_bits) functions for DIO and DO subdevices typically use
the subdevice 's->state' to hold the current state of the output
channels. The 'insn' passed to these functions, INSN_BITS, specifies
two parameters passed in the 'data'.

  data[0] = 'mask', the channels to update
  data[1] = 'bits', the new state for the channels

Introduce a helper function to handle the boilerplate used to
update the internal state.

Note that the 'mask' is filtered by the 'chanmask' of the channels
actually supported by the subdevice. This is used to protect any
non-channel related bits that are stored in the subdevice state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: initialize subdevice s->io_bits in postconfig
H Hartley Sweeten [Fri, 30 Aug 2013 17:47:03 +0000 (10:47 -0700)]
staging: comedi: initialize subdevice s->io_bits in postconfig

The subdevice 'io_bits' is a bit mask of the i/o configuration for
digital subdevices. '0' values indicate that a channel is configured
as an input and '1' values that the channel is an output. Since the
subdevice data is kzalloc()'d, all channels default as inputs.

Modify __comedi_device_postconfig() so that 'io_bits' is correctly
initialized for Digital Output subdevices.

Remove all the unnecessary initializations of 's->io_bits' from the
drivers. Also, remove the unnecessary initialization of the 's->state'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: comedi: ni_at_a2150: Remove a few superfluous braces
Sean Williams [Sat, 7 Sep 2013 22:51:34 +0000 (15:51 -0700)]
Staging: comedi: ni_at_a2150: Remove a few superfluous braces

Please don't flame me :) I'm getting my feet wet with kernel contribution.
One example I saw in a video by GKH suggested cleaning up coding style as a good first commit.

Signed-off-by: Sean Williams <unixed@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_labpc: use comedi_range_is_unipolar()
H Hartley Sweeten [Wed, 28 Aug 2013 22:01:53 +0000 (15:01 -0700)]
staging: comedi: ni_labpc: use comedi_range_is_unipolar()

Use the core provided helper function instead of duplicating it as
a private function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcmad: use comedi_range_is_bipolar()
H Hartley Sweeten [Wed, 28 Aug 2013 21:59:17 +0000 (14:59 -0700)]
staging: comedi: pcmad: use comedi_range_is_bipolar()

Use the core provided helper function instead of duplicating it as
a private function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/android: Add kerneldoc to one function in alarm-dev.c
Cruz Julian Bishop [Tue, 3 Sep 2013 12:05:09 +0000 (22:05 +1000)]
staging/android: Add kerneldoc to one function in alarm-dev.c

Sorry. I thought that this would be a nice easy class to document fully.
Turns out I was very wrong - I will have to research the Linux alarm and
timer subsystem one day next week and try again.

Here is what I started out with, anyway. It's not much, but it's better
than nothing!

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/android: Add some more kerneldoc to ashmem.c
Cruz Julian Bishop [Tue, 3 Sep 2013 12:05:08 +0000 (22:05 +1000)]
staging/android: Add some more kerneldoc to ashmem.c

I am sorry if I have interpreted anything incorrectly here. This is my
second day really attempting to understand the Ashmem system.

I can not finish documenting this class at this stage - There is still
more that I have to learn. For now, however, it will have to do.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/android: Initial partial kernel-doc for ashmem.c
Cruz Julian Bishop [Tue, 3 Sep 2013 12:05:07 +0000 (22:05 +1000)]
staging/android: Initial partial kernel-doc for ashmem.c

I am beginning to understand the core concepts at play here.

I am nowhere near finished with this class - However, it is better if
I commit what I have documented so far tonight - That way, if I mess
up tomorrow morning, I can just roll back to here.

Sorry if this clutters things up. In the end, once *everything* is
documented, it will make understanding the Android staging driver
easier to understand as a programmer - Hopefully for both new developers
and current ones.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/android: Persistent formatting of help Kconfig entries
Cruz Julian Bishop [Tue, 3 Sep 2013 12:05:05 +0000 (22:05 +1000)]
staging/android: Persistent formatting of help Kconfig entries

Three entries were recently added with help listed as "help", while
all previous entries were listed as "---help---" to make it more
noticeable.

This commit fixes that. Sorry that it is so trivial, but it's
been bugging me for a while.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: android: Remove extern from function prototypes in .h files
Bojan Prtvar [Mon, 2 Sep 2013 11:56:19 +0000 (13:56 +0200)]
Staging: android: Remove extern from function prototypes in .h files

checkpatch.pl complains that extern prototypes should be avoided in .h files

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: staging: android: Kconfig: add depends on MMU for ANDROID_BINDER_IPC
Chen Gang [Mon, 2 Sep 2013 09:11:57 +0000 (17:11 +0800)]
drivers: staging: android: Kconfig: add depends on MMU for ANDROID_BINDER_IPC

ANDROID_BINDER_IPC used the functions which need depend on MMU, so need
let it depend on MMU too, or compiling fails.

The related error:

  drivers/built-in.o: In function `binder_update_page_range':
  drivers/staging/android/binder.c:599: undefined reference to `map_vm_area'
  drivers/staging/android/binder.c:626: undefined reference to `zap_page_range'
  drivers/built-in.o: In function `binder_mmap':
  drivers/staging/android/binder.c:2744: undefined reference to `get_vm_area'

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: android: Mark local functions in binder.c as static
Bojan Prtvar [Mon, 2 Sep 2013 06:18:40 +0000 (08:18 +0200)]
Staging: android: Mark local functions in binder.c as static

This fixes the following sparse warnings
drivers/staging/android/binder.c:1703:5: warning: symbol 'binder_thread_write' was not declared. Should it be static?
drivers/staging/android/binder.c:2058:6: warning: symbol 'binder_stat_br' was not declared. Should it be static?

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: android: add __user annotation in binder.c
Bojan Prtvar [Sun, 1 Sep 2013 18:30:38 +0000 (20:30 +0200)]
Staging: android: add __user annotation in binder.c

This fixes the following sparse error
drivers/staging/android/binder.c:1795:36: error: incompatible types in comparison expression (different address spaces)

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoLinux 3.12-rc1
Linus Torvalds [Mon, 16 Sep 2013 20:17:51 +0000 (16:17 -0400)]
Linux 3.12-rc1

11 years agoMerge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Mon, 16 Sep 2013 20:10:26 +0000 (16:10 -0400)]
Merge branch 'timers/core' of git://git./linux/kernel/git/tip/tip

Pull timer code update from Thomas Gleixner:
 - armada SoC clocksource overhaul with a trivial merge conflict
 - Minor improvements to various SoC clocksource drivers

* 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: armada-370-xp: Add detailed clock requirements in devicetree binding
  clocksource: armada-370-xp: Get reference fixed-clock by name
  clocksource: armada-370-xp: Replace WARN_ON with BUG_ON
  clocksource: armada-370-xp: Fix device-tree binding
  clocksource: armada-370-xp: Introduce new compatibles
  clocksource: armada-370-xp: Use CLOCKSOURCE_OF_DECLARE
  clocksource: armada-370-xp: Simplify TIMER_CTRL register access
  clocksource: armada-370-xp: Use BIT()
  ARM: timer-sp: Set dynamic irq affinity
  ARM: nomadik: add dynamic irq flag to the timer
  clocksource: sh_cmt: 32-bit control register support
  clocksource: em_sti: Convert to devm_* managed helpers

11 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Mon, 16 Sep 2013 19:39:21 +0000 (15:39 -0400)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "Two minor cifs fixes and a minor documentation cleanup for cifs.txt"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update cifs.txt and remove some outdated infos
  cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache
  cifs: Do not take a reference to the page in cifs_readpage_worker()

11 years agoMerge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi
Linus Torvalds [Mon, 16 Sep 2013 19:37:52 +0000 (15:37 -0400)]
Merge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi

Pull UBI fixes from Artem Bityutskiy:
 "Just a single fastmap fix plus a regression fix"

* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi:
  UBI: Fix invalidate_fastmap()
  UBI: Fix PEB leak in wear_leveling_worker()

11 years agoMerge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Mon, 16 Sep 2013 19:36:55 +0000 (15:36 -0400)]
Merge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs

Pull ubifs fix from Artem Bityutskiy:
 "Just one patch which fixes the power-cut recovery testing mode.

  I'll start using a single UBI/UBIFS tree instead of 2 trees from now
  on.  So in the future you'll get 1 small pull request instead of 2
  tiny ones"

* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs:
  UBIFS: remove invalid warn msg with tst_recovery enabled

11 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 15 Sep 2013 21:45:52 +0000 (17:45 -0400)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "These are four patches for three construction sites:

   - Fix register decoding for the combination of multi-core processors
     and multi-threading.

   - Two more fixes that are part of the ongoing DECstation resurrection
     work.  One of these touches a DECstation-only network driver.

   - Finally Markos' trivial build fix for the AP/SP support.

  (With this applied now all MIPS defconfigs are building again)"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: kernel: vpe: Make vpe_attrs an array of pointers.
  MIPS: Fix SMP core calculations when using MT support.
  MIPS: DECstation I/O ASIC DMA interrupt handling fix
  MIPS: DECstation HRT initialization rearrangement