cascardo/linux.git
7 years agostaging: ks7010: Remove space after '(' and before ')'
sayli karnik [Sun, 18 Sep 2016 07:23:49 +0000 (12:53 +0530)]
staging: ks7010: Remove space after '(' and before ')'

The patch fixes the following errors detected by checkpatch.pl:
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Remove braces following single statement blocks
sayli karnik [Sun, 18 Sep 2016 07:22:27 +0000 (12:52 +0530)]
staging: ks7010: Remove braces following single statement blocks

The patch removes braces {} for single statement blocks, as suggested by
checkpatch.pl.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Use #include <linux/atomic.h> instead of <asm/atomic.h>
sayli karnik [Sun, 18 Sep 2016 07:21:03 +0000 (12:51 +0530)]
staging: ks7010: Use #include <linux/atomic.h> instead of <asm/atomic.h>

This patch replaces <asm/atomic.h> with <linux/atomic.h>, as suggested
by checkpatch.pl.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: octeon: ethernet-rx: fixed three redundant blank line style issues
Cathal Mullaney [Sat, 17 Sep 2016 23:04:42 +0000 (00:04 +0100)]
Staging: octeon: ethernet-rx: fixed three redundant blank line style issues

Fixed three minor coding style issues.

Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: if statement style cleanup
Jon Eyolfson [Sat, 17 Sep 2016 23:49:55 +0000 (19:49 -0400)]
staging: wlan-ng: if statement style cleanup

Changed if statement bodies from 2 levels deeper than if statement to 1.

Signed-off-by: Jon Eyolfson <jon@eyl.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: olpc_dcon: Replace a bit shift by a use of BIT.
Anchal Jain [Sun, 18 Sep 2016 06:46:40 +0000 (12:16 +0530)]
staging: olpc_dcon: Replace a bit shift by a use of BIT.

This patch replaces bit shifting on 1 with the BIT(x) macro
as it's extensively used by other function in the file olpc_dcon.h .

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agostaging: most: hdm-dim2: relocate variable declarations
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:05 +0000 (16:19 +0200)]
staging: most: hdm-dim2: relocate variable declarations

This patch eliminates nested variable declarations by putting them at
the beginning of the function in order to flatten the code.

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>
7 years agostaging: most: hdm-dim2: remove macro ENABLE_HDM_TEST
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:04 +0000 (16:19 +0200)]
staging: most: hdm-dim2: remove macro ENABLE_HDM_TEST

This patch removes the macro ENABLE_HDM_TEST, which was needed while
doing DIM2-HAL simulations. But these are not conducted anymore.

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>
7 years agostaging: most: hdm-dim2: fix channel configuration
Andrey Shvetsov [Thu, 15 Sep 2016 14:19:03 +0000 (16:19 +0200)]
staging: most: hdm-dim2: fix channel configuration

The DIM2 HDM checks the parameters passed to the function
configure_channel() and adapts the buffer sizes of the configuration
according to the hardware limitation. This patch is needed to init
the HAL layer with the correct values.

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>
7 years agostaging: android: ion: Make ION_OF depend on OF_ADDRESS
Laura Abbott [Wed, 14 Sep 2016 15:33:58 +0000 (08:33 -0700)]
staging: android: ion: Make ION_OF depend on OF_ADDRESS

The Ion platform code uses of_platform_device_create which has
dependencies on OF_ADDRESS. Depending on OF is not sufficient

Building sparc64:allmodconfig ... failed
--------------
Error log:
...
drivers/built-in.o: In function `ion_parse_dt':
(.text+0x11aa2c): undefined reference to `of_platform_device_create'

Add a dependency on OF_ADDRESS

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMerge tag 'iio-for-4.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
Greg Kroah-Hartman [Wed, 14 Sep 2016 18:42:03 +0000 (20:42 +0200)]
Merge tag 'iio-for-4.9b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of iio new device support, features and cleanups for the 4.9 cycle.

New device support
* ad8801 dac
  - new driver supporting ad8801 and ad8803 DACs.
adc12138
  - new driver supporting TI adc12130/adc12132 and adc12138 ADCs.
* ltc2485 adc
  - new driver
* mxc6255
  - add support for the mxc6225 part name and fixup the ID check so it works.
* vz89x VOC sensor
  - add support for the vz89te part which drops the voc_short channel and adds
    CRCs compared to other supported parts.

New features
* core
  - immutable triggers.  These effectively grant exclusive control over a
    trigger. The typical usecase is a device representing an analog part
    (perhaps a MUX) that needs to control the sampling of a downstream
    ADC.
  - resource managed trigger registration and triggered_buffer_init.
  - iio_push_event now protected against case of the event interface
    registration not having yet occured.  Only matters if an interrupt
    can occur during this window - might happen on shared interrupt lines.
  - helper to let a driver query if the trigger it is using is provided by
    itself (using the convention of both device and trigger having the same
    parent).
* tools
  - iio-utils. Used channel modifier scaling in preference to generic scaling
    when both exist.
* at91-adc
  - Add support for touchscreen switches closure time needed by some newer
    parts.
* stx104
  - support the ADC channels on this ADC/DAC board. As these are the primary
    feature of the board also move the driver to the iio/adc directory.
* sx9500
  - device tree bindings.

Cleanups / Fixes
* ad5755
  - fix an off-by-one on devnr limit check (introduced earlier this cycle)
* ad7266
  - drop NULL check on devm_regulator_get_optional as it can't return NULL.
* ak8974
  - avoid an unused functional warning due to rework in PM core code.
  - remove .owner field setting as done by i2c_core.
* ina2xx
  - clear out a left over debug field from chip global data.
* hid-sensors
  - avoid an unused functional warning due to rework in PM core code.
* maxim-thermocouple
  - fix non static symbol warnings.
* ms5611
  - fetch and enable regulators unconditionally when they aren't optional.
* sca3000
  - whitespace cleanup.
* st_sensors
  - fetch and enable regulators unconditionally rather than having them
    supported as optional regulators (missunderstanding on my part amongst
    others a while back)
  - followup to previous patch fixes error checking on the regulators.
  - mark symbols static where possible.
  - use the 'is it my trigger' help function.  This prevents the odd case
    of another device triggering from the st-sensors trigger whilst the
    st-sensors trigger is itself not using it but rather using say an hrtimer.
* ti-ads1015
  - add missing of_node_put.
* vz89x
  - rework to all support of new devices.
  - prevent reading of a corrupted buffer.
  - fixup a return value of 0/1 in a bool returning function.

Address updates
- Vlad Dogaru email address change.

7 years agostaging: fwserial: fix checkpatch permission warnings
Simon Chopin [Sat, 10 Sep 2016 05:11:52 +0000 (07:11 +0200)]
staging: fwserial: fix checkpatch permission warnings

Fix the following warnings:
Symbolic permissions are not preferred. Consider using octal permissions.

Signed-off-by: Simon Chopin <chopin.simon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: wilc1000: Remove struct typedef
Bhumika Goyal [Tue, 13 Sep 2016 12:11:26 +0000 (17:41 +0530)]
Staging: wilc1000: Remove struct typedef

Remove typedef from structure tstrRSSI as using typedef for
structures is not preferred.
Found using coccinelle:

@r1@
type T;
@@

typedef struct { ... } T;

@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t":
  coccinelle.T2 = T[:-2];
  print T
else:
  coccinelle.T2=T;

@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;

@r3@
type r1.T;
identifier c1.T2;
@@
- T
+ struct T2

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vme/devices: vme_user.c: fix: converted decimal permissions to octal
Ryan Swan [Mon, 12 Sep 2016 13:58:20 +0000 (09:58 -0400)]
staging: vme/devices: vme_user.c: fix: converted decimal permissions to octal

Ran checkpatch.pl -f vme_user.c
Fixed: ERROR: Use 4 digit octal (0777) not decimal permissions

Signed-off-by: Ryan Swan <ryan@ryanswan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: gs_fpga_boot: Remove multiple blank lines
sayli karnik [Mon, 12 Sep 2016 15:24:07 +0000 (20:54 +0530)]
staging: gs_fpga_boot: Remove multiple blank lines

This patch fixes the following checkpatch warning for the gs_fpgaboot
driver:
CHECK: Please don't use multiple blank lines.

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>