GitHub/moto-9609/android_kernel_motorola_exynos9610.git
8 years agoiio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ
Ico Doornekamp [Tue, 13 Sep 2016 19:14:14 +0000 (21:14 +0200)]
iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ

Moved functionality from IIO_DEV_ATTR_SAMP_FREQ attribute into
IIO_CHAN_INFO_SAMP_FREQ handlers. Added sca3000_write_raw() to allow
writing the element as well.

Signed-off-by: Ico Doornekamp <ico@pruts.nl>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Support reading a mounting matrix
Linus Walleij [Thu, 1 Sep 2016 09:44:49 +0000 (11:44 +0200)]
iio: accel: kxsd9: Support reading a mounting matrix

This adds support for the mounting matrix to the KXSD9 driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Deploy system and runtime PM
Linus Walleij [Thu, 1 Sep 2016 09:44:48 +0000 (11:44 +0200)]
iio: accel: kxsd9: Deploy system and runtime PM

This deploys runtime and system PM in the KXSD9 driver:

- Use the force_runtime_suspend/resume callbacks as system PM
  operations.

- Add buffer prepare/unprepare callbacks to grab the runtime
  PM while we're using buffered reads and put get/put_autosuspend
  in these.

- Insert get/put_autosuspend calls anywhere the IO is used from
  the raw read/write callbacks.

- Move the fullscale setting to be cached in the state container
  so we can restore it properly when coming back from
  system/runtime suspend.

- Set the autosuspend delay to two orders of magnitude that of
  the sensor start-up time (20ms) so we will autosuspend after
  2s.

- Register the callbacks in both the SPI and I2C subdrivers.

Tested with the I2C KXSD9 on the Qualcomm APQ8060 Dragonboard.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Replace "parent" with "dev"
Linus Walleij [Thu, 1 Sep 2016 09:44:47 +0000 (11:44 +0200)]
iio: accel: kxsd9: Replace "parent" with "dev"

What is passed to the .probe() and .remove() functions is
technically the parent of the created IIO device but it becomes
a big confusion for the head to have it named like this since
it is usually clear from context the "dev" refers to the physical
device, and when next adding PM callbacks a clean
"struct device *dev" pointer is passed to these and that makes
it even more confused. Rename "parent" to "dev" like in most
other drivers.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Fetch and handle regulators
Linus Walleij [Thu, 1 Sep 2016 09:44:46 +0000 (11:44 +0200)]
iio: accel: kxsd9: Fetch and handle regulators

This adds supply regulator handling for the VDD and IOVDD inputs
on the KXSD9 component, makes sure to bring the regulators online
during probe and disable them on remove or the errorpath.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Deploy proper register bit defines
Linus Walleij [Thu, 1 Sep 2016 09:44:45 +0000 (11:44 +0200)]
iio: accel: kxsd9: Deploy proper register bit defines

There are some hardcoded register values etc in the code, define
proper bitfield definitions, and use them when getting and setting
the scale. Optimize a read/modify/write to use regmap_update_bits()
at the same time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Add triggered buffer handling
Linus Walleij [Thu, 1 Sep 2016 09:44:44 +0000 (11:44 +0200)]
iio: accel: kxsd9: Add triggered buffer handling

As is custom with all modern sensors, add a clever burst mode
that will just stream out values from the sensor and provide it
to userspace to do the proper offsetting and scaling.

This is the result when tested with an HRTimer trigger:

$ generic_buffer -a -c 10 -n kxsd9 -t foo
/sys/bus/iio/devices/iio:device1 foo
0.371318 0.718680 9.869872 1795.000000 97545896129
-0.586922 0.179670 9.378775 2398.000000 97555864721
-0.299450 0.179670 10.348992 2672.000000 97565874055
0.371318 0.335384 11.103606 2816.000000 97575883240
0.179670 0.574944 10.540640 2847.000000 97585862351
0.335384 0.754614 9.953718 2840.000000 97595872425
0.179670 0.754614 10.732288 2879.000000 97605882351
0.000000 0.754614 10.348992 2872.000000 97615891832
-0.730658 0.574944 9.570422 2831.000000 97625871536
0.000000 1.137910 10.732288 2872.000000 97635881610

Columns shown are x, y, z acceleration, so a positive acceleration
of ~9.81 (shaky due to bad calibration) along the z axis. The
fourth column is the AUX IN which is floating on this system,
it seems to float up to the 2.85V VDD voltage.

To be able to cleanup the triggered buffer, we need to add .remove()
callbacks to the I2C and SPI subdrivers and call back into an
exported .remove() callback in the core.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Fix up offset and scaling
Linus Walleij [Thu, 1 Sep 2016 09:44:43 +0000 (11:44 +0200)]
iio: accel: kxsd9: Fix up offset and scaling

This fixes several errors in the offset and scaling of the raw
values from the KXSD9 sensor:

- The code did not convert the big endian value from the sensor
  into the endianness of the host CPU. Fix this with
  be16_to_cpu() on the raw obtained value.

- The code did not regard the fact that only the upper 12 bits of
  the accelerometer values are valid. Shift these
  down four bits to yield the real raw value.

- Further the sensor provides 2048 at zero g. This means that an
  offset of 2048 must be subtracted from the raw value before
  scaling. This was not taken into account by the driver,
  yielding a weird value. Fix this by providing this offset in
  sysfs.

To house the scaling code better, the value reading code was
factored into the raw reading function.

This proper scaling and offseting is necessary to get proper
values out of triggered buffer by offsetting, shifting and scaling
them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Drop the buffer lock
Linus Walleij [Thu, 1 Sep 2016 09:44:42 +0000 (11:44 +0200)]
iio: accel: kxsd9: Drop the buffer lock

The RX/TX buffers are gone so drop the lock (it should have been
in the transport struct anyway).

Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Add I2C transport
Linus Walleij [Thu, 1 Sep 2016 09:44:41 +0000 (11:44 +0200)]
iio: accel: kxsd9: Add I2C transport

This adds I2C regmap transport for the KXSD9 driver.
Tested on the KXSD9 sensor on the APQ8060 Dragonboard.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Convert to use regmap for transport
Linus Walleij [Thu, 1 Sep 2016 09:44:40 +0000 (11:44 +0200)]
iio: accel: kxsd9: Convert to use regmap for transport

This converts the KXSD9 driver to drop the custom transport
mechanism and just use regmap like everything else.

Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Do away with the write2 helper
Linus Walleij [Thu, 1 Sep 2016 09:44:39 +0000 (11:44 +0200)]
iio: accel: kxsd9: Do away with the write2 helper

This is just a masquerading register write function, so use the
register write function instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Split out SPI transport
Linus Walleij [Thu, 1 Sep 2016 09:44:38 +0000 (11:44 +0200)]
iio: accel: kxsd9: Split out SPI transport

This moves the KXSD9 SPI transport out to its own file and Kconfig
entry, so that we will be able to add another transport method.
We export the common probe and add a local header file for the
functionality shared between the main driver and the transport
driver.

We make the SPI transport the default for the driver if SPI is
available and the KXSD9 driver was selected, so the oldconfig
upgrade path will be clear.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: split out a common remove() function
Linus Walleij [Thu, 1 Sep 2016 09:44:37 +0000 (11:44 +0200)]
iio: accel: kxsd9: split out a common remove() function

This makes it possible to later split the transport mechanism
using a generic probe() and a generic remove().

Use dev_set_drvdata() and dev_get_drvdata() as a paired
accessor to operate on the abstract struct device * regardless
of the transport mechanism in use.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: accel: kxsd9: Split out transport mechanism
Linus Walleij [Thu, 1 Sep 2016 09:44:36 +0000 (11:44 +0200)]
iio: accel: kxsd9: Split out transport mechanism

Split off a transport mechanism struct that will deal with the SPI
traffic in preparation for adding I2C support.

Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoStaging: dgnc: dgnc_tty: fixed a line too long style issue
Cathal Mullaney [Sat, 17 Sep 2016 19:01:08 +0000 (20:01 +0100)]
Staging: dgnc: dgnc_tty: fixed a line too long style issue

Fixed a coding style issue.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Rename misspelt macro
Namrata A Shettar [Fri, 16 Sep 2016 21:05:21 +0000 (02:35 +0530)]
staging: rtl8712: Rename misspelt macro

Correct the word 'success' being misspelt in the macro:
- LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA => LED_BLINK_WPS_SUCCESS_INTERVAL_ALPHA

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: core: Replace memcpy() with ether_addr_copy() if ethernet address...
sayli karnik [Sat, 17 Sep 2016 16:35:19 +0000 (22:05 +0530)]
staging: rtl8188eu: core: Replace memcpy() with ether_addr_copy() if ethernet addresses are __aligned(2)

This patch fixes the checkpatch warning:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)
Done using coccinelle:

@@
expression exp1, exp2;
@@
- memcpy(exp1, exp2, ETH_ALEN);
+ ether_addr_copy(exp1, exp2);

The output of pahole shows that the addresses are aligned:

struct ieee80211_hdr {
        __le16                     frame_control;        /*     0     2 */
        __le16                     duration_id;          /*     2     2 */
        u8                         addr1[6];             /*     4     6 */
        u8                         addr2[6];             /*    10     6 */
        u8                         addr3[6];             /*    16     6 */
        __le16                     seq_ctrl;             /*    22     2 */
        u8                         addr4[6];             /*    24     6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};

struct wlan_bssid_ex {
        u32                        Length;               /*     0     4 */
        unsigned char              MacAddress[6];        /*     4     6 */
        u8                         Reserved[2];          /*    10     2 */
        struct ndis_802_11_ssid    Ssid;                 /*    12    36 */
        u32                        Privacy;              /*    48     4 */
        long int                   Rssi;                 /*    52     8 */
        enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;  /*    60     4 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        struct ndis_802_11_config  Configuration;        /*    64    32 */
        enum ndis_802_11_network_infra InfrastructureMode; /*    96     4 */
        unsigned char              SupportedRates[16];   /*   100    16 */
        struct wlan_phy_info       PhyInfo;              /*   116     4 */
        u32                        IELength;             /*   120     4 */
        u8                         IEs[768];             /*   124   768 */
        /* --- cacheline 13 boundary (832 bytes) was 60 bytes ago --- */

        /* size: 892, cachelines: 14, members: 13 */
        /* last cacheline: 60 bytes */
};

struct stadel_event {
        unsigned char              macaddr[6];           /*     0     6 */
        unsigned char              rsvd[2];              /*     6     2 */
        int                        mac_id;               /*     8     4 */

        /* size: 12, cachelines: 1, members: 3 */
        /* last cacheline: 12 bytes */
};

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers: staging: vme: convert to octal notation for permission bits
Andrew Kanner [Fri, 16 Sep 2016 22:28:13 +0000 (01:28 +0300)]
drivers: staging: vme: convert to octal notation for permission bits

Ran checkpatch.pl -f vme_pio2_core.c
Fixed: WARNING: Symbolic permissions are not preferred. Consider using
octal permissions (0444)

Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: olpc_dcon: Replace u_int8_t with u8
sayli karnik [Fri, 16 Sep 2016 20:33:45 +0000 (02:03 +0530)]
staging: olpc_dcon: Replace u_int8_t with u8

This patch replaces type u_int8_t with u8 as suggested by checkpatch.pl.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: davinci_vpfe: Replace explicit NULL comparison with ! operator
sayli karnik [Fri, 16 Sep 2016 17:59:30 +0000 (23:29 +0530)]
staging: media: davinci_vpfe: Replace explicit NULL comparison with ! operator

This patch replaces the explicit NULL comparisons with ! operator.
It was found using Coccinelle:

@disable is_null@
expression e;
@@
- e == NULL
+ !e

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: davinci_vpfe: Use BIT macro instead of left shifting 1
sayli karnik [Fri, 16 Sep 2016 18:44:57 +0000 (00:14 +0530)]
staging: media: davinci_vpfe: Use BIT macro instead of left shifting 1

This patch replaces left shifts on 1 with the BIT(x) macro, as suggested
by checkpatch.pl.
This was done using coccinelle script:
@@
constant c;
@@
- (1 << c)
+ BIT(c)

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: ks7010: Remove extern keyword from function declaration
Bhumika Goyal [Sat, 17 Sep 2016 07:39:13 +0000 (13:09 +0530)]
Staging: ks7010: Remove extern keyword from function declaration

Remove extern specifier from function declaration as they have
it by default. Also move extern declaration from .c files to
their respective header file 'ks_hostif.h'. Coccinelle was used
to remove extern and other changes were done by hand.
Script:
@@
identifier func;
type T;
@@
- extern
T func(...);

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: rtsx_chip: Add space around binary operators
Namrata A Shettar [Sat, 17 Sep 2016 12:26:59 +0000 (17:56 +0530)]
staging: rts5208: rtsx_chip: Add space around binary operators

Add space around binary operators to resolve checkpatch issue.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: mark symbols static where possible
Baoyou Xie [Sat, 17 Sep 2016 12:04:36 +0000 (20:04 +0800)]
staging: lustre: lmv: mark symbols static where possible

We get a few warnings when building kernel with W=1:
drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous prototype for 'lmv_read_page' [-Wmissing-prototypes]
....

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: clean function declaration in cl_io.c up
Baoyou Xie [Sat, 17 Sep 2016 13:24:08 +0000 (21:24 +0800)]
staging/lustre: clean function declaration in cl_io.c up

We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/cl_page.c:488:6: warning: no previous prototype for 'cl_page_disown0' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/obdclass/cl_io.c, but should be
removed in a header file. thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lustre/include/cl_object.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obdclass: clean function declarations in obd_config.c and class_obd...
Baoyou Xie [Sat, 17 Sep 2016 13:30:35 +0000 (21:30 +0800)]
staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd.c up

We get 3 warnings when building kernel with W=1:

drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous prototype for 'lustre_check_exclusion' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous prototype for 'lustre_register_fs' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous prototype for 'lustre_unregister_fs' [-Wmissing-prototypes]

In fact, the first function is declared in
drivers/staging/lustre/lustre/obdclass/obd_config.c,
and the other two functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,
but all of these functions should be declared in
a header file, thus can be recognized in other file.

So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: clean function declaration in super25.c up
Baoyou Xie [Sat, 17 Sep 2016 13:37:03 +0000 (21:37 +0800)]
staging/lustre: clean function declaration in super25.c up

We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/obd_config.c:719:6: warning: no previous prototype for 'lustre_register_client_process_config' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lustre/include/lprocfs_status.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: clean function declaration in super25.c up
Baoyou Xie [Sat, 17 Sep 2016 13:41:39 +0000 (21:41 +0800)]
staging: lustre: clean function declaration in super25.c up

We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lnet/selftest/conctl.c:804:1: warning: no previous prototype for 'lstcon_ioctl_entry' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lnet/selftest/console.h

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: include/lustre_net.h: Remove unnecessary space before function point...
Richard Groux [Fri, 16 Sep 2016 15:51:02 +0000 (17:51 +0200)]
staging: lustre: include/lustre_net.h: Remove unnecessary space before function pointer arguments.

Minor warnings spotted by checkpatch.pl in lustre
Remove unnecessary space before function pointer arguments.

Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: ks7010: Replace memset with eth_zero_addr
Bhumika Goyal [Fri, 16 Sep 2016 14:24:37 +0000 (19:54 +0530)]
Staging: ks7010: Replace memset with eth_zero_addr

Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero. Coccinelle was used to do the replacement and add the
header file linux/etherdevice.h if not already present.
Script:
@header@
@@
#include <linux/etherdevice.h>

@r1@
expression e;
@@

-memset(e,0,ETH_ALEN);
+eth_zero_addr(e);

@includeheader depends on r1 && !header@
@@
+ #include <linux/etherdevice.h>
#include <...>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Use sizeof type *pointer instead of sizeof type
sayli karnik [Fri, 16 Sep 2016 10:53:02 +0000 (16:23 +0530)]
staging: wilc1000: Use sizeof type *pointer instead of sizeof type

The patch uses the size of the dereference to a variable instead of it's type,
to make the code more resistant to type changes in the future. The type of the
pointer variable here is the same as the type in the argument that is being
replaced in sizeof().

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: remove ODM_CmnInfoPtrArrayHook function
Ivan Safonov [Fri, 16 Sep 2016 14:34:12 +0000 (21:34 +0700)]
staging: r8188eu: remove ODM_CmnInfoPtrArrayHook function

This function used once, and does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: remove ODM_CmnInfoHook function
Ivan Safonov [Fri, 16 Sep 2016 14:33:42 +0000 (21:33 +0700)]
staging: r8188eu: remove ODM_CmnInfoHook function

This function used once, and does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: remove ODM_CmnInfoUpdate function
Ivan Safonov [Fri, 16 Sep 2016 14:33:12 +0000 (21:33 +0700)]
staging: r8188eu: remove ODM_CmnInfoUpdate function

This function does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: add spaces around <<
Gargi Sharma [Fri, 16 Sep 2016 02:46:07 +0000 (08:16 +0530)]
staging: wlan-ng: add spaces around <<

add spaces around << to fix the checkpatch issue, spaces preferred
around that '<<'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: add spaces around |
Gargi Sharma [Fri, 16 Sep 2016 02:46:06 +0000 (08:16 +0530)]
staging: wlan-ng: add spaces around |

add spaces around | to fix the checkpatch issue, spaces preferred around
that '|'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: add spaces around >>
Gargi Sharma [Fri, 16 Sep 2016 02:46:05 +0000 (08:16 +0530)]
staging: wlan-ng: add spaces around >>

add spaces around >> to fix the checkpatch issue, spaces preferred
around that '>>'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: add spaces around &
Gargi Sharma [Fri, 16 Sep 2016 02:46:04 +0000 (08:16 +0530)]
staging: wlan-ng: add spaces around &

add space around & to fix the checkpatch issue spaces preferred around
that '&'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: add spaces around +
Gargi Sharma [Fri, 16 Sep 2016 02:46:03 +0000 (08:16 +0530)]
staging: wlan-ng: add spaces around +

add spaces around + to fix the checkpatch issue,
spaces preferred around that '&'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: add spaces around <<
Gargi Sharma [Thu, 15 Sep 2016 22:38:12 +0000 (04:08 +0530)]
staging: fbtft: add spaces around <<

add spaces around << to fix the checkpatch issue, spaces preferred
around that '<<'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: move && operator for logical continuation
Gargi Sharma [Thu, 15 Sep 2016 22:38:11 +0000 (04:08 +0530)]
staging: fbtft: move && operator for logical continuation

Move && up to the previous line, to fix the checkpatch issue Logical
continuations should be on the previous line.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: correct misspelled "ressources" to "resources"
Gargi Sharma [Fri, 16 Sep 2016 00:38:35 +0000 (06:08 +0530)]
staging: i4l: correct misspelled "ressources" to "resources"

change ressources to resources to fix the checkpatch issue
'ressources' may be misspelled.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: Use the BIT() macro instead of left shifting 1
sayli karnik [Thu, 15 Sep 2016 20:57:05 +0000 (02:27 +0530)]
staging: comedi: Use the BIT() macro instead of left shifting 1

This patch replaces left shifts on 1 with the BIT(x) macro, as suggested
by checkpatch.pl.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: fix alignment for if arguments
Gargi Sharma [Thu, 15 Sep 2016 19:07:14 +0000 (00:37 +0530)]
staging: xgifb: fix alignment for if arguments

Reduce indentation of multi-line if-test arguments for better readability.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: remove blank line before closing brace
Gargi Sharma [Thu, 15 Sep 2016 19:07:13 +0000 (00:37 +0530)]
staging: xgifb: remove blank line before closing brace

delete blank line before '}' to fix the checkpatch issue Blank lines
aren't necessary before a closing brace '}'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: add spaces around |
Gargi Sharma [Thu, 15 Sep 2016 19:07:12 +0000 (00:37 +0530)]
staging: xgifb: add spaces around |

insert spaces around '|' to fix the checkpatch issue
spaces preferred around that '|'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: remove blank line after open brace
Gargi Sharma [Thu, 15 Sep 2016 19:07:11 +0000 (00:37 +0530)]
staging: xgifb: remove blank line after open brace

delete a blank line after an open brace to fix the check patch issue,
Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: remove unnecessary parentheses
Gargi Sharma [Thu, 15 Sep 2016 19:07:10 +0000 (00:37 +0530)]
staging: xgifb: remove unnecessary parentheses

! has higher priority than && or ||, so remove parentheses around
! expressions to make the code more readable.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: move AND operator for logical continuation
Gargi Sharma [Thu, 15 Sep 2016 19:07:09 +0000 (00:37 +0530)]
staging: xgifb: move AND operator for logical continuation

Move && up to the previous line, to fix the checkpatch issue Logical
continuations should be on the previous line.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: s626: Remove all unused functions
Bhumika Goyal [Thu, 15 Sep 2016 20:39:08 +0000 (02:09 +0530)]
Staging: comedi: s626: Remove all unused functions

Remove all #ifdef'ed static functions as they are not used anywhere
in the kernel. Some functions were detected using Coccinelle but removed by
hand and some were removed as the functions in which they were getting
used were also unused functions.
Script:

@initialize:python@
@@
def display(name,p):
        print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: remove multiple blank lines
Gargi Sharma [Thu, 15 Sep 2016 18:37:51 +0000 (00:07 +0530)]
staging: octeon: remove multiple blank lines

Fixes the checkpatch issue Please don't use multiple blank lines.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: make some vars to lower case to keep the style consistent
Sergio Paracuellos [Thu, 15 Sep 2016 18:51:24 +0000 (20:51 +0200)]
staging: rts5208: make some vars to lower case to keep the style consistent

This patch fixes the checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: remove .owner field for driver
Wei Yongjun [Thu, 15 Sep 2016 02:27:27 +0000 (02:27 +0000)]
staging: fsl-mc: remove .owner field for driver

Remove .owner field if calls are used which set it automatically.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
Wei Yongjun [Thu, 15 Sep 2016 02:27:04 +0000 (02:27 +0000)]
staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD

Using list_del_init() instead of list_del() + INIT_LIST_HEAD().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android ion/hisi: fix dependencies
Arnd Bergmann [Thu, 15 Sep 2016 15:57:40 +0000 (17:57 +0200)]
staging: android ion/hisi: fix dependencies

The newly added Hi6220 Ion code fails to build when the ION_OF helpers
are not present:

drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_remove':
hi6220_ion.c:(.text.hi6220_ion_remove+0x4c): undefined reference to `ion_destroy_platform_data'
drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_probe':
hi6220_ion.c:(.text.hi6220_ion_probe+0x5c): undefined reference to `ion_parse_dt'
hi6220_ion.c:(.text.hi6220_ion_probe+0xf8): undefined reference to `ion_destroy_platform_data'

This selects the symbol when needed.

Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: ion: Fix return value check in hi6220_ion_probe()
Wei Yongjun [Thu, 15 Sep 2016 02:20:43 +0000 (02:20 +0000)]
staging: android: ion: Fix return value check in hi6220_ion_probe()

In case of error, the function ion_device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Remove unnecessary return capture
Rehas Sachdeva [Thu, 15 Sep 2016 19:41:08 +0000 (01:11 +0530)]
staging: lustre: Remove unnecessary return capture

Instead of storing the return value of a function call into a variable and
then returning it, we can club the two into a single return statement. This
change was made using the following semantic patch by Coccinelle:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: emxx_udc: add braces to if-else block
Gargi Sharma [Thu, 15 Sep 2016 20:14:14 +0000 (01:44 +0530)]
staging: emxx_udc: add braces to if-else block

add braces to if/else clause to fix the checkpatch issue braces {}
should be used on all arms of if/else block. Does not affect flow
because only single statement inside if/else block.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: emxx_udc: Fix unsigned int to bare use of unsigned
Anchal Jain [Wed, 14 Sep 2016 18:08:04 +0000 (23:38 +0530)]
staging: emxx_udc: Fix unsigned int to bare use of unsigned

This is a patch to fixes up a
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
found by the checkpatch.pl tool

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gs_fpgaboot: Remove FSF address from GPL notice
Rehas Sachdeva [Wed, 14 Sep 2016 16:44:56 +0000 (22:14 +0530)]
staging: gs_fpgaboot: Remove FSF address from GPL notice

This patch fixes the checkpatch.pl warning:

CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gdm724x: Remove unnecessary blank line
Rehas Sachdeva [Wed, 14 Sep 2016 16:13:04 +0000 (21:43 +0530)]
staging: gdm724x: Remove unnecessary blank line

This patch fixes the checkpatch.pl warning:
CHECK: Please don't use multiple blank lines

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: netlogic: Remove unused function
Bhumika Goyal [Thu, 15 Sep 2016 14:17:18 +0000 (19:47 +0530)]
Staging: netlogic: Remove unused function

The function xlr_wakeup_queue is not used anywhere in the kernel.
Therefore, remove it. The static unused functions were detected
using Coccinelle but the change was done by hand.
Script used:

@initialize:python@
@@
def display(name,p):
print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Fix long line and spelling mistake
Rehas Sachdeva [Thu, 15 Sep 2016 04:08:21 +0000 (09:38 +0530)]
staging: dgnc: Fix long line and spelling mistake

This patch fixes the checkpatch.pl warning: Line over 80 characters.
Also, the word 'because' was spelled as 'Becuz' and has been corrected.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Fix lines over 80 characters
Rehas Sachdeva [Wed, 14 Sep 2016 15:08:24 +0000 (20:38 +0530)]
staging: dgnc: Fix lines over 80 characters

This patch fixes the checkpatch.pl warning:
Line over 80 characters.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback()
Wei Yongjun [Thu, 15 Sep 2016 10:12:05 +0000 (10:12 +0000)]
staging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback()

Fix a double lock bug in SetPSModeWorkItemCallback().

Fixes: 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock with mutex")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: remove unused including <linux/version.h>
Wei Yongjun [Thu, 15 Sep 2016 10:13:04 +0000 (10:13 +0000)]
staging: ks7010: remove unused including <linux/version.h>

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

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Remove the explicit cast on kmalloc
sayli karnik [Thu, 15 Sep 2016 08:38:22 +0000 (14:08 +0530)]
staging: ks7010: Remove the explicit cast on kmalloc

The assignment operator implicitly converts a void pointer to the type of the
pointer it is assigned to. Hence an explicit cast on the result of the kmalloc
function is not required.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Remove whitespace before newline
Rehas Sachdeva [Wed, 14 Sep 2016 19:22:58 +0000 (00:52 +0530)]
staging: ks7010: Remove whitespace before newline

This patch fixes the checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: Remove unnecessary braces {}
Rehas Sachdeva [Thu, 15 Sep 2016 19:15:32 +0000 (00:45 +0530)]
staging: slicoss: Remove unnecessary braces {}

Removes unnecessary braces {} on both arms of an if-else block as they
have a single statement each. Issue detected by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: Remove blank lines before & after braces
Rehas Sachdeva [Thu, 15 Sep 2016 19:14:38 +0000 (00:44 +0530)]
staging: slicoss: Remove blank lines before & after braces

Removes unnecessary blank lines after an opening brace '{' and before a closing
brace '}'. Issue detected by checkpatch.pl.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: Remove unnecessary blank line
Rehas Sachdeva [Thu, 15 Sep 2016 19:15:57 +0000 (00:45 +0530)]
staging: slicoss: Remove unnecessary blank line

Removes unnecessary blank line detected by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_imon: Fix alignment with the open parenthesis
Anchal Jain [Tue, 13 Sep 2016 11:21:51 +0000 (16:51 +0530)]
staging: media: lirc: lirc_imon: Fix alignment with the open parenthesis

Fix alignment to match open parenthesis.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_imon: Add space around the operators
Anchal Jain [Tue, 13 Sep 2016 11:18:01 +0000 (16:48 +0530)]
staging: media: lirc: lirc_imon: Add space around the operators

CHECK: Add space around the operators { "<<", "*"}.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_imon: Remove a blank line before a close parenthesis '}'
Anchal Jain [Tue, 13 Sep 2016 11:15:24 +0000 (16:45 +0530)]
staging: media: lirc: lirc_imon: Remove a blank line before a close parenthesis '}'

CHECK: Remove unnecessary space after cast

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_imon: Remove unnecessary blank line
Anchal Jain [Tue, 13 Sep 2016 11:12:51 +0000 (16:42 +0530)]
staging: media: lirc: lirc_imon: Remove unnecessary blank line

CHECK: Remove a blank lines before a closed parenthesis '}'

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_imon: Remove multiple blank lines
Anchal Jain [Tue, 13 Sep 2016 11:04:53 +0000 (16:34 +0530)]
staging: media: lirc: lirc_imon: Remove multiple blank lines

checkpatch complains about multiple blank lines.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: media: lirc: lirc_bt829: Remove explicit NULL comparison
Anchal Jain [Tue, 13 Sep 2016 11:00:41 +0000 (16:30 +0530)]
staging: media: lirc: lirc_bt829: Remove explicit NULL comparison

Remove explicit NULL comparison and write it in its simpler form.

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Change 'uint32_t' to 'u32'
Rehas Sachdeva [Thu, 15 Sep 2016 21:33:21 +0000 (03:03 +0530)]
staging: sm750fb: Change 'uint32_t' to 'u32'

It is preferred to use 'u32' instead of 'uint32_t' for unsigned int. Issue
detected by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Change 'x != NULL' to 'x'
Rehas Sachdeva [Thu, 15 Sep 2016 21:32:42 +0000 (03:02 +0530)]
staging: sm750fb: Change 'x != NULL' to 'x'

Changes the explicit comparison to NULL from 'x != NULL' to 'x'. Issue detected
by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: fix block comment style and spelling issues in ddk750_chip.c
Moshe Green [Thu, 15 Sep 2016 20:16:11 +0000 (23:16 +0300)]
staging: sm750fb: fix block comment style and spelling issues in ddk750_chip.c

Fix the following warning types:
 - line length
 - block comment line * prefix
 - trailing */ on a separate line
found by the checkpatch.pl tool in multiple block comments.

Fix a single spelling error in a comment.

Signed-off-by: Moshe Green <mgmoshes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: fix line length coding style issues in ddk750_chip.c
Moshe Green [Thu, 15 Sep 2016 20:15:50 +0000 (23:15 +0300)]
staging: sm750fb: fix line length coding style issues in ddk750_chip.c

Fix multiple line length warnings found by the checkpatch.pl tool
in ddk750_chip.c.

Signed-off-by: Moshe Green <mgmoshes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: sm750fb: Remove unnecessary blank line
Sandhya Bankar [Wed, 14 Sep 2016 12:07:51 +0000 (17:37 +0530)]
Staging: sm750fb: Remove unnecessary blank line

Remove unnecessary blank line.
This patch is detected by checkpatch.pl script .
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Use !x instead of x == NULL.
Sandhya Bankar [Thu, 15 Sep 2016 08:22:51 +0000 (13:52 +0530)]
Staging: wlan-ng: Use !x instead of x == NULL.

Use !x instead of x == NULL.
This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: use defines instead of magic numbers
Asbjoern Sloth Toennesen [Tue, 13 Sep 2016 19:12:36 +0000 (19:12 +0000)]
staging: octeon: use defines instead of magic numbers

The ugly magic number 65392 is waiting for CVMX_IPD_MAX_MTU
to appear in the mips tree.

Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.st>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: clean function declarations in class_obd.c up
Baoyou Xie [Thu, 15 Sep 2016 15:45:17 +0000 (23:45 +0800)]
staging: lustre: clean function declarations in class_obd.c up

We get 2 warnings when building kernel with W=1:

drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:413:5: warning: no previous prototype for 'class_procfs_init' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:449:5: warning: no previous prototype for 'class_procfs_clean' [-Wmissing-prototypes]

In fact, both functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,but should be
declared in a header file, thus can be recognized in other file.

So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix indentation
Rehas Sachdeva [Thu, 15 Sep 2016 12:53:18 +0000 (18:23 +0530)]
staging: lustre: Fix indentation

Fixes checkpatch.pl warning: Statements should start on a tabstop.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Remove unnecessary 'return'
Rehas Sachdeva [Thu, 15 Sep 2016 12:52:40 +0000 (18:22 +0530)]
staging: lustre: Remove unnecessary 'return'

Remove unnecessary void return at the end of a function. Issue detected
by checkpatch.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Change 'seq_printf' to 'seq_puts'
Rehas Sachdeva [Thu, 15 Sep 2016 12:52:10 +0000 (18:22 +0530)]
staging: lustre: Change 'seq_printf' to 'seq_puts'

Fixes checkpatch.pl warning: Prefer seq_puts to seq_printf.
This can be done as both have same type of first two arguments in their
function definition.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Change 'unsigned' to 'unsigned int'
Rehas Sachdeva [Thu, 15 Sep 2016 12:51:42 +0000 (18:21 +0530)]
staging: lustre: Change 'unsigned' to 'unsigned int'

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix block comment style
Rehas Sachdeva [Thu, 15 Sep 2016 12:51:04 +0000 (18:21 +0530)]
staging: lustre: Fix block comment style

Fixes checkpatch.pl warning:
WARNING: Block comments use a trailing */ on a separate line.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Add space b/w concatenated strings
Rehas Sachdeva [Thu, 15 Sep 2016 12:50:31 +0000 (18:20 +0530)]
staging: lustre: Add space b/w concatenated strings

Fixes checkpatch.pl warning:
CHECK: Concatenated strings should use spaces between elements

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: monitor atx DBR space
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:13 +0000 (16:19 +0200)]
staging: most: hdm-dim2: monitor atx DBR space

This patch implements a workaround for a DIM2 issue where the device
macro, in case the asynchronous channel sends data (to MOST), sporadically
duplicates the synchronous blocks with a size of half the synchronous DBR
buffer.

The patch monitors the size of the unused asynchronous Tx DBR memory
(that includes the ping and pong sizes) to prevent the potential DBR
overflow for the asynchronous Tx DBR buffer.

The patched DIM2 HDM expects that the platform driver delivers the 2nd
platform irq (index 1) as the mlb_int of the DIM2 macro.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: fix dim2-ip interrupt names
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:12 +0000 (16:19 +0200)]
staging: most: hdm-dim2: fix dim2-ip interrupt names

This patch fixes the DIM2 IP interrupt names.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: remove clearance of pending MLB interrupt
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:11 +0000 (16:19 +0200)]
staging: most: hdm-dim2: remove clearance of pending MLB interrupt

This patch removes unnecessary clearing of a pending mlb_int from the
service routine for ahb interrupt.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: delete error code from logging message
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:10 +0000 (16:19 +0200)]
staging: most: hdm-dim2: delete error code from logging message

This patch removes the logging of the returned error code of function
dim2_probe as it is done by the calling function.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: rename function
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:09 +0000 (16:19 +0200)]
staging: most: hdm-dim2: rename function

This patch renames the function dim_service_irq. It subsitutes the name
with the more suitable identifier dim_service_ahb_int_irq.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: remove structure member
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:08 +0000 (16:19 +0200)]
staging: most: hdm-dim2: remove structure member

This patch removes the member irq_ahb0 of the structure dim2_hdm, since
its job is suitably done by a simple auto variable.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: round up DBR memory for async/ctrl
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:07 +0000 (16:19 +0200)]
staging: most: hdm-dim2: round up DBR memory for async/ctrl

As the DBR memory is allocated in units of DBR_BLOCK_SIZE, it is more
efficient to configure the DIM2 IP to use whole blocks of the DBR memory.
This patch ceils the DBR memory size used by the DIM2 IP for async/ctrl
channels.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-dim2: double size of DBR buffer
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:06 +0000 (16:19 +0200)]
staging: most: hdm-dim2: double size of DBR buffer

This patch increases the size of the asynchronous and control DBR buffers
in the Tx path to twice the max. message size. This patch is needed to
increase the throughput for big messages.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>