Commit graph

31897 commits

Author SHA1 Message Date
Cristina Opriceana b6955a8f43 Staging: rtl8712: Remove duplicated argument to |
Delete duplicated argument to | for the state argument in
the _clr_fwstate_() function call as it is redundant.
Detected with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:26:58 +02:00
Cristina Opriceana 45de432775 Staging: rtl8712: Use memdup_user() instead of copy_from_user()
Use memdup_user() to avoid its duplicated implementation and simplify
code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC,
which is valid because copy_from_user() might sleep and it's useless
to make the allocation atomic. Found with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:26:58 +02:00
Cristina Opriceana aa5587f3cb Staging: iio: accel: Remove explicit NULL comparison
This patch removes explicit NULL comparison and writes it in its
equivalent shorter form. Done with coccinelle.

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:21 +02:00
Cristina Opriceana d3f31e87db Staging: iio: adc: Remove explicit NULL comparison
This patch removes explicit NULL comparison and writes it in its
shorter form. Detected with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:21 +02:00
Cristina Opriceana 16d55be4cc Staging: iio: impedance-analyzer: Remove explicit NULL comparison
This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:21 +02:00
Cristina Opriceana e84d072410 Staging: iio: trigger: Remove explicit NULL comparison
This patch removes explicit NULL comparison and replaces it
with its shorter form. Detected with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:20 +02:00
Cristina Opriceana 45297571e9 Staging: iio: meter: Remove explicit NULL comparison
This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:20 +02:00
Cristina Opriceana 8f94c31fee Staging: iio: iio_simple_dummy: Remove explicit NULL comparison
This patch removes explicit NULL comparison and writes it in its
simpler form. Done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:20 +02:00
Cristina Opriceana 025c7da9ee Staging: iio: iio_dummy_evgen: Simplify NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:20 +02:00
Cristina Opriceana b72eb70209 Staging: iio: Add error check on iio_register_device()
This patch checks if an error occurred on probe and stops the
device in order to avoid wasting power.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-01 17:23:20 +02:00
Greg Kroah-Hartman 675732707f Second set of new devices, functionality and cleanup for IIO in the 4.1 cycle.
New Functionality
 * Watermark logic for buffers.  Allows for blocking reads to block until
   their requested amount is available - previously they only blocked until
   a single scan of data was available.  Also allows for polling for a
   watermark amount of data to be available.  This feature was first proposed
   some time ago to good responses, but not taken further by the original author
   Octavian has picked up the gauntlet and taken it through
   to merging (along with the hardware fifo support that follows).
 * New approach to hardware fifo handling - in particular handling the
   interaction of a hardware fifo feeding into a software fifo and their
   watershed events.  We don't have every possible case well covered yet,
   but this is certainly a good, flexible starting point.  This will replace
   the previous approach used in ancient drivers (sca3000) where we just
   exposed the hardware buffer directly to userspace.  Very few pieces of
   hardware have sufficiently long buffers for that to be an adequate solution.
 * bmc150_accel - hardware fifo support.
 * mlx90614 - support dual IR sensor devices + some refactoring to clean up the
   code and allow some other functionality currently under review.
 * L3GD20H gyroscope support added to the st_gyro driver.
 * lis3lv02d accelerometer added to the st_gyro driver. Note this part is
   also supported by the older lis3 driver under misc.  A lengthy discussion
   took place and concluded that holding parts out on the basis that whole
   driver would be subsumed into this one was counter productive.  Better
   to add part support and add additional features as people need them.
   Basically there was not advantage in not merging the support.
 * max517 driver gains support for MAX520 and MAX521 DACs.
 
 Documentation
 * 3.20 -> 4.0 renaming for recent docs. Whilst technically a fix, I think
   people will cope until the next merge merge window.
 * An ABI typo hat -> What:  More ABIs should have hats.
 * Document in_rot_offset, illuminance_raw and illuminance_scale.
 
 Cleanups
 * Fix a scale extraction bug in generic_buffer.c example.
 * Constify a load of device tree related structures.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVGapUAAoJEFSFNJnE9BaI6FAQAKBSW1Fl0cc4mweAfDmUnDzp
 jFxKKGeIDDOBQyChjANq5zI+X8r2Bh1iy6qShfooXsOoGYNYumL2DHWPTThwEcWp
 I2/qHPaKkArL9k7os+TYCG5e3y1TRCeZGgvDEcvzPGCuPMel5Y5x5gqd3e6YCc0j
 59sIeyltMCIivyK+vo5gsNJoQQWzkcKdlUZ6eCFpYR8tEi23rgGTyaftd82Odncs
 pJ2B98If3iaicght6ffKU716r6zI5Nfo121tiZeBAuXWyZ4lBzlJ/RBohXAUOziP
 qLh0G0H3xhfo3K+Ph9tS8JOLweG8DnRJb2Sl2SE9FFyoXW1FqlgYvsstVXmkk4So
 JuLJvwfTvHJWmvuy5aP4QtaR57wwxLa6vNjd1qZfb4/0f5Ugdsve5fETfyTXla6g
 mhRnInuc6rwJBLEOLhPbZ8+e8CmnUB6KUuSISFTOJZA20ygbNIOdWXo17VXrGZdV
 qBU2F9TX12p9D85O8Ee+AhdlUCALwWruj0ccsPIt6v/UZUcJ9TOrB06yOBBCCfqL
 W9xdVj5xIGR54yLBONP9enLtNitbOogDF308I5QGEOAZUYzsrtjh9HhjN1UEcvKM
 D96uNKFCLFHgfrwN+3OKfIPeRWAnznanaTJUMfBSvkT6X5dEMt72prYpl1JIFiVO
 ZiWA/9hi70+Y/9bgqe1L
 =kqSc
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of new devices, functionality and cleanup for IIO in the 4.1 cycle.

New Functionality
* Watermark logic for buffers.  Allows for blocking reads to block until
  their requested amount is available - previously they only blocked until
  a single scan of data was available.  Also allows for polling for a
  watermark amount of data to be available.  This feature was first proposed
  some time ago to good responses, but not taken further by the original author
  Octavian has picked up the gauntlet and taken it through
  to merging (along with the hardware fifo support that follows).
* New approach to hardware fifo handling - in particular handling the
  interaction of a hardware fifo feeding into a software fifo and their
  watershed events.  We don't have every possible case well covered yet,
  but this is certainly a good, flexible starting point.  This will replace
  the previous approach used in ancient drivers (sca3000) where we just
  exposed the hardware buffer directly to userspace.  Very few pieces of
  hardware have sufficiently long buffers for that to be an adequate solution.
* bmc150_accel - hardware fifo support.
* mlx90614 - support dual IR sensor devices + some refactoring to clean up the
  code and allow some other functionality currently under review.
* L3GD20H gyroscope support added to the st_gyro driver.
* lis3lv02d accelerometer added to the st_gyro driver. Note this part is
  also supported by the older lis3 driver under misc.  A lengthy discussion
  took place and concluded that holding parts out on the basis that whole
  driver would be subsumed into this one was counter productive.  Better
  to add part support and add additional features as people need them.
  Basically there was not advantage in not merging the support.
* max517 driver gains support for MAX520 and MAX521 DACs.

Documentation
* 3.20 -> 4.0 renaming for recent docs. Whilst technically a fix, I think
  people will cope until the next merge merge window.
* An ABI typo hat -> What:  More ABIs should have hats.
* Document in_rot_offset, illuminance_raw and illuminance_scale.

Cleanups
* Fix a scale extraction bug in generic_buffer.c example.
* Constify a load of device tree related structures.
2015-04-01 13:43:39 +02:00
Josselin Costanzi 37d3455672 iio: add watermark logic to iio read and poll
Currently the IIO buffer blocking read only wait until at least one
data element is available.
This patch makes the reader sleep until enough data is collected before
returning to userspace. This should limit the read() calls count when
trying to get data in batches.

Co-author: Yannick Bedhomme <yannick.bedhomme@mobile-devices.fr>
Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr>
[rebased and remove buffer timeout]
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-29 16:17:09 +01:00
Helen Fornazier f8da055aaf staging: sm750fb: Change "foo * bar" style to "foo *bar"
This patch fixes the checkpatch.pl error:

ERROR: "foo * bar" should be "foo *bar"
+int ddk750_initHw(initchip_param_t * pInitParam)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:41 +01:00
Helen Fornazier ae59c46541 staging: sm750fb: Move switch case trailing statment
This patch fixes the checkpatch.pl error:

ERROR: trailing statements should be on next line

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:41 +01:00
Helen Fornazier c04051f533 staging: sm750fb: Add spaces after ','
This patch fixes the checkpatch.pl error:

ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier c107243b09 staging: sm750fb: Add space before switch statement
This patch fixes the checkpatch.pl warnings:

ERROR: space required before the open parenthesis '('
+               switch(divisor) {

ERROR: space required before the open parenthesis '('
+               switch(divisor) {

ERROR: space required before the open parenthesis '('
+       switch(reg) {

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 82736d2244 staging: sm750fb: Add space before if statement
This patch fix the checkpatch.pl warning:

ERROR: space required before the open parenthesis '('

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier ce02a16ae4 staging: sm750fb: Fix for statement style
This patch fixes the checkpatch.pl warnings:

ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: space required after that ';' (ctx:VxV)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 9767fc5126 staging: sm750fb: Fix if/else/for/switch braces style
This patch fixes the checkpatch.pl errors:

ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
WARNING: braces {} are not necessary for single statement blocks
ERROR: space required before the open brace '{'

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 569a6dcf3d staging: sm750fb: Add space after struct definition
This patch fixes checkpatch.pl warning:

WARNING: missing space after struct definition
+typedef struct _pllcalparam{

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:06:49 +01:00
Niranjan Dighe 3866a3c6e5 Staging: slicoss: Remove redundant and disabled code block
Removing code guarded by undefined macro SLIC_TRACE_DUMP_ENABLED

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:02:52 +01:00
Sudip Mukherjee 8b82fa8388 staging: unisys: remove comparison
the comparison is always true as the dev_t has been initialized in the
init function and we are sending that initialized dev_t to the
cleanup().

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:01:24 +01:00
Sudip Mukherjee eb79db2b59 staging: unisys: remove global dev_t
the global variable majordev is no longer required, as it is not being
used anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:01:23 +01:00
Sudip Mukherjee addceb12a3 staging: unisys: use local variable in cleanup
the dev_t was being stored in visorchipset_platform_device.dev.devt
while initializing the module. so pass that value as an argument to
cleanup() so that it can use this local variable instead of the global
variable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:01:23 +01:00
Sudip Mukherjee a1191146c9 staging: unisys: use local variable
we are getting dev_t as an argument in the function, so use the local
variable instead of the global variable "majordev".
this global variable will be removed in one of the next patch of the
series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:01:23 +01:00
Sudip Mukherjee 61986f730e staging: unisys: remove redundant variable
remove the variable "registered", which was used in the cleanup() to
detect if the driver has successfully initialized. the cleanup()
is called from module_exit, so its obvious that the module has
successfully initialized. if the initialization had failed, then
we will never be in the cleanup().

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:01:23 +01:00
Joe Perches 8ee775f92c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros
Macros with hidden flow control are bad form as the code path
taken can be unexpected for the reader.

Expand these in-place and remove the macros.

Done with coccinelle script:

@@
expression chip;
expression arg1;
expression arg2;
expression arg3;
@@

-	RTSX_WRITE_REG(chip, arg1, arg2, arg3);
+	retval = rtsx_write_register(chip, arg1, arg2, arg3);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

@@
expression chip;
expression arg1;
expression arg2;
@@

-	RTSX_READ_REG(chip, arg1, arg2);
+	retval = rtsx_read_register(chip, arg1, arg2);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:17:05 +01:00
Joe Perches 031366ea65 staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros
Remove these flow hiding macros.

Miscellanea:

o Add a macro and function to replace a large inline
o Simplify #includes
o Add trace.c and update Makefile
o Remove static inline filename function and use kbasename instead

This reduces object size quite a lot: ~350KB (x86-64 allyesconfig)

$ size drivers/staging/rts5208/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 248385	  36728	  77888	 363001	  589f9	drivers/staging/rts5208/built-in.o.new
 506691	  83352	 115896	 705939	  ac593	drivers/staging/rts5208/built-in.o.old

Done via coccinelle script and some typing.

@@
expression chip;
expression ret;
@@

-	TRACE_RET(chip, ret);
+	rtsx_trace(chip);
+	return ret;

@@
expression chip;
identifier label;
@@

-	TRACE_GOTO(chip, label);
+	rtsx_trace(chip);
+	goto label;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:16:19 +01:00
Niranjan Dighe da3c8deef6 Staging: rtl8188eu: replace kzalloc and memcpy by kmemdup
This was generated by 'make coccicheck' using scripts at
scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:16:19 +01:00
Joe Perches 90403aa118 staging: rtl8723au: Update RT_TRACE macro and uses
Create an rt_trace function using %pV to reduce overall code size.
Update the macro uses to remove unnecessary and now harmful parentheses.

Miscellanea around these changes:

o Coalesce formats
o Realign arguments
o Remove commented-out RT_TRACE uses
o Spelling fixes in formats
o Add missing newlines to formats
o Remove multiple newlines from formats
o Neaten formats where noticed
o Use %pM in one instance

Reduces code size ~20KB

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:15:07 +01:00
Eddie Kovsky 73454eaf20 Staging: rtl8192 Clean up function definition
Change function definition to match its prototype declaration. This
fixes the following warning generated by sparse:

drivers/staging/rtl8192u/r8192U_core.c:1970:6: warning: symbol
'rtl8192_update_ratr_table' was not declared. Should it be static?

Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:13:13 +01:00
Cihangir Akturk d9e048cdd2 staging: rtl8192u: Fix static decleration sparse warning.
The function 'ieee80211_check_auth_response' is used only in this
file, so make it static. This patch fixes the following sparse
warning.

'ieee80211_check_auth_response' was not declared. Should it be static?

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:13:13 +01:00
Alexey Khoroshilov 330b5e80ef staging: ozwpan: implement error handling in ozwpan_init()
Errors are correctly handled in oz_cdev_register() and oz_protocol_init(),
but then they are ignored in ozwpan_init().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:13:13 +01:00
Matteo Semenzato c181be7f32 Staging: rtl8188eu: remove dead code
The condition pxmitpriv->hwxmit_entry == 5 is always false because
HWXMIT_ENTRY is always 4.

Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:13:13 +01:00
Joe Perches ea07278681 staging: rtl8723au: Remove uses of MAC_FMT and MAC_ARG
Use the standard vsprintf kernel extension to format
mac addresses.

This reduces object code size a bit.

Miscellanea:

o Coalesce formats
o Realign arguments
o Remove the now unused MAC_FMT and MAC_ARG #defines

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:09:35 +01:00
Masanari Iida 92def781ee staging: fbtft: Fix typo in fbtft
This patch fix spelling typo in comment and printk within fbtft

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:07:29 +01:00
Cláudio Maia 4178549e4c Staging: fbtft: fb_pcd8544: Fix comments style
This patch fixes the following errors by refactoring the comments'
style:

WARNING: line over 80 characters
ERROR: code indent should use tabs where possible

Signed-off-by: Cláudio Maia <crrm@isep.ipp.pt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:06:54 +01:00
Cláudio Maia 14cf23b155 Staging: fbtft: fb_pcd8544: Fix warning line over 80 characters
This patch fixes the following checkpatch warning:

WARNING: line over 80 characters

Signed-off-by: Cláudio Maia <crrm@isep.ipp.pt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:06:54 +01:00
Kozhevnikov Anatoly 3b143b5503 staging: fbtft: Add support for ili9163 controller
Driver for ili9163-based displays (for example: Nokia 5110)

Signed-off-by: Kozhevnikov Anatoly <shilo.xyz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:06:54 +01:00
Lorenzo Stoakes cb422f3bbc staging: sm750fb: Remove spinlock helper function
This patch removes the unnecessary spinlock helper function and instead
calls spin_lock and spin_unlock directly.

This does *not* resolve sparse warnings about context imbalances but these are
spurious.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes 35fb80b9de staging: sm750fb: Fix __iomem pointer types
This patch annotates pointers as referring to I/O mapped memory where they ought
to be, removes now unnecessary ugly casts, eliminates an incorrect deref on I/O
mapped memory by using iowrite16 instead, and updates the pointer arithmetic
accordingly to take into account that the pointers are now byte-sized. This
fixes the following sparse warnings:-

drivers/staging/sm750fb/sm750_cursor.c:113:19: warning: cast removes address space of expression
drivers/staging/sm750fb/sm750_cursor.c:204:19: warning: cast removes address space of expression

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes 2ffbc9c6aa staging: sm750fb: Remove unused function
This patch removes the unused hw712_fillrect function. This patch fixes
the following sparse warning:-

drivers/staging/sm750fb/sm750_accel.c:95:5: warning: symbol 'hw712_fillrect' was not declared. Should it be static?

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes d93abd15c8 staging: sm750fb: Make internal functions static
This patch declares externally unavailable functions static. This fixes
the following sparse warnings:-

drivers/staging/sm750fb/ddk750_hwi2c.c:63:6: warning: symbol 'hwI2CWaitTXDone' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_hwi2c.c:93:14: warning: symbol 'hwI2CWriteData' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_hwi2c.c:160:14: warning: symbol 'hwI2CReadData' was not declared. Should it be static?

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Lorenzo Stoakes 3de08a2d14 staging: sm750fb: Use memset_io instead of memset
This patch takes into account that cursor->vstart, crtc->vScreen and
share->pvMem are pointers to memory-mapped I/O and thus we should use memset_io
to make this explicit. In addition, some architectures require special treatment
of memory-mapped I/O so the previous code could actually break without this
change.

This fixes the following sparse warnings:-

drivers/staging/sm750fb/sm750.c:489:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:490:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:501:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:502:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:833:5: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:1154:9: warning: incorrect type in argument 1 (different address spaces)

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Sudip Mukherjee 855fe6ea96 staging: sm7xxfb: add MODULE_DEVICE_TABLE
add MODULE_DEVICE_TABLE to support hot-plugging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Lai Siyao d6abc59ec8 staging/lustre/xattr: xattr data may be gone with lock held
Xattr cached data may be gone, but lock still held, in this case,
refetch xattr from server, otherwise client will return error.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-on: http://review.whamcloud.com/12952
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 11:11:44 +01:00
Niu Yawei 3ce08cd7a2 staging/lustre: update timestamps after buiding rpc
The mtime/atime/ctime in the write RPC has to be updated after
the RPC is built (where xid is generated), otherwise, it could
race with the setattr and updating wrong timestamps on OST side.

Seems this regression was introduced when landing clio code.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/13261
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5951
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 11:11:44 +01:00
Li Dongyang a915ffda19 staging/lustre/llite: glimpse the inode before doing fiemap
For a new inode, the i_size is 0 until a stat, which will yield
an empty fiemap result.
Fix the issue by glimpsing the size before doing fiemap.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13439
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6091
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 11:11:44 +01:00
Andriy Skulysh 502cb58e21 staging/lustre/ptlrpc: fix import state during replay
Client doesn't restore import state correctly
on reconnect during replay. It resends lock replay
when final ping was queued by server.
Server fails with "target_queue_recovery_request())
ASSERTION( req->rq_export->exp_lock_replay_needed ) failed"

Add imp_replay_state to store last replay state.
imp_state is restored from imp_replay_state
during reconnect.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Xyratex-bug-id: MRP-2022
Reviewed-on: http://review.whamcloud.com/12163
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5651
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 11:11:15 +01:00
Yang Sheng 397632e467 staging/lustre/lov: don't crash accessing LOV object with FID{0, 0}
Some object maybe has a corrupted LOV EA or a hole in
LOV EA. We should not crash client in such case.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/12740
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4958
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 11:10:25 +01:00