Colin Ian King [Thu, 16 Mar 2017 23:21:45 +0000 (23:21 +0000)]
staging: wilc1000: fix incorrect copy of pmkid data
The pmkid data is meant be be copied to the previous item in the
pmkidlist, however the code is just copying the data to itself because
the src index into pmkidlist is the same as the dst index into pmkidlist.
Fix this with i + 1 instead of i.
Detected by CoverityScan,CID#
13339465 ("Overlapping buffer in memory copy")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Fri, 17 Mar 2017 02:31:09 +0000 (22:31 -0400)]
staging: media: atomisp: add missing include in vlv2_plat_clock.c
To use IO functions like writel, readl, ioremap_nocache and iounmap,
linux/io.h should be included.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Fri, 17 Mar 2017 03:25:51 +0000 (08:55 +0530)]
staging: lustre: llite: rw26: Remove unused function definition
The patch removes unused function definition ll_get_user_pages().
The use of ll_get_user_pages() was replaced with iov_iter_get_pages_alloc()
in commit
91f79c43d1b54d7154b118860d81b39bad07dfff.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Thu, 16 Mar 2017 08:10:17 +0000 (08:10 +0000)]
staging: speakup: move those functions which do outgoing serial comms, into serialio.c
This moves spk_synth_immediate and spk_serial_synth_probe functions into
serialio.c. These functions do outgoing serial comms. The move is a step
towards collecting all serial comms in serialio.c. This also renames
spk_synth_immediate to spk_serial_synth_immediate.
Code inside those functions has not been changed. Along the way, this patch
also fixes a couple of spots which were calling spk_synth_immediate directly,
so that the calls now happen via the spk_syth struct.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mohsin Shan [Thu, 16 Mar 2017 03:51:42 +0000 (20:51 -0700)]
Staging: goldfish: use __func__ instead of embedded function names
Embedded function names are less appropriate to use when
refactoring, can cause function renaming. Prefer the use
of "%s", __func__ to embedded function names
Signed-off-by: Mohsin Shan <mohsinshan1k@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Fri, 17 Mar 2017 02:13:51 +0000 (22:13 -0400)]
Revert "staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled"
This reverts commit
fde469701c7efabebf885e785edf367bfb1a8f3f.
Adding a preprocessor condition is not the best solution to fix this
issue. Let's revert this commit before fixing this problem in a more
appropriate way.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 15 Mar 2017 20:34:20 +0000 (22:34 +0200)]
staging: gdm724x: fix checkpatch.pl camelCase warning
Fixes the checkpatch.pl warning: Avoid CamelCase
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tuomo Rinne [Wed, 15 Mar 2017 21:32:43 +0000 (21:32 +0000)]
staging: vt6655: Copy argument names from function definition to declaration to fix checkpatch warnings
Copied function argument names from definition to delcaration. This
fixes some checkpatch warnings.
Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 03:32:13 +0000 (23:32 -0400)]
staging: sm750fb: Removes unused variable from sm750_hw_copyarea
Removes unused variable opSign from sm750_hw_copyarea. Identified
using coccinelle script 'unused.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:38 +0000 (14:10 +0200)]
staging: wilc1000: Remove unnecessary brackets
Remove unnecessary brackets and correspondingly unindent code.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:37 +0000 (14:10 +0200)]
staging: wilc1000: Correct name of variables
Correct misspelled variables: 'happended' to 'happened' to make the
code grammatically correct.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:36 +0000 (14:10 +0200)]
staging: wilc1000: Declare variables to top of function
Move declaration of variables to top of function to make the code more
readable.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 14 Mar 2017 23:44:29 +0000 (10:44 +1100)]
staging: dgnc: preserve return code
Return code from tty_check_change() should be being
preserved.
Preserve return code from call to tty_check_change().
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:38 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT
Checkpatch emits WARNING and CHECK for prototype declarations.
WARNING: function definition argument 'void *' should also have an identifier name
CHECK: Alignment should match open parenthesis
Also prototype parameters wrap more than is necessary.
Tidy up function prototypes. Fix 5 error/warning instances.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:37 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE
Checkpatch emits WARNING: Block comments use a trailing */ on a
separate line.
Move comments to (kernel doc format) struct comment.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:36 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch SPACING
Checkpatch emits WARNING: Unnecessary space before function pointer
arguments.
Remove unnecessary space before function pointer.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 02:57:32 +0000 (13:57 +1100)]
staging: ks7010: remove dead code
Driver has dead code compiled out using preprocessor directives. TODO
file asks for these not to be removed - ignore this.
Remove dead code. Remove 'do not remove #if 0/1 ...' from TODO file.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 02:57:31 +0000 (13:57 +1100)]
staging: ks7010: remove superfluous comments
Driver uses custom function comment format. These comments are on
functions with internal likage. Comment string /*--------/* adds
nothing to the driver. Comment 'Wireless Handler' does not have allot
of meaning.
Remove superfluous function comments. Leave comments that add meaning.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 14 Mar 2017 10:20:12 +0000 (21:20 +1100)]
staging: ks7010: remove custom return values
Driver code uses custom return values (often positive) to signal error
condition instead of using standard kernel error codes.
Replace custom return values with standard kernel error codes.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 01:01:07 +0000 (12:01 +1100)]
staging: ks7010: fix off by one error
Bug introduced in commit
7676b72 by Tobin C. Harding.
Remove equals sign from comparison, fixing off by one error.
Fixes: 7676b72428e8 ("staging: ks7010: move comparison to right hand side")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:56:44 +0000 (10:56 +0300)]
staging: atomicsp: fix a loop timeout
It's a post-op loop so we timeout with "max_wait" set to -1, not 0.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Tue, 14 Mar 2017 18:43:21 +0000 (00:13 +0530)]
staging: rtl8192u: Remove multiple assignments
This patch removes multiple assignments by factorizing them.
This was done with Coccinelle for the if branch. For the else part
the change was done manually since Coccinelle only detects constants.
Braces were also added to the else part to remove the checkpatch
warning, "braces should be on all arms of if-else statements".
@@
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=c;
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrii Vladyka [Tue, 14 Mar 2017 09:29:44 +0000 (11:29 +0200)]
staging: rtl8188eu: removed blank lines coding style problem
Fix 'multiple blank lines' coding style problem reported by checkpatch.pl.
Signed-off-by: Andrii Vladyka <tulup@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:56:19 +0000 (10:56 +0300)]
staging: rtl8188eu: fix some inverted conditions
We converted these conditions from == NULL and != NULL but messed up
and inverted some.
Fixes: e31447f934d3 ("staging: rtl8188eu: Replace x==NULL by !x")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Wed, 15 Mar 2017 16:47:41 +0000 (22:17 +0530)]
staging: vc04_services: Replace typedef with struct
Using typedef for a structure type and upper case struct names is not
suggested in Linux kernel coding style guidelines. Hence, occurences
of typedefs have been removed and struct names converted to lowercase
in the file. Grep was also used to ensure that all occurence of the
typedefs have been removed. The module compiles without any warnings
or errors.
Script 1:
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_T":
coccinelle.T2 = T[:-2].lower();
print T
else:
coccinelle.T2=T.lower();
@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
@r3@
type r1.T;
identifier c1.T2;
@@
- T
+ struct T2
Script 2:
@@
typedef VCHIQ_ELEMENT_T;
@@
(
- VCHIQ_ELEMENT_T
+ struct vchiq_element
)
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Wed, 15 Mar 2017 13:11:11 +0000 (18:41 +0530)]
staging: vc04_services: Remove type and function prototype
The function prototype is for a function that is not even in
the kernel, and hence has been removed.
The type VCHIQ_SHARED_MEM_INFO_T is not used anywhere in the
kernel as well.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jean-Baptiste Abbadie [Tue, 14 Mar 2017 19:14:20 +0000 (20:14 +0100)]
staging: vc04_services: Remove unused functions
These four functions are not used and report errors with sparse.
Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Wed, 15 Mar 2017 18:09:21 +0000 (14:09 -0400)]
staging: media: atomisp: remove duplicate includes
These duplicate includes have been found with scripts/checkincludes.pl
but they have been removed manually to avoid removing false positives.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Wed, 15 Mar 2017 18:09:20 +0000 (14:09 -0400)]
staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled
When CONFIG_ION is disabled, HMM_BO_LAST is 3. In this case, "i" should
not be added in hmm_bo_type_strings.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:56:19 +0000 (14:56 +0900)]
staging: atomisp: fix "alignment should match open parenthesis"
Fix checkpatch.pl issues in atomisp_cmd.c
: "CHECK: Alignment should match open parenthesis"
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:58 +0000 (14:55 +0900)]
staging: atomisp: remove useless #ifdef ISP2401 on top of atomisp_cmd.c
There is no reason to have "#ifdef ISP2401" condition
on top of atomisp_cmd.c file
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:29 +0000 (14:55 +0900)]
staging: atomisp: fix inconsistent indenting
Fix warnings from the smatch tool
atomisp_cmd.c:5698
atomisp_set_fmt_to_snr() warn: inconsistent indenting
atomisp_cmd.c:5714
atomisp_set_fmt_to_snr() warn: inconsistent indenting
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:06 +0000 (14:55 +0900)]
staging: atomisp: fix unsigned int comparison with less than zero
Fix warnings from the smatch tool
atomisp_cmd.c:2649
atomisp_set_array_res() warn:
unsigned 'config->width' is never less than zero.
atomisp_cmd.c:2650
atomisp_set_array_res() warn:
unsigned 'config->height' is never less than zero.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:14 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size
Repaces pointer comparison to 0 with NULL in ia_css_queue_get_size
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:09 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue
Repaces pointer comparison to 0 with NULL in ia_css_queue_dequeue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:05 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue
Repaces pointer comparison to 0 with NULL in ia_css_queue_enqueue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobias Regnery [Tue, 14 Mar 2017 11:47:17 +0000 (12:47 +0100)]
staging: media: atomisp: fix build error in ov5693 driver
The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev.
However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is
set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is
not set:
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove':
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct v4l2_subdev' has no member named 'entity'
media_entity_cleanup(&dev->sd.entity);
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct v4l2_subdev' has no member named 'entity'
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
^
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct v4l2_subdev' has no member named 'entity'
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
Add the corresponding Kconfig dependency to solve this error.
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:53:52 +0000 (10:53 +0300)]
Staging: atomisp: kfreeing a devm allocated pointer
We shouldn't pass devm allocated pointers to kfree() or it leads to a
double free.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:55:01 +0000 (10:55 +0300)]
staging: atomisp: silence an array overflow warning
Static checkers complain that we should check if "i" is in bounds
before we check if "var8[i]" is a NUL char. This bug is harmless but
also easy to fix.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:51:50 +0000 (10:51 +0300)]
staging/atomisp: silence uninitialized variable warnings
These print an uninitialized value for "opt". Let's just remove the
printk.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:51:31 +0000 (10:51 +0300)]
staging: atomisp: off by one in atomisp_acc_load_extensions()
We should be doing i-- on all error paths but we don't if the loop
finishes successfully. I've re-arranged this so that we don't read
beyond the end of acc_flag_to_pipe[] array.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Tue, 14 Mar 2017 05:40:21 +0000 (06:40 +0100)]
staging: media: atomisp: fix semicolon.cocci warnings
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 14 Mar 2017 13:55:07 +0000 (19:25 +0530)]
staging: dvb-frontends: removed code in comments.
Commenting out Code is a Bad Idea.
Comments are their to explain the code and how the code achieves its
goal and as codes in the comments does not explain what the code is
doing so there is no use of commenting them.
So in this patch codes in the comments are removed.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 14 Mar 2017 13:55:06 +0000 (19:25 +0530)]
staging: speakup: identation should use tabs
Indentation should always use tabs and never spaces.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 14 Mar 2017 05:16:42 +0000 (10:46 +0530)]
staging: speakup: Add blank line after declarations
Patch fixes the warnings reported by checkpatch.pl
for please use a blank line after function/struct/union/enum
declarations.
Add a blank line after enum and struct declarations.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Samuel Thibault [Tue, 14 Mar 2017 19:56:21 +0000 (20:56 +0100)]
speakup: Fix bogus caps on speaking unicode characters
commit
33590c185299 ("speakup: Support spelling unicode characters")
mistakenly passed unicode characters to IS_CHAR(), which only
supports latin1. Let's assume non-latin1 is lower case, like is done
in spell_word().
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Tue, 14 Mar 2017 13:41:54 +0000 (13:41 +0000)]
staging: speakup: move spk_stop_serial_interrupt into synth-specific release function
This moves call to spk_stop_serial_interrupt() function out of synth_release()
and into release() method of specific spk_synth instances. This is because
the spk_stop_serial_interrupt() call is specific to current serial i/o
implementation. Moving it into each synth's release() method gives the
decision of calling spk_stop_serial_interrupt() to that synth.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Tue, 14 Mar 2017 13:41:53 +0000 (13:41 +0000)]
staging: speakup: add spk_io_ops struct to spk_synth
This patch adds spk_io_ops struct which contain those methods whose job is to
communicate with synth device. Currently, all comms with external synth
device use raw serial i/o. The idea is to group all methods which do the
actual communication with external device into this new struct. Then migrating
a serial-based synth over to an alternative to raw serial i/o will mean
swapping serial spk_io_ops instance with the io_ops instance of the new
method, making the migration simpler.
At the moment, this struct only contains one method, synth_out but more will
be added in future when migrating synths which require input functionality.
Also at the moment, synth_out method has one implementation which uses
serial i/o. Plan is to add an alternative.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Tue, 14 Mar 2017 13:41:52 +0000 (13:41 +0000)]
staging: speakup: spk_serial_out and spk_wait_for_xmitr to take synth arg
These two functions are always called from a context where spk_synth instance
is available. They also use the spk_synth instance but instead of taking it
as an argument, they rely on a global spk_synth instance inside synth.c which
points to the same synth as the one being passed in as argument.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 14 Mar 2017 02:07:45 +0000 (11:07 +0900)]
staging: dgnc: remove useless switch-case statements
The dgnc_tty_send_break() has a switch-case condition for msec.
It is no use except case -1.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Tue, 14 Mar 2017 02:05:32 +0000 (11:05 +0900)]
staging: dgnc: ch->ch_bd is already assigned to bd variable
The bd variables in functions are already assigned from
ch->ch_bd but it is not used in those functions except checking NULL.
The ch->ch_bd could be replaced with bd variable.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:02:04 +0000 (15:02 -0400)]
bus: fsl-mc: dpio: add maintainer for DPIO
add Roy Pledge as maintainer of DPIO
Signed-off-by: Roy Pledge <Roy.Pledge@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:02:03 +0000 (15:02 -0400)]
bus: fsl-mc: dpio: add the DPAA2 DPIO object driver
The DPIO driver registers with the fsl-mc bus to handle bus-related
events for DPIO objects. Key responsibility is mapping I/O
regions, setting up interrupt handlers, and calling the DPIO
service initialization during probe.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:02:02 +0000 (15:02 -0400)]
bus: fsl-mc: dpio: add the DPAA2 DPIO service interface
The DPIO service interface handles initialization of DPIO objects
and exports APIs to be used by other DPAA2 object drivers to perform
queuing and buffer management related operations. The service allows
registration of callbacks when frames or notifications are received.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:02:01 +0000 (15:02 -0400)]
bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2
Add QBman APIs for frame queue and buffer pool operations.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:02:00 +0000 (15:02 -0400)]
bus: fsl-mc: dpio: add global dpaa2 definitions
Create header for global dpaa2 definitions. Add definitions
for dequeue results.
Signed-off-by: Roy Pledge <Roy.Pledge@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roy Pledge [Mon, 13 Mar 2017 19:01:59 +0000 (15:01 -0400)]
bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs
Add global definitions for DPAA2 frame descriptors and scatter
gather entries.
Signed-off-by: Roy Pledge <Roy.Pledge@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 13 Mar 2017 19:01:58 +0000 (15:01 -0400)]
bus: fsl-mc: dpio: add APIs for DPIO objects
Add the command build/parse APIs for operating on DPIO objects through
the DPAA2 Management Complex.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Mon, 13 Mar 2017 19:01:57 +0000 (15:01 -0400)]
bus: fsl-mc: dpio: add DPIO driver overview document
add document describing the dpio driver and it's role, components
and major interfaces
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:10 +0000 (09:54 +1100)]
staging: ks7010: refactor, whitespace only
Code may be refactored to take advantage of previous patches which
reduced the level of indentation. Function parameter line breaks can
be adjusted in line with kernel coding standards.
Refactor layout of function call parameters. Make whitespace changes
only.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:09 +0000 (09:54 +1100)]
staging: ks7010: reduce level of indentation
Checkpatch emits WARNING: Too many leading tabs - consider code
refactoring. One level of indentation may be removed by inverting an
if statement conditional (and returning if new conditional evaluates
to true). Code contains switch statement that also contains multiple
layers of indentation. Indentation may be reduced by breaking out of
the case statement in multiple places instead of guarding code with
if/else statements.
Invert conditional. Return original error code if new conditional
evaluates to true. Break out of case blocks instead of using
if/else. Do not modify program logic.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:08 +0000 (09:54 +1100)]
staging: ks7010: fix checkpatch memset warning
Checkpatch emits WARNING: single byte memset is suspicious. Swapped
2nd/3rd argument? Call site in question is correct but is an unusual
use of memset() to zero a single byte. The same can be achieved by
assigning 0 directly to the memory location.
Dereference pointer and assign 0 to that memory location. Use '\0' to
make explicit that it is a char pointer.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:07 +0000 (09:54 +1100)]
staging: ks7010: remove unnecessary cast
Return value from kmalloc() does not require a cast.
Remove unnecessary cast.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:06 +0000 (09:54 +1100)]
staging: ks7010: remove unnecessary else statement
Checkpatch emits WARNING: else is not generally useful after a break
or return. Two warnings of this type are emitted, both are the result
of a else statement after a return statement. The 'else' can safely be
removed.
Remove unnecessary else statement.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:05 +0000 (09:54 +1100)]
staging: ks7010: move comparison to right hand side
Checkpatch emits WARNING: Comparisons should place the constant on the
right side of the test.
Move constant to right hand side of test, modify operator to ensure
logic is maintained.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:04 +0000 (09:54 +1100)]
staging: ks7010: remove multiple assignment
Checkpatch emits CHECK: multiple assignments should be avoided.
Move multiple assignment onto separate lines. Fix comment to use more
natural English.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:03 +0000 (09:54 +1100)]
staging: ks7010: remove dead code
Checkpatch emits CHECK: Alignment should match open parenthesis. This
is due to commented out code.
Remove commented out (dead) code.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:02 +0000 (09:54 +1100)]
staging: ks7010: fix logical line continuation
Checkpatch emits CHECK: Logical continuations should be on the
previous line.
Move logical continuation to previous line.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:54:00 +0000 (09:54 +1100)]
staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE
Checkpatch emits block comments warnings.
Change comments blocks to be inline with kernel coding style for
networking code.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 22:53:59 +0000 (09:53 +1100)]
staging: ks7010: fix checkpatch SPACING
Checkpatch emits over 100 instances of CHECK: No space is necessary
after a cast.
Remove unnecessary space.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 23:46:42 +0000 (10:46 +1100)]
staging: ks7010: fix spelling of Michael MIC
Driver mixes spelling michael and michel in symbol names and
comments. Michael here references the IEEE 802.11i Message Integrity
Code. It is incorrect to spell it michel and confusing having two
spellings for the same thing.
Change michel -> micheal in both symbol names and comments.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
simran singhal [Mon, 13 Mar 2017 13:25:01 +0000 (18:55 +0530)]
staging: rtl8192u: ieee80211: Remove code in comments
Commenting out code is a bad idea.
As comments are for explaining what code is about.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 13 Mar 2017 18:20:28 +0000 (18:20 +0000)]
staging: atomisp: fix missing break in switch statement
I believe there is a missing break in the switch statement for
case V4L2_CID_FOCUS_STATUS as the current fall-through looks
suspect to me.
Detected by CoverityScan, CID#
1416580 ("Missing break in switch")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 13 Mar 2017 17:55:12 +0000 (17:55 +0000)]
staging/atomisp: remove redundant null check on frame
There is no need to perform a null check on frame as there is an earlier
null check check and return hence making the null check redundant.
Remove it.
Detected by CoverityScan, CID#
1416563 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 13 Mar 2017 12:34:14 +0000 (15:34 +0300)]
staging: atomisp: potential underflow in atomisp_get_metadata_by_type()
md_type is an enum. On my tests, GCC treats it as unsigned but
according to the C standard it's an implementation dependant thing so we
should check for negatives.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
simran singhal [Sun, 12 Mar 2017 17:10:23 +0000 (22:40 +0530)]
staging: media: Remove unused function atomisp_set_stop_timeout()
The function atomisp_set_stop_timeout on being called, simply returns
back. The function hasn't been mentioned in the TODO and doesn't have
FIXME code around. Hence, atomisp_set_stop_timeout and its calls have been
removed.
This was done using Coccinelle.
@@
identifier f;
@@
void f(...) {
-return;
}
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 12 Mar 2017 16:19:08 +0000 (21:49 +0530)]
staging: media: atomisp: Remove gc2235_init() function.
Remove gc2235_init() function definition and call, as it is used only
once in gc2235.c file. Replace the function call with return value,
__gc2235_init() function call.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 12 Mar 2017 16:17:04 +0000 (21:47 +0530)]
staging: media: atomisp: Compress return logic into one line.
Simplify function return by merging assignment and return into a single
line. The following coccinelle script is used to fix this issue.
@@
expression e;
local idexpression ret;
@@
-ret = e;
-return ret;
+return e;
This patch also removes unnecessary declarations.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Sun, 12 Mar 2017 15:55:20 +0000 (21:25 +0530)]
staging: media: mt9m114: Use true/false instead of 1/0 for bool initialisations
Bool initializations should use true and false instead of 1 and 0.
Detected by coccinelle/misc/boolinit.cocci.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:40:07 +0000 (21:10 +0530)]
staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()
In bcm2835_audio_open_connection(), if VCHI connection fails or
initialisation of VCHI audio instance fails vchi_instance needs to be
deallocated otherwise it will cause a memory leak.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:39:49 +0000 (21:09 +0530)]
staging: bcm2835-audio: deallocate work when queue_work(...) fails
This patch de-allocates work when queue_work(..) fails in the
bcm2835-audio work functions
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:39:31 +0000 (21:09 +0530)]
staging: bcm2835-audio: use conditional only for error case
* Refactor conditional to check if memory allocation has failed and
immediately return (-ENOMEM); if block for success case is removed.
* Return the error value -EBUSY when queue_work() fails.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:39:14 +0000 (21:09 +0530)]
staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM
It is better to propagate PTR_ERR value instead of a hardcoded value
(-EPERM here)
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:39:00 +0000 (21:09 +0530)]
staging: bcm2835-audio: replace null with error pointer value
This patch replaces NULL values returned by vc_vchi_audio_init(...) with
error pointer values:
- Return ERR_PTR(-EINVAL) when too many instances of audio
service are initialised
- Return ERR_PTR(-ENOMEM) when kzalloc fails
- RETURN ERR_PTR(-EPERM) when vchi connections fail to open
Similarly, a NULL check where vc_vchi_audio_init(...) is called is
replaced by IS_ERR(..)
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Sun, 12 Mar 2017 15:38:43 +0000 (21:08 +0530)]
staging: bcm2835-audio: Replace kmalloc with kzalloc
Replace kmalloc and memset with kzalloc.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Mon, 13 Mar 2017 20:48:49 +0000 (02:18 +0530)]
staging: sm750fb: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Mon, 13 Mar 2017 20:48:48 +0000 (02:18 +0530)]
staging: sm750fb: fixes add blank line after function/struct/union/enum declarations
This patch fixes the warnings reported by checkpatch.pl
for please use a blank line after function/struct/union/enum
declarations.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Mon, 13 Mar 2017 20:48:47 +0000 (02:18 +0530)]
staging: sm750fb: function prototype argument should have an identifier name
function prototype arguments like 'struct vb_device_info *','unsigned
long' etc. should have an identifier name.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 01:37:34 +0000 (12:37 +1100)]
staging: dgnc: remove explicit cast
Function return type is 'int'. Returned variable is of type
'uint'. uint can be implicitly converted to int. Most significant bit
is not set so there is no risk in implicit conversion.
Remove unnecessary type cast.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 01:37:33 +0000 (12:37 +1100)]
staging: dgnc: fix whitespace before return
Checkpatch emits CHECK: Blank lines aren't necessary before a close
brace '}'. Previous attempts were made to make uniform the error
handling in dgnc but improvements are still possible.
Undo whitespace changes that should not have been made :(. Make return
statement placement uniform throughout dgnc. Fix checkpatch
CHECK. Make whitespace changes only.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 01:37:32 +0000 (12:37 +1100)]
staging: dgnc: return error code directly
In various functions a return code variable is defined at the top of
function, for example;
rc = -ENODEV;
and then the variable is returned. This makes it harder to read since
it separates the error code from the return site.
Return the error code directly instead of using a variable.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
simran singhal [Sun, 12 Mar 2017 16:55:42 +0000 (22:25 +0530)]
staging: comedi: amplc_pci224: Convert macro GAT_CONFIG to static inline function
Convert macro GAT_CONFIG to static inline function as static inline
functions are preferred over macros. This change is possible since the
arguments at all call sites have the same type.
The uses were updated with Coccinelle:
@r1@
expression dev,reg,chan,src;
@@
-GAT_CONFIG(chan, src)
+pci224_gat_config(chan, src)
Also, the comment describing the macro has been removed.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sun, 12 Mar 2017 15:07:30 +0000 (20:37 +0530)]
staging: comedi: Compress return logic into one line.
Simplify function return by merging assignment and return into a single
line. The following coccinelle script is used to fix this issue.
@@
expression e;
local idexpression ret;
@@
-ret = e;
-return ret;
+return e;
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Craig Inches [Sun, 12 Mar 2017 19:18:40 +0000 (19:18 +0000)]
staging: lustre shorten multiple lines over 80 char in lu_object.h
This patch adjusts lines so that they are less than 80 char.
Checkpatch.pl idenitified the issue.
Signed-off-by: Craig Inches <Craig@craiginches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Reshetova [Mon, 6 Mar 2017 14:21:10 +0000 (16:21 +0200)]
drivers: convert vme_user_vma_priv.refcnt from atomic_t to refcount_t
refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Maciej Billewicz [Mon, 13 Mar 2017 21:32:19 +0000 (22:32 +0100)]
Staging: android: ion: ion_dummy_driver: remove unnecessary empty line
Fix coding style issue.
Signed-off-by: Maciej Billewicz <maciej.billewicz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 07:54:08 +0000 (18:54 +1100)]
staging: ks7010: add parentheses to complex macro
Checkpatch emits ERROR: Macros with complex values should be enclosed
in parentheses. Error may be fixed by adding parentheses around macro
definition, macros are simple arithmetic statement.
Add parentheses around macro definitions. Fix 24 cases of identical
error. Do commented out macros also to save the next developer from
having to add them.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 07:54:07 +0000 (18:54 +1100)]
staging: ks7010: fix checkpatch whitespace warns
Checkpatch emits various warnings, errors and checks;
ERROR:TRAILING_WHITESPACE: trailing whitespace
WARNING:SPACE_BEFORE_TAB: please, no space before tabs
WARNING:SPACE_BEFORE_TAB: please, no space before tabs
ERROR:CODE_INDENT: code indent should use tabs where possible
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
These are all trivial whitespace fixes. Fix them all in one
patch. Change only whitespace.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 06:38:22 +0000 (17:38 +1100)]
staging: ks7010: add variables key, key_index
'auth_type - 1' is used as an index into a key table. Adding a variable
appropriately named simplifies the code and adds meaning when
reading. Adding a pointer variable of type struct *kpa_key_t adds to
readability by removing the table access each time the key is used.
The key index is used to create a string so having it named adds
additional meaning when creating the string.
Declare variable 'key_index' and define it at declaration time. Declare
a pointer variable 'key' and define it to point to the correct key in
the key table.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 13 Mar 2017 06:38:21 +0000 (17:38 +1100)]
staging: ks7010: reduce length of comment string
Comment string is unnecessarily verbose. Checkpatch emits WARNING:
line over 80 characters.
Reduce comment string without loss of meaning.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>