]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
6 years agostaging: rtl8192u: make r8192_wx_handlers_def structure const
Bhumika Goyal [Sat, 30 Sep 2017 16:26:35 +0000 (21:56 +0530)]
staging: rtl8192u: make r8192_wx_handlers_def structure const

Make this const as it is only stored in a const field of a pci_dev
structure. Make the declaration in the header const too.

Structure found using Coccinelle and changes done by hand.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: use ARRAY_SIZE
Jérémy Lefaure [Sun, 1 Oct 2017 19:30:55 +0000 (15:30 -0400)]
staging: rtl8723bs: use ARRAY_SIZE

Using the ARRAY_SIZE macro improves the readability of the code. Also,
it is not always useful to use a variable to store this constant
calculated at compile time.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: use ARRAY_SIZE
Jérémy Lefaure [Sun, 1 Oct 2017 19:30:56 +0000 (15:30 -0400)]
staging: rtlwifi: use ARRAY_SIZE

Using the ARRAY_SIZE macro improves the readability of the code. Also,
it is useless to use a variable to store this constant calculated at
compile time.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: Fix incorrect comparison
Ioana Radulescu [Thu, 28 Sep 2017 14:10:33 +0000 (09:10 -0500)]
staging: fsl-mc/dpio: Fix incorrect comparison

For some dpio functions, a cpu id parameter value of -1 is
valid and means "any". But when trying to validate this param
value against an upper limit, in this case num_possible_cpus(),
we risk obtaining the wrong result due to an implicit cast.

Avoid an incorrect check result by explicitly comparing the
cpu id with the "any" value before verifying the upper bound.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: else is not generally useful after a break or return
Suniel Mahesh [Fri, 22 Sep 2017 04:42:21 +0000 (10:12 +0530)]
staging: ccree: else is not generally useful after a break or return

Fixes checkpatch warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: simplify OOM handling
Gilad Ben-Yossef [Tue, 3 Oct 2017 10:42:17 +0000 (11:42 +0100)]
staging: ccree: simplify OOM handling

Simplify handling of memory allocation failures and remove
redundant log messages

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: move to generic device log infra
Gilad Ben-Yossef [Tue, 3 Oct 2017 10:42:16 +0000 (11:42 +0100)]
staging: ccree: move to generic device log infra

Move over from using macro wrappers around to printk to
dev_err, dev_dbg and friends and clean up resulting fallout.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: simplify access to struct device
Gilad Ben-Yossef [Tue, 3 Oct 2017 10:42:15 +0000 (11:42 +0100)]
staging: ccree: simplify access to struct device

Introduce a function to retrieve struct device from private
data structure in preparation to replacing custom logging
macros with proper dev_dbg and friends which require struct
device.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove sysfs if of deleted code
Gilad Ben-Yossef [Tue, 3 Oct 2017 10:42:14 +0000 (11:42 +0100)]
staging: ccree: remove sysfs if of deleted code

The ccree cycle count mechanism was removed in
commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support")
but the sysfs interface lingered on. Remove it now.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8188eu: core: Use list_entry instead of container_of
Srishti Sharma [Sat, 30 Sep 2017 00:56:55 +0000 (06:26 +0530)]
Staging: rtl8188eu: core: Use list_entry instead of container_of

For variables that have type struct list_head* use list_entry to
access current list element instead of using container_of.
Done using the following semantic patch by coccinelle.

@r@
identifier e;
struct list_head* l;
@@

<... when != l == NULL
l;
...>

(
e=
-container_of
+list_entry
    (
     ...)
)

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Place the constant on the right side in comparisons
Mihaela Muraru [Fri, 29 Sep 2017 19:37:42 +0000 (22:37 +0300)]
staging: rtl8188eu: Place the constant on the right side in comparisons

Move constant to the right side of comparison operator.

Issue found by checkpatch.pl

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Remove braces from single statement blocks
Mihaela Muraru [Mon, 2 Oct 2017 12:14:15 +0000 (05:14 -0700)]
staging: rtl8188eu: Remove braces from single statement blocks

This patch fix a coding style issue, by removing braces {} from single
statement blocks.

Issue found by checkpatch.pl.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use BIT macro
Keerthi Reddy [Mon, 2 Oct 2017 15:31:17 +0000 (21:01 +0530)]
staging: lustre: use BIT macro

This commit changes changes left shift operator to use BIT macro

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8723bs: Remove unnecessary comments
Shreeya Patel [Sun, 1 Oct 2017 07:41:20 +0000 (13:11 +0530)]
Staging: rtl8723bs: Remove unnecessary comments

Remove unnecessary comments which are there
to explain why call to memset is in comments. Both of the
comments are not needed as they are not very useful.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Remove typedef struct _dvi_ctrl_device_t
Mihaela Muraru [Mon, 2 Oct 2017 11:15:11 +0000 (04:15 -0700)]
staging: sm750fb: Remove typedef struct _dvi_ctrl_device_t

This patch removes typedef from struct and renames it from
"_dvi_ctrl_device_t" to "dvi_ctrl_device" as per kernel coding
standards.

Issue found by checpatch.pl

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h}
Keerthi Reddy [Mon, 2 Oct 2017 09:32:03 +0000 (15:02 +0530)]
staging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h}

Removing this will make sure that we are actually working with
enum. Also it is not a good coding style to use typedef.

In this commit remove typedef and also drop '_t' which traditionally
means typedef

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: sm750fb: remove typedef for enum in ddk750_power.{c,h}
Keerthi Reddy [Mon, 2 Oct 2017 09:31:14 +0000 (15:01 +0530)]
Staging: sm750fb: remove typedef for enum in ddk750_power.{c,h}

Using typedef will hide that 'DPMS_t' is enum. Removing this
will make sure that we are actually working with enum. Also it is
not a good coding style to use typedef

In this commit remove typedef and lowercaser the name 'DPMS_t'. And
also drop '_t' which traditionally means typedef.

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: light: remove unnecessary error check
Arvind Yadav [Sat, 23 Sep 2017 08:09:15 +0000 (13:39 +0530)]
staging: greybus: light: remove unnecessary error check

It is not necessary to check return value of gb_lights_channel_flash_config.
gb_lights_channel_config returns both successful and error value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: light: Release memory obtained by kasprintf
Arvind Yadav [Sat, 23 Sep 2017 07:55:30 +0000 (13:25 +0530)]
staging: greybus: light: Release memory obtained by kasprintf

Free memory region, if gb_lights_channel_config is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: media: atomisp: Use kmalloc_array instead of kmalloc
Georgiana Chelu [Tue, 26 Sep 2017 16:01:29 +0000 (09:01 -0700)]
Staging: media: atomisp: Use kmalloc_array instead of kmalloc

Prefer kmalloc_array over kmalloc with multiply
because kmalloc_array performs additional checks
before memory allocation.

Fix the following issue reported by checkpatch.pl:
* WARNING: Prefer kmalloc_array over kmalloc with multiply

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoatomisp2: remove cast from memory allocation
Aishwarya Pant [Fri, 22 Sep 2017 06:13:13 +0000 (11:43 +0530)]
atomisp2: remove cast from memory allocation

Patch removes the following warning issued was coccicheck:
WARNING: casting value returned by memory allocation function to (char *) is
useless.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: media: atomisp: pci: Place constant on the right side in comparissons
Georgiana Chelu [Wed, 20 Sep 2017 12:28:49 +0000 (05:28 -0700)]
Staging: media: atomisp: pci: Place constant on the right side in comparissons

Fix issue found by checkpatch.pl script.
WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: media: atomisp: pci: Move open brace '{' on the next line
Georgiana Chelu [Wed, 20 Sep 2017 12:28:48 +0000 (05:28 -0700)]
Staging: media: atomisp: pci: Move open brace '{' on the next line

Fix the following issue found by checkpatch.pl:
ERROR: open brace '{' following function definitions go on the next line

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: media: atomisp: Add blank line after declarations
Georgiana Chelu [Wed, 20 Sep 2017 12:28:47 +0000 (05:28 -0700)]
Staging: media: atomisp: Add blank line after declarations

This patch adds a blank line after declarations to
improve code readability.

Issue find by checkpatch.pl script.
WARNING: Missing a blank line after declarations

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: media: atomisp: Use unsigned int instead of unsigned
Georgiana Chelu [Wed, 20 Sep 2017 12:28:46 +0000 (05:28 -0700)]
Staging: media: atomisp: Use unsigned int instead of unsigned

Fix the checkpatch.pl issue:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8188eu: core: Fix line over 80 characters
Georgiana Chelu [Mon, 25 Sep 2017 12:34:07 +0000 (05:34 -0700)]
Staging: rtl8188eu: core: Fix line over 80 characters

Fix warning reported by checkpatch.pl script:
WARNING: line over 80 characters

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8188eu: core: Add spaces around '+'
Georgiana Chelu [Mon, 25 Sep 2017 12:34:06 +0000 (05:34 -0700)]
Staging: rtl8188eu: core: Add spaces around '+'

Improve the coding style by adding spaces around
arithmetic operation.

Issue reported by checkpatch.pl script.

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8188eu: core: Use __func__ instead of function name
Georgiana Chelu [Mon, 25 Sep 2017 12:34:05 +0000 (05:34 -0700)]
Staging: rtl8188eu: core: Use __func__ instead of function name

Replace the function name from format string with the
constant __func__ to avoid multiple changes in case
the name of the function will be modified.

Issue reported by checkpatch.pl script.

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: wrap lines in 80 characters
Aishwarya Pant [Fri, 22 Sep 2017 11:14:36 +0000 (16:44 +0530)]
staging: rtl8188eu: wrap lines in 80 characters

Perform cleanup for all function declarations in core/rtw_mlme_ext wherever
checkpatch complains about lines being over 80 characters long.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove implicit bool->int conversions
Aishwarya Pant [Fri, 22 Sep 2017 11:14:03 +0000 (16:44 +0530)]
staging: rtl8188eu: remove implicit bool->int conversions

Implicit type conversions are bad; they hinder readability of code and have
potential to cause bugs. Here the variable wait_ack is always supplied a bool
value while in function declarations it is defined as an int type. Fix it by
defining wait_ack a bool type in all usages.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unneeded conversions to bool
Aishwarya Pant [Fri, 22 Sep 2017 11:13:39 +0000 (16:43 +0530)]
staging: rtl8188eu: remove unneeded conversions to bool

Patch suppresses the following warning issued by coccicheck:
WARNING: conversion to bool not needed here

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove typedef struct vchiq_2835_state_struct
Mihaela Muraru [Thu, 28 Sep 2017 18:48:19 +0000 (21:48 +0300)]
staging: vc04_services: Remove typedef struct vchiq_2835_state_struct

This patch removes typedef from struct and renames it from "typedef
struct vchiq_2835_state_struct" to "struct vchiq_2835_state" as per
kernel coding standards.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove extern variable
Mihaela Muraru [Thu, 28 Sep 2017 16:17:56 +0000 (19:17 +0300)]
staging: vc04_services: Remove extern variable

This patch removes extern variable vchiq_arm_log_level, because it is
already declared in vchiq_arm.h

Issue found by checkpatch.pl

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: vc04_services: remove unused variables
Keerthi Reddy [Thu, 28 Sep 2017 14:58:40 +0000 (20:28 +0530)]
Staging: vc04_services: remove unused variables

the volatile fields of bcm2835_alsa_stream -
control and status are not used.

$ grep bcm2835_alsa_stream
>From the above command all instances we see that
all variables of 'bcm2835_alsa_stream' are declared as
'alsa_stream'

So search for 'control' wherever we have 'alsa_stream'

$ grep -l 'alsa_stream' | xargs grep "control"
The above command returns where we don't any usage of
'control' field. which means that there is no usage of
these fields.

similarly for 'status' we see no usages.

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: vc04_services: bcm2835-camera: use BIT macro
Keerthi Reddy [Wed, 27 Sep 2017 18:58:15 +0000 (00:28 +0530)]
Staging: vc04_services: bcm2835-camera: use BIT macro

Use BIT macro instead of left shift

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: fix typos
Keerthi Reddy [Wed, 27 Sep 2017 17:50:13 +0000 (23:20 +0530)]
staging: vc04_services: fix typos

Some words are misspelled. Fix typos.

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: please do not use multiple blank lines
Keerthi Reddy [Wed, 27 Sep 2017 17:49:46 +0000 (23:19 +0530)]
staging: vc04_services: please do not use multiple blank lines

Blank lines use up extra space in file and makes the file
larger. So do not use multiple blanklines

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: fsl-mc: remove unnecessary parenthesis
Keerthi Reddy [Thu, 28 Sep 2017 08:53:21 +0000 (14:23 +0530)]
Staging: fsl-mc: remove unnecessary parenthesis

Remove unnecessary parenthesis

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: pi433: fix grammar issues
Keerthi Reddy [Wed, 27 Sep 2017 18:49:22 +0000 (00:19 +0530)]
Staging: pi433: fix grammar issues

- This commit fixes spelling issues in documentation files.

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: irda: drivers: Replace seq_printf with seq_puts or seq_putc
Georgiana Chelu [Sat, 23 Sep 2017 22:13:44 +0000 (01:13 +0300)]
Staging: irda: drivers: Replace seq_printf with seq_puts or seq_putc

Replace seq_printf with seq_puts or seq_putc when
there is no argument list.

Fix the checkpatch warning:
WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: replace list_for_each with list_for_each_entry
Haneen Mohammed [Sat, 23 Sep 2017 02:22:39 +0000 (20:22 -0600)]
staging: lustre: lnet: replace list_for_each with list_for_each_entry

Replace use of the combination of list_for_each() and list_entry() with
list_for_each_entry() to simplify the code and remove variables that are
used only in list_for_each().
Issue found and corrected using Coccinelle script:

@r@
expression head, member, e;
type T1, T2, T3;
iterator name list_for_each, list_for_each_entry;
identifier pos, var;
@@

-T1 *pos;
...when!=pos

-list_for_each(pos, head)
+list_for_each_entry(var, head, member)
{
...when!=pos
   when!=T3 *var;
-var = list_entry(pos, T2, member);
...when!=pos
}
...when!=pos

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: Blank lines aren't necessary before a close brace '}'
Keerthi Reddy [Sat, 23 Sep 2017 18:58:12 +0000 (00:28 +0530)]
staging: wilc1000: Blank lines aren't necessary before a close brace '}'

Before closing the brace, the blank line is not needed. That blank
line has not meaning here. so remove it.

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: No space is necessary after a cast
Keerthi Reddy [Sat, 23 Sep 2017 18:57:48 +0000 (00:27 +0530)]
staging: wilc1000: No space is necessary after a cast

A space after type casting is not needed. All the other typecasts
in this file don't put space after typecast. so remove space
after typecast at this line.

checked with checkpatch.pl script

Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: Fix comment block coding style
Mihaela Muraru [Wed, 27 Sep 2017 07:43:45 +0000 (00:43 -0700)]
staging: speakup: Fix comment block coding style

This is a patch to the spk_ttyio.c file that fix up a comment block
warninig, found by checkpatch.pl tool, by adding */ on a separte line.

WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: Use octal permissions '0444'
Mihaela Muraru [Sun, 24 Sep 2017 08:49:41 +0000 (11:49 +0300)]
staging: speakup: Use octal permissions '0444'

Fixed the following checkpatch warning:

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal
permissions '0444'.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visornic: clean up parenthesis
David Kershner [Wed, 27 Sep 2017 17:14:50 +0000 (13:14 -0400)]
staging: unisys: visornic: clean up parenthesis

Clean up unneeded parenthesis reported by checkpatch.pl.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorhba: clean up parenthesis
David Kershner [Wed, 27 Sep 2017 17:14:49 +0000 (13:14 -0400)]
staging: unisys: visorhba: clean up parenthesis

Clean up unneeded parenthesis reported by checkpatch.pl.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Fix extraneous parenthesis
David Kershner [Wed, 27 Sep 2017 17:14:48 +0000 (13:14 -0400)]
staging: unisys: visorbus: Fix extraneous parenthesis

Clean up unneeded () that are being reported by checkpatch.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: fix comments in vbuschannel.h
Sameer Wadgaonkar [Wed, 27 Sep 2017 17:14:47 +0000 (13:14 -0400)]
staging: unisys: visorbus: fix comments in vbuschannel.h

This patch fixes some comments in the file vbuschannel.h to make
it more uniform.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: fix comments and spacing issues in visorbus.h
Sameer Wadgaonkar [Wed, 27 Sep 2017 17:14:46 +0000 (13:14 -0400)]
staging: unisys: include: fix comments and spacing issues in visorbus.h

This patch fixes some comments and spacings in the file visorbus.h
to make it more uniform.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: fix line over 80 characters checkpatch warning
Sameer Wadgaonkar [Wed, 27 Sep 2017 17:14:45 +0000 (13:14 -0400)]
staging: unisys: visorbus: fix line over 80 characters checkpatch warning

This patch fixes two checkpatch issues of line over 80 characters
in visorchipset.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: simplify visorchannel_create_guts
Sameer Wadgaonkar [Wed, 27 Sep 2017 17:14:44 +0000 (13:14 -0400)]
staging: unisys: visorbus: simplify visorchannel_create_guts

Removing the two wrapper functions dealing with visorchannel_create() and
instead just always use a new version of visorchannel_create() with an
additional parameter.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: check the whole channel instead of just guid for match
Sameer Wadgaonkar [Wed, 27 Sep 2017 17:14:43 +0000 (13:14 -0400)]
staging: unisys: check the whole channel instead of just guid for match

Validate that the channel contents match the channel type that we are
matching.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: Remove unused enum
David Binder [Wed, 27 Sep 2017 17:14:42 +0000 (13:14 -0400)]
staging: unisys: include: Remove unused enum

Removes unused enum that pertains to s-Par diagnostics capabilities.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: Remove unnecessary macro to generate signature
David Binder [Wed, 27 Sep 2017 17:14:41 +0000 (13:14 -0400)]
staging: unisys: include: Remove unnecessary macro to generate signature

Removes unnecessary SIGNATURE_16 macro used to generate a simple 32-bit
signature.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: Rename channel.h to visorchannel.h
David Binder [Wed, 27 Sep 2017 17:14:40 +0000 (13:14 -0400)]
staging: unisys: include: Rename channel.h to visorchannel.h

In order to avoid a potential conflict with other drivers that define a
channel.h file, the s-Par channel.h file is renamed in accordance with the
surrounding driver-set namespace.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: clean up parameter formatting
David Kershner [Wed, 27 Sep 2017 17:14:39 +0000 (13:14 -0400)]
staging: unisys: visorbus: clean up parameter formatting

Cleans up parameter formatting in visorbus.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX
David Kershner [Wed, 27 Sep 2017 17:14:38 +0000 (13:14 -0400)]
staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX

Shrinks the name of POLLJIFFIES_CONTORLVMCHANNEL_FAST and
POLLJIFFIES_CONTROLVMCHANNEL_SLOW to just POLLJIFFIES_CONTROLVM_XXXX.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorchipset.c: Remove useless initializations
David Kershner [Wed, 27 Sep 2017 17:14:37 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorchipset.c: Remove useless initializations

Found several more useless initializations in visorchipset.c get rid of
them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: remove visorbus_type extern
David Kershner [Wed, 27 Sep 2017 17:14:36 +0000 (13:14 -0400)]
staging: unisys: remove visorbus_type extern

The variable visorbus_type could be contained to the visorbus_main.c
file by moving the two functions that referenced it visorchipset.c. This
allowed us to remove the incorrect extern from the include file visorbus.h.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: keep the success path on the left side
David Kershner [Wed, 27 Sep 2017 17:14:35 +0000 (13:14 -0400)]
staging: unisys: visorbus: keep the success path on the left side

If you can't find the dev, it is an error. Indent for the error, instead
of the success.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: consolidate a comment
David Kershner [Wed, 27 Sep 2017 17:14:34 +0000 (13:14 -0400)]
staging: unisys: include: consolidate a comment

Use all 80 characters of the line to consolidate a comment.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: remove signature_32
David Kershner [Wed, 27 Sep 2017 17:14:33 +0000 (13:14 -0400)]
staging: unisys: include: remove signature_32

Remove signature_32 since it was only being referenced in one location.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: reorder to avoid forward declaration
David Kershner [Wed, 27 Sep 2017 17:14:32 +0000 (13:14 -0400)]
staging: unisys: include: reorder to avoid forward declaration

The include file visorbus.h has a forward declaration of visor_device.
A simple reorder of the file removed the need for the forward
declaration.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: vbuschannel doesn't use ctypes
David Kershner [Wed, 27 Sep 2017 17:14:31 +0000 (13:14 -0400)]
staging: unisys: visorbus: vbuschannel doesn't use ctypes

Don't include ctypes in vbuschannel.h, it isn't used by ctypes, but it is
used by visorbus_main.c so include it there.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: include: remove io.h from channel.h
David Kershner [Wed, 27 Sep 2017 17:14:30 +0000 (13:14 -0400)]
staging: unisys: include: remove io.h from channel.h

Channel.h was including io.h and not using it. Remove the #include.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: only include a file where it is used.
David Kershner [Wed, 27 Sep 2017 17:14:29 +0000 (13:14 -0400)]
staging: unisys: only include a file where it is used.

The header file visorbus.h included several linux headers that were
used by the source files that include it. Move the includes to the
files that actually use them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: to_visor_device/to_visor_driver move up
David Kershner [Wed, 27 Sep 2017 17:14:28 +0000 (13:14 -0400)]
staging: unisys: visorbus: to_visor_device/to_visor_driver move up

The macros to_visor_device and to_visor_driver are fairly small; move them
up to the declaration block to save some space.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorbus_main.c: remove blank lines
David Kershner [Wed, 27 Sep 2017 17:14:27 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorbus_main.c: remove blank lines

Removes several extraneous blank lines in visorbus_main.c.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset
David Kershner [Wed, 27 Sep 2017 17:14:26 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset

Remove extraneous blank lines and get consistency of blank lines.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: fix newlines for visorchannel
David Kershner [Wed, 27 Sep 2017 17:14:25 +0000 (13:14 -0400)]
staging: unisys: visorbus: fix newlines for visorchannel

Remove extraneous blank lines and add some lines that are needed. General
philosophy -- declaration, space, pre-conditions (if needed), space, then
rest of function.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: Remove unneeded initialization
David Kershner [Wed, 27 Sep 2017 17:14:24 +0000 (13:14 -0400)]
staging: unisys: visorbus: Remove unneeded initialization

No need to set drv to NULL.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: simplify debugfs print statment
David Kershner [Wed, 27 Sep 2017 17:14:23 +0000 (13:14 -0400)]
staging: unisys: visorbus: simplify debugfs print statment

Simplify debugfs statement so it is clearer and more compact.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: clean up formatting of function definitions
David Kershner [Wed, 27 Sep 2017 17:14:22 +0000 (13:14 -0400)]
staging: unisys: visorbus: clean up formatting of function definitions

Consolidate function parameters onto the same line if they can fit.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: shrink the name of a variable
David Kershner [Wed, 27 Sep 2017 17:14:21 +0000 (13:14 -0400)]
staging: unisys: shrink the name of a variable

The field debugfs_client_bus_info can be reduced to debugfs_bus_info.
The word client is extraneous in this context.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: keep the success path on the left
David Kershner [Wed, 27 Sep 2017 17:14:20 +0000 (13:14 -0400)]
staging: unisys: visorbus: keep the success path on the left

The code was indenting for the successful path and then combining the
error and success path for the rest of the function. Correct it so the
success path is not indented.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: clean up initializations
David Kershner [Wed, 27 Sep 2017 17:14:19 +0000 (13:14 -0400)]
staging: unisys: visorbus: clean up initializations

Don't compute value of offset during initialization. Assigning a value to
offset should happen after we have verified all of its components.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys; visorbus: visorbus_main.c: remove extraneous newline
David Kershner [Wed, 27 Sep 2017 17:14:18 +0000 (13:14 -0400)]
staging: unisys; visorbus: visorbus_main.c: remove extraneous newline

Use all 80 characters when calling functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: fix up device_destroy
David Kershner [Wed, 27 Sep 2017 17:14:17 +0000 (13:14 -0400)]
staging: unisys: fix up device_destroy

Visorbus_remove_instance calls device_unregister which in turn will call
visorbus_release_busdevice. The function visorbus_release_busdevice was
freeing the visor_device. The code in visorbus_remove_instance was then
trying to reference the visor_device. This patch cleans up the code so
the visor_device is not referenced after the unregister.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: NULL pending_msg_hdr not an error
David Kershner [Wed, 27 Sep 2017 17:14:16 +0000 (13:14 -0400)]
staging: unisys: visorbus: NULL pending_msg_hdr not an error

A NULL pending_msg_hdr is not an error, it just means that the firmware
does not want an error response for that message.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: don't put code in declaration.
David Kershner [Wed, 27 Sep 2017 17:14:15 +0000 (13:14 -0400)]
staging: unisys: visorbus: don't put code in declaration.

Simplify the code by not putting the assignment in the declaration. Define
it and then assign it, so the function doesn't get bunched up on the
right.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: use guid_is_equal instead of memcmp
David Kershner [Wed, 27 Sep 2017 17:14:14 +0000 (13:14 -0400)]
staging: unisys: visorbus: use guid_is_equal instead of memcmp

The function publish_vbus_dev_info was doing a memcmp of guids. It should
be using the kernel provided guid_equal function instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments
David Kershner [Wed, 27 Sep 2017 17:14:13 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments

Use all 80 characters of the line for comments to help reduce the number
of extra lines in the code.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorbus_private.h remove extra blank lines
David Kershner [Wed, 27 Sep 2017 17:14:12 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorbus_private.h remove extra blank lines

Remvoe several unneeded blank lines.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: fix alignment of paranethesis
David Kershner [Wed, 27 Sep 2017 17:14:11 +0000 (13:14 -0400)]
staging: unisys: visorbus: fix alignment of paranethesis

Correct indenting of parameters when calling the functions in the file
visorchipset.c.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys; visorbus: visorchipset.c: remove extraneous newline
David Kershner [Wed, 27 Sep 2017 17:14:10 +0000 (13:14 -0400)]
staging: unisys; visorbus: visorchipset.c: remove extraneous newline

Use all 80 characters when calling functions.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: visorchannel: use 80 characters for comments
David Kershner [Wed, 27 Sep 2017 17:14:09 +0000 (13:14 -0400)]
staging: unisys: visorbus: visorchannel: use 80 characters for comments

In the file visorhcannel.c use all 80 characters for comments instead of
shortening them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: clean up parser_string_get function
David Kershner [Wed, 27 Sep 2017 17:14:08 +0000 (13:14 -0400)]
staging: unisys: visorbus: clean up parser_string_get function

The function parser_string_get was writing its own strnlen function, use
the kernel version instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: don't need local variable cmd
David Kershner [Wed, 27 Sep 2017 17:14:07 +0000 (13:14 -0400)]
staging: unisys: visorbus: don't need local variable cmd

The local variable cmd was just being used to dereference a field inside
of it. Get rid of the variable and just derefernce the parameter being
passed in.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: simplify commenting in controlvm_init
David Kershner [Wed, 27 Sep 2017 17:14:06 +0000 (13:14 -0400)]
staging: unisys: visorbus: simplify commenting in controlvm_init

During the process of udpating the features bits, put a block comment for
all updates instead of a separate comment for each one.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: Fix indent coding style issue
Mihaela Muraru [Tue, 26 Sep 2017 07:24:50 +0000 (10:24 +0300)]
staging: rtl8712: Fix indent coding style issue

This patch fixes an indentation coding style issue found by
checkpatch.pl:

WARNING: suspect code indent for conditional statements (16, 32)

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8723bs: core: Remove boolean comparison
Georgiana Chelu [Fri, 22 Sep 2017 15:04:51 +0000 (08:04 -0700)]
Staging: rtl8723bs: core: Remove boolean comparison

Remove comparison to bool in order to improve
the clearness of the code.

Issue found using coccinelle script.

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoiio:stm32-lp-timer and ep93xx: drop assign iio_info.driver_module and iio_trigger_ops...
Jonathan Cameron [Tue, 26 Sep 2017 07:05:08 +0000 (08:05 +0100)]
iio:stm32-lp-timer and ep93xx: drop assign iio_info.driver_module and iio_trigger_ops.owner

The equivalent of both of these are now done via macro magic when
the relevant register calls are made.  The actual structure
elements have gone away.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge tag 'iio-for-4.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Mon, 25 Sep 2017 10:56:37 +0000 (12:56 +0200)]
Merge tag 'iio-for-4.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Round one of new device support, features and cleanup for IIO in the 4.15 cycle.

Note there is a misc driver drop in here given we have support
in IIO and the feeling is no one will care.

A large part of this series is a boiler plate removal series avoiding
the need to explicitly provide THIS_MODULE in various locations.
It's very dull but touches all drivers.

New device support
* ad5446
  - add ids to support compatible parts DAC081S101, DAC101S101,
    DAC121S101.
  - add the dac7512 id and drop the misc driver as feeling is no
    one is using it (was introduced for a board that is long obsolete)
* mt6577
  - add bindings for mt2712 which is fully compatible with other
    supported parts.
* st_pressure
  - add support for LPS33HW and LPS35HW with bindings (ids mostly).

New features
* ccs811
  - Add support for the data ready trigger.
* mma8452
  - remove artifical restriction on supporting multiple event types
    at the same time.
* tcs3472
  - support out of threshold events

Core and tree wide cleanup
* Use macro magic to remove the need to provide THIS_MODULE as part of
  struct iio_info or struct iio_trigger_ops.  This is similar to
  work done in a number of other subsystems (e.g. i2c, spi).

  All drivers are fixed and then the fields in these structures are
  removed.

  This will cause build failures for out of tree drivers and any
  new drivers that cross with this work going into the kernel.

  Note mostly done with a coccinelle patch, included in the series
  on the mailing list but not merged as the fields no longer exist
  in the structures so the any hold outs will cause a build failure.

Cleanups
* ads1015
  - avoid writing config register when it doesn't change.
  - add 10% to conversion wait time as it seems it is sometimes
    a little small.
ade7753
  - replace use of core mlock with a local lock.  This is part of a
    long term effort to make the use of mlock opaque and single
    purpose.
ade7759
  - expand the use of buf_lock to cover previous mlock cases.  This
    is a slightly nicer solution to the same issue as in ade7753.
* cros_ec
  - drop an unused variable
* inv_mpu6050
  - add a missing break in a switch for consistency - not actual
    bug,
  - make some local arrays static to save on object code size.
* max5481
  - drop manual setting of the spi module owner as handled by the
    spi core.
* max5487
  - drop manual setting of the spi module owner as handled by the
    spi core.
* max9611
  - drop explicit setting of the i2c module owner as handled by
    the i2c core.
* mcp320x
  - speed up reads on single channel devices,
  - drop unused of_device_id data elements,
  - document the struct mcp320x,
  - improve binding docs to reflect restrictions on spi setup and
    to make it explicit that the reference regulator is needed.
* mma8452
  - symbolic to octal permissions,
  - unsigned to unsigned int.
* st_lsm6dsx
  - avoid setting odr values multiple times,
  - drop config of LIR as it is only ever set to the existing
    defaults,
  - drop rounding configuration as it only ever matches the defaults.
* ti-ads8688
  - drop manual setting of the spi module owner as handled by the
    spi core.
* tsl2x7x
  - constify the i2c_device_id,
  - cleanup limit checks to avoid static checker warnings (and generally
    have nicer code).

6 years agoiio: imu: st_lsm6dsx: remove rounding configuration
Lorenzo Bianconi [Sat, 23 Sep 2017 19:10:52 +0000 (21:10 +0200)]
iio: imu: st_lsm6dsx: remove rounding configuration

Remove rounding configuration since it is enabled by default for the
FIFO output registers

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: imu: st_lsm6dsx: remove LIR configuration
Lorenzo Bianconi [Sat, 23 Sep 2017 19:10:51 +0000 (21:10 +0200)]
iio: imu: st_lsm6dsx: remove LIR configuration

Remove Latched Interrupt configuration since it is enabled by default
for FIFO watermark interrupt

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: mt2712: Add compatible node for mt2712.
Zhiyong Tao [Thu, 21 Sep 2017 01:26:51 +0000 (09:26 +0800)]
iio: adc: mt2712: Add compatible node for mt2712.

This commit adds mt2712 compatible node.

Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: adc: mt2712: add binding documention
Zhiyong Tao [Thu, 21 Sep 2017 01:26:50 +0000 (09:26 +0800)]
dt-bindings: adc: mt2712: add binding documention

The commit adds mt2712 compatible node in binding document.

Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: adc: mcp320x: Update for mcp3550/1/3
Lukas Wunner [Sat, 9 Sep 2017 18:32:41 +0000 (20:32 +0200)]
dt-bindings: iio: adc: mcp320x: Update for mcp3550/1/3

All chips supported by this driver clock data out on the falling edge
and latch data in on the rising edge, hence SPI mode (0,0) or (1,1)
must be used.

Furthermore, none of the chips has an internal reference voltage
regulator, so an external supply is always required and needs to be
specified in the device tree lest the IIO "scale" in sysfs cannot be
calculated.

Document these requirements in the device tree binding, add compatible
strings for the newly supported mcp3550/1/3 and explain that SPI mode
(0,0) should be preferred for these chips.

Cc: Mathias Duckeck <m.duckeck@kunbus.de>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: imu: st_lsm6dsx: set sensor->odr value just in st_lsm6dsx_write_raw()
Lorenzo Bianconi [Mon, 18 Sep 2017 17:49:57 +0000 (19:49 +0200)]
iio: imu: st_lsm6dsx: set sensor->odr value just in st_lsm6dsx_write_raw()

Update odr value in st_lsm6dsx_sensor data structure just in
st_lsm6dsx_write_raw() in order to avoid to set the same value
multiple times

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>