firefly-linux-kernel-4.4.55.git
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

11 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Sun, 15 Sep 2013 21:42:59 +0000 (17:42 -0400)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform updates from Matthew Garrett:
 "Nothing amazing here, almost entirely cleanups and minor bugfixes and
  one bit of hardware enablement in the amilo-rfkill driver"

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  platform/x86: panasonic-laptop: reuse module_acpi_driver
  samsung-laptop: fix config build error
  platform: x86: remove unnecessary platform_set_drvdata()
  amilo-rfkill: Enable using amilo-rfkill with the FSC Amilo L1310.
  wmi: parse_wdg() should return kernel error codes
  hp_wmi: Fix unregister order in hp_wmi_rfkill_setup()
  platform: replace strict_strto*() with kstrto*()
  x86: irst: use module_acpi_driver to simplify the code
  x86: smartconnect: use module_acpi_driver to simplify the code
  platform samsung-q10: use ACPI instead of direct EC calls
  thinkpad_acpi: add the ability setting TPACPI_LED_NONE by quirk
  thinkpad_acpi: return -NODEV while operating uninitialized LEDs

11 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 15 Sep 2013 21:41:30 +0000 (17:41 -0400)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull misc SCSI driver updates from James Bottomley:
 "This patch set is a set of driver updates (megaraid_sas, fnic, lpfc,
  ufs, hpsa) we also have a couple of bug fixes (sd out of bounds and
  ibmvfc error handling) and the first round of esas2r checker fixes and
  finally the much anticipated big endian additions for megaraid_sas"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (47 commits)
  [SCSI] fnic: fnic Driver Tuneables Exposed through CLI
  [SCSI] fnic: Kernel panic while running sh/nosh with max lun cfg
  [SCSI] fnic: Hitting BUG_ON(io_req->abts_done) in fnic_rport_exch_reset
  [SCSI] fnic: Remove QUEUE_FULL handling code
  [SCSI] fnic: On system with >1.1TB RAM, VIC fails multipath after boot up
  [SCSI] fnic: FC stat param seconds_since_last_reset not getting updated
  [SCSI] sd: Fix potential out-of-bounds access
  [SCSI] lpfc 8.3.42: Update lpfc version to driver version 8.3.42
  [SCSI] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
  [SCSI] lpfc 8.3.42: Fixed inconsistent spin lock usage.
  [SCSI] lpfc 8.3.42: Fix driver's abort loop functionality to skip IOs already getting aborted
  [SCSI] lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices
  [SCSI] lpfc 8.3.42: Fix WARN_ON when driver unloads
  [SCSI] lpfc 8.3.42: Avoided making pci bar ioremap call during dual-chute WQ/RQ pci bar selection
  [SCSI] lpfc 8.3.42: Fixed driver iocbq structure's iocb_flag field running out of space
  [SCSI] lpfc 8.3.42: Fix crash on driver load due to cpu affinity logic
  [SCSI] lpfc 8.3.42: Fixed logging format of setting driver sysfs attributes hard to interpret
  [SCSI] lpfc 8.3.42: Fixed back to back RSCNs discovery failure.
  [SCSI] lpfc 8.3.42: Fixed race condition between BSG I/O dispatch and timeout handling
  [SCSI] lpfc 8.3.42: Fixed function mode field defined too small for not recognizing dual-chute mode
  ...

11 years agoMerge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sun, 15 Sep 2013 11:15:06 +0000 (07:15 -0400)]
Merge branch 'slab/next' of git://git./linux/kernel/git/penberg/linux

Pull SLAB update from Pekka Enberg:
 "Nothing terribly exciting here apart from Christoph's kmalloc
  unification patches that brings sl[aou]b implementations closer to
  each other"

* 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  slab: Use correct GFP_DMA constant
  slub: remove verify_mem_not_deleted()
  mm/sl[aou]b: Move kmallocXXX functions to common code
  mm, slab_common: add 'unlikely' to size check of kmalloc_slab()
  mm/slub.c: beautify code for removing redundancy 'break' statement.
  slub: Remove unnecessary page NULL check
  slub: don't use cpu partial pages on UP
  mm/slub: beautify code for 80 column limitation and tab alignment
  mm/slub: remove 'per_cpu' which is useless variable

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 15 Sep 2013 11:13:39 +0000 (07:13 -0400)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input update from Dmitry Torokhov:
 "The only change is David Hermann's new EVIOCREVOKE evdev ioctl that
  allows safely passing file descriptors to input devices to session
  processes and later being able to stop delivery of events through
  these fds so that inactive sessions will no longer receive user input
  that does not belong to them"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: evdev - add EVIOCREVOKE ioctl

11 years agovfs: fix typo in comment in recent dentry work
Linus Torvalds [Sun, 15 Sep 2013 11:11:01 +0000 (07:11 -0400)]
vfs: fix typo in comment in recent dentry work

Sedat points out that I transposed some letters in "LRU" and wrote "RLU"
instead in one of the new comments explaining the flow.  Let's just fix
it.

Reported-by: Sedat Dilek <sedat.dilek@jpberlin.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agopartitions/efi: loosen check fot pmbr size in lba
Davidlohr Bueso [Fri, 13 Sep 2013 22:02:22 +0000 (15:02 -0700)]
partitions/efi: loosen check fot pmbr size in lba

Matt found that commit 27a7c642174e ("partitions/efi: account for pmbr
size in lba") caused his GPT formatted eMMC device not to boot.  The
reason is that this commit enforced Linux to always check the lesser of
the whole disk or 2Tib for the pMBR size in LBA.  While most disk
partitioning tools out there create a pMBR with these characteristics,
Microsoft does not, as it always sets the entry to the maximum 32-bit
limitation - even though a drive may be smaller than that[1].

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Reported-and-tested-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg...
Linus Torvalds [Sat, 14 Sep 2013 03:06:40 +0000 (23:06 -0400)]
Merge tag 'writeback-fixes' of git://git./linux/kernel/git/wfg/linux

Pull writeback fix from Wu Fengguang:
 "A trivial writeback fix"

* tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Do not sort b_io list only because of block device inode

11 years agovfs: fix dentry LRU list handling and nr_dentry_unused accounting
Linus Torvalds [Sat, 14 Sep 2013 02:55:10 +0000 (22:55 -0400)]
vfs: fix dentry LRU list handling and nr_dentry_unused accounting

The LRU list changes interacted badly with our nr_dentry_unused
accounting, and even worse with the new DCACHE_LRU_LIST bit logic.

This introduces helper functions to make sure everything follows the
proper dcache d_lru list rules: the dentry cache is complicated by the
fact that some of the hotpaths don't even want to look at the LRU list
at all, and the fact that we use the same list entry in the dentry for
both the LRU list and for our temporary shrinking lists when removing
things from the LRU.

The helper functions temporarily have some extra sanity checking for the
flag bits that have to match the current LRU state of the dentry.  We'll
remove that before the final 3.12 release, but considering how easy it
is to get wrong, this first cleanup version has some very particular
sanity checking.

Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agocifs: update cifs.txt and remove some outdated infos
Björn Jacke [Tue, 10 Sep 2013 08:28:38 +0000 (10:28 +0200)]
cifs: update cifs.txt and remove some outdated infos

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Björn JACKE <bj@sernet.de>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agocifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache
Sachin Prabhu [Fri, 13 Sep 2013 13:11:57 +0000 (14:11 +0100)]
cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache

When reading a single page with cifs_readpage(), we make a call to
fscache_read_or_alloc_page() which once done, asynchronously calls
the completion function cifs_readpage_from_fscache_complete(). This
completion function unlocks the page once it has been populated from
cache. The module then attempts to unlock the page a second time in
cifs_readpage() which leads to warning messages.

In case of a successful call to fscache_read_or_alloc_page() we should skip
the second unlock_page() since this will be called by the
cifs_readpage_from_fscache_complete() once the page has been populated by
fscache.

With the modifications to cifs_readpage_worker(), we will need to re-grab the
page lock in cifs_write_begin().

The problem was first noticed when testing new fscache patches for cifs.
https://bugzilla.redhat.com/show_bug.cgi?id=1005737

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agocifs: Do not take a reference to the page in cifs_readpage_worker()
Sachin Prabhu [Fri, 13 Sep 2013 13:11:56 +0000 (14:11 +0100)]
cifs: Do not take a reference to the page in cifs_readpage_worker()

We do not need to take a reference to the pagecache in
cifs_readpage_worker() since the calling function will have already
taken one before passing the pointer to the page as an argument to the
function.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
11 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Fri, 13 Sep 2013 17:58:41 +0000 (10:58 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Some more low risk cleanup patches:

   - Remove unnecessary pci_set_drvdata in k10temp driver from Jingoo Han
   - Fix return values in several drivers from Sachin Kamat
   - Remove redundant break in amc6821 driver from Sachin Kamat"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (k10temp) remove unnecessary pci_set_drvdata()
  hwmon: (tmp421) Fix return value
  hwmon: (amc6821) Remove redundant break
  hwmon: (amc6821) Fix return value
  hwmon: (ibmaem) Fix return value
  hwmon: (emc2103) Fix return value