- 03 Apr, 2015 30 commits
-
-
Ian Abbott authored
`comedi_event()` is called from low-level drivers to handle comedi asynchronous command event flags. Some events cause waiting tasks to be woken up, and a `SIGIO` signal to be sent via `kill_fasync()`. The signal code is `POLL_OUT` if the subdevice supports commands in the "write" direction, or `POLL_IN` for the "read" direction. If the subdevice supports commands in either direction, it sends two `SIGIO` signals, one with each code. Change that latter case to only send one `SIGIO` signal, using the direction of the current command to determine the signal code. If the `CMDF_WRITE` flag is set in the current command, it's in the "write" direction, otherwise it's in the "read" direction. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_event()` is called from low-level drivers to handle asynchronous command event flags that are stored in `s->async->events` for subdevice `s`. It normally clears the event flags as well. As a safety check, it does nothing if no asynchronous command is running, but it leaves `s->async->events` unchanged in this case. For additional safety, change it to always clear the event flags to avoid leaving stale event flags set when another asynchronous command is set up. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
In places where the `s->async` value has been stored in a local variable, use the variable instead of repeating `s->async`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
Don't use a conditional operator when a simple "not" will do. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_is_subdevice_in_error()` is only used by `comedi_read()` and `comedi_write()` and is only called (soon) after `comedi_is_subdevice_running()` returns `false` (with extra conditions in the case of `comedi_write()`). `comedi_is_subdevice_running()` and `comedi_get_subdevice_runflags()` both call `comedi_get_subdevice_runflags()` which uses the subdevice's spin-lock. Eliminate one use of the subdevice's spin-lock in `comedi_read()` and `comedi_write()` by calling `comedi_get_subdevice_runflags()` and checking the runflags directly. Add a couple of inline functions to check the runflags: `comedi_is_runflags_running()` and `comedi_is_runflags_in_error()`. These do the same test on runflags as `comedi_is_subdevice_running()` and `comedi_is_subdevice_in_error()` but get passed the runflags value directly. `comedi_is_subdevice_in_error()` is no longer used, so remove it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`comedi_set_subdevice_runflags()` changes the comedi subdevice's `runflags` member according to a bit-mask and new bit values. It's name might suggest that it only "sets", not "clears". Rename it to `comedi_update_subdevice_runflags()` to avoid confusion. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
This is done to handle some lustre patches that were made against the wrong kernel branch, which was my fault, as I gave a lecture where I messed things up for the students, it wasn't their fault. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I fixed lines over 80 characters and unnecessary returns Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I removed all the 'unneeded space' warnings given by checkpatch.pl Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I focused on function declarations (placed return type on the same line as function name), and spaces between function name and parenthesis Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georges-Axel Jaloyan authored
Signed-off-by: Georges-Axel Jaloyan <georges-axel.jaloyan@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cyrille Ruggero authored
Adding a blank in this file after a declaration as reported by checkpatch.pl. Signed-off-by: Cyrille Ruggero <cyrille.ruggero@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luca Wehrstedt authored
Replace two occurrences of "+1" with simply "1". Signed-off-by: Luca Wehrstedt <luca.wehrstedt@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gwendoline Chouasne-Guillon authored
before the arguments of a function Remove unneeded space before the arguments of a function Signed_off_by: Gwendoline Chouasne-guillon <chouasne@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
Fixed warnings as reported by checkpatch.pl Also fixed padding before function arguments when needed Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rafaël Bocquet authored
Signed-off-by: Rafaël Bocquet <rafael.bocquet@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rafaël Bocquet authored
Signed-off-by: Rafaël Bocquet <rafael.bocquet@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Vassor authored
Format comment such that it is under 80 chars Signed-off-by: Martin Vassor <martin.vassor@epfl.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aya Mahfouz authored
OBD_CHECK_DEV and OBD_CHECK_DEV_ACTIVE have been replaced by static inline functions. They are removed since they are not used anymore. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aya Mahfouz authored
Static inline functions are preferred over macros. The inline function obd_check_dev_active is introduced to replace OBD_CHECK_DEV_ACTIVE. All functions that call obd_check_dev_active store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aya Mahfouz authored
Static inline functions are preferred over macros. Hence, the function obd_check_dev was introduced. obd_check_dev replaces the macro OBD_CHECK_DEV. All functions that call obd_check_dev store the return values and return them if they represent an error code. Some of the changes were carried out manually while others were done using coccinelle. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Théotime Grohens authored
Signed-off-by: Théotime Grohens <theotime.grohens@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Remove an unneeded return statement in this file as reported by checkpatch.pl. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amitoj Kaur Chawla authored
Removes variable comparison with 0. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(...) <... ( - E == 0 + !E | - E != 0 + E | - 0 == E + !E | - 0 != E + E ) ...> ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | - 0 + NULL == E | - 0 + NULL != E ) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amitoj Kaur Chawla authored
Fixed indent of switch-case by adding space using tabs. Problem found using checkpatch.pl ERROR: space required after that ';' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Amitoj Kaur Chawla authored
Used C89 instead of C99 Comment and removed C99 comments performing prints only. Problem found using checkpatch.pl ERROR: do not use C99 // comments Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Charlie Wong Super authored
Fix the checkpatch.pl WARNING: line over 80 characters Signed-off-by: Charlie Wong Super <1213charlie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
I don't know if "hdr->payload_length;" can really be negative, but if so then we shouldn't allow it. Do the comparison as an unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
hdr->ioc_len is a user controlled u32 so the addition can overflow, especially on 32 bit systems. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Achille Aknin authored
Remove an unneeded return statement in this file Signed-off-by: Achille Aknin <achille.aknin@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 02 Apr, 2015 3 commits
-
-
Auguste Olivry authored
remove space between function names and open parentheses as reported by checkpatch.pl. Signed-off-by: Auguste Olivry <auguste.olivry@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luca Wehrstedt authored
Replace two occurrences of "+1" with simply "1". Signed-off-by: Luca Wehrstedt <luca.wehrstedt@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cristina Opriceana authored
Power down device when an error occurs in order to avoid wasting power. Move powerdown function up to be seen by the new call and align parameters for the ltr501_write_contr() call. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 01 Apr, 2015 7 commits
-
-
Ioana Ciornei authored
Fix the following checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
This patch marks functions llog_cat_set_first_idx and cat_cancel_cb static as these are used only within this file. Also since cat_cancel_cb is made static do not export it. This eliminates the following sparse warning: warning: symbol * was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
This patch makes functions mgc_logname2resid, mgc_set_info_async and mgc_init static as these are only used internally. This also eliminates sparse warnings of the type: warning: symbol * was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
This patch includes the header file mdc_internal.h that declares the function lprocfs_mdc_init_vars. This also eliminates the sparse warning: warning: symbol 'lprocfs_mdc_init_vars' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
This patch includes the header lustre/include/lclient.h that declares the functions lov_lsm_put and lov_read_and_clear_async_rc defined in lov_object.c. This eliminates warnings reported by sparse: warning: symbol was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
This patch includes the header file lmv_internal.h that declares the function lprocfs_lmv_init_vars defined in lproc_lmv.c. This eliminates the sparse warning: warning: symbol 'lprocfs_lmv_init_vars' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Darshana Padmadas authored
The function obd_proc_version_seq_show is only used in this file, so make it static. This eliminates the following sparse warning: warning: symbol 'obd_proc_version_seq_show' was not declared. Should it be static? Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-