1
0
Fork 0
Commit Graph

468454 Commits (aff9d8e80489e2abe446094680009f6a23e8e6d7)

Author SHA1 Message Date
Greg Donald aff9d8e804 drivers: staging: lustre: lustre: Fix "foo * bar" should be "foo *bar" errors
Fix checkpatch.pl "foo * bar" should be "foo *bar" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:57:45 -07:00
Hema Prathaban dc13eb86fd staging: lustre: lustre: ptlrpc: Placing inline keyword
This patch fixes the following error using checkpatch.pl
ERROR: inline keyword should sit between storage class and type

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:56:33 -07:00
Phong Tran f9cd474f86 staging: lustre: lnet: socklnd_cb.c Fix sparse non-static symbol warning
This patch fixes some non static function declarations that
cause sparse warning. Tested by compilation.

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:56:33 -07:00
Oleg Drokin 11c8779bc0 lustre: Add some basic documentation
This adds drivers/staging/lustre/README.txt with some
basic information about Lustre and how to use it.

Eventually this will need to move to Documentation/filesystems/lustre.txt

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:53:54 -07:00
Oleg Drokin f5e5de1e9e lustre: Add MAINTAINERS entry
Just add the entry with some info.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:53:54 -07:00
Andrew Morton e4a73e9c61 drivers/staging/unisys: fix build
drivers/staging/unisys/visorchipset/file.c:31: error: redefinition of typedef 'GUEST_PHYSICAL_ADDRESS'
drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h:23: note: previous declaration of 'GUEST_PHYSICAL_ADDRESS' was here

Cc: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:18:51 -07:00
Honggang Li 912f102890 staging: unisys/virthba/virthba.c print u64 with %llu
drivers/staging/unisys/virthba/virthba.c:520:2: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 4 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:749:2: warning: format ‘%d’
expects argument of type ‘int’, but argument 5 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:1142:4: warning: format ‘%d’
expects argument of type ‘int’, but argument 7 has type ‘u64’
[-Wformat=]
drivers/staging/unisys/virthba/virthba.c:1151:5: warning: format ‘%d’
expects argument of type ‘int’, but argument 5 has type ‘u64’
[-Wformat=]

After apply the patch:
linux-next]$ make C=1 drivers/staging/unisys/virthba/virthba.o
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHECK   drivers/staging/unisys/virthba/virthba.c
  CC [M]  drivers/staging/unisys/virthba/virthba.o

Signed-off-by: Honggang Li <enjoymindful@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:17:31 -07:00
Benjamin Romer e22a4a0f67 staging: unisys: remove generally useless elses from visorchipset_main.c
There are several else clauses that aren't necessary listed by checkpatch.pl in
visorchipset_main.c. Remove these.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:15:22 -07:00
Benjamin Romer 26eb2c0c57 staging: unisys: fix spacing in visorchipset_main.c
Fix the missing blank lines between declarations and code in
visorchipset_main.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:15:22 -07:00
Benjamin Romer 9a8cca9f6c staging: unisys: fix spacing in parser.c
Fix the two spacing errors in parser.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:15:22 -07:00
Benjamin Romer 5a72afb9cd staging: unisys: fix spacing in file.c
There's a missing blank line between code and declarations in file.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26 12:15:22 -07:00
Benjamin Romer 29a9e89548 staging: unisys: fix indentation of uisutil_copy_fragsinfo_from_skb()
The function uisutil_copy_fragsinfo_from_skb() in uisutils.c is messy and
over-indented. This patch fixes the function's indentation so it is cleaner.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25 17:16:06 -07:00
Benjamin Romer d283f0c62e staging: unisys: fix spacing in uisthread.c
Fix the missing blank line between code and declarations in uisthread.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25 17:16:06 -07:00
Benjamin Romer 566a17405a staging: unisys: remove void return from uislib_mod_exit()
Remove the extraneous return from the uislib module exit function.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25 17:16:06 -07:00
Benjamin Romer 81e4c97e66 staging: unisys: simplify destroy_bus() in uislib.c
The destroy_bus() function is heavily indented and many lines extend past the
right margin. This patch simplifies the function without changing its effects.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25 17:16:06 -07:00
Benjamin Romer ddc9f84b2d staging: unisys: fix spacing in uislib.c
Fix the line spacing between code and local variables in uislib.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25 17:16:06 -07:00
Greg Kroah-Hartman 39bdc95871 1st round of new IIO drivers, functionality and cleanups for the 3.18 cycle.
Maintainer Updates
 
 * Add 3 designated reviewers for IIO.  Lars, Peter and Hartmut have been
   actively reviewing a lot of patches for a while now so this reflects
   the status quo.  These three are probably the only reason I keep
   my head above the water!
 
 New drivers and device support
 
 * max5821 DAC
 * Rockchip SARADC
 * TI ADC128S052 ADC
 * BMC150 Accelerometer
 * exynos ADC driver gains support for s3c24xx and s3c64xx parts.
 * kxcjk-1013 gainst range control and runtime PM support to drive
   down it's power usage.
 
 Driver removals
 
 * Drop ad5930, ad99850, ad9852, ad9910 and ad9951 drivers on the simple
   basis that they drivers just provided a register write function with
   no compliant user space ABI whatsoever.  Much better to drop them and
   start again for these in the fullness of time.
 
 Core Enhancements
 
 * Join together neighbouring elements in the demux units that feeds
   the binary interfaces.  This cuts down on the number of individual
   copies needed  when splitting out individual channels from the incoming
   channel scans.
 * Other demux related cleanups such as using roundup instead of a local
   implementation.
 
 Cleanups
 
 * Drop an unnecessary double setting of the owner field in xilinx adc.
 * Some more patches to use managed (devm) interfaces to cut down on
   complexity of removal code.
 * adis16060 coding style fixlets.
 * Fix some incorrect error returns in the Xilinx ADC driver.
 * Coding style fixlets for various accelerometer drivers.
 * Some sparse warning fixes to do with endianness and sign of variables.
 * Fix an incorrect and entirely pointless use of sizeof on a dynamic pointer
   in hid-sensor-magn-3d by dropping the relevant code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT86rcAAoJEFSFNJnE9BaIhKoQAKJ+pIpOb36k1Kjppe0PgQjG
 0YCUJEte6z9RSM3s7Z47B6gm165MerYpscQW0GvTKCaxVB0GcnbE9IPYROIfZo+6
 QIQbMHe9J7mYW0+qtHBxY5ItOCcVUMSwGfbXar8nFVS6266OcXP+HAau4U9WweKt
 GmYMuTxLdzm5JYh6C+ljv2PaRZ6B9IascF+YCrDnvkL34ojq7YpLA4QE0GcJlI4s
 Fz3k7UE0ckrrkAytCumjJC/zn/BSntzyUu2ctN5Z8VO6WeMyuSyFo8uxhzhoyjtm
 NnISm89Y2Dn5iBtb+QA/6OfOEd9MtjbALauozj70u6ONL0sYdbayNcHvhUU6lnNu
 hge8xlKS5MhCKtMFZ02qJM0MD/cajNt77m/QYaOoZlbuFPbREI12PtsHah6F7SJT
 Ad3YQ8T8rT+wzq45EqlqYE863H1OMMJulyjqUom0I8LgTijz+Exs6HWs4/qMhz6V
 3T3ZwVoWSnhE4/yyRJFB/xD1P/uZIUGBP30EwlKxaiDmdxJ5X69Vlo9+AuecS3bq
 hRQvHSNFQG4cZEaDf/fzKGITkLv7V3oxqhg7yiSFtocj9kbF/6KyqgrUl5y7AZBL
 ZyW9m8OLr0K4ns8sKtRLeg9UmQ0Jxs2L1OvYtPSECAioMmMjLdij4Xt5U4Jv5ifC
 STIMv21b8mmNV9N8SdSo
 =zqHo
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next

Jonathan writes:

1st round of new IIO drivers, functionality and cleanups for the 3.18 cycle.

Maintainer Updates

* Add 3 designated reviewers for IIO.  Lars, Peter and Hartmut have been
  actively reviewing a lot of patches for a while now so this reflects
  the status quo.  These three are probably the only reason I keep
  my head above the water!

New drivers and device support

* max5821 DAC
* Rockchip SARADC
* TI ADC128S052 ADC
* BMC150 Accelerometer
* exynos ADC driver gains support for s3c24xx and s3c64xx parts.
* kxcjk-1013 gainst range control and runtime PM support to drive
  down it's power usage.

Driver removals

* Drop ad5930, ad99850, ad9852, ad9910 and ad9951 drivers on the simple
  basis that they drivers just provided a register write function with
  no compliant user space ABI whatsoever.  Much better to drop them and
  start again for these in the fullness of time.

Core Enhancements

* Join together neighbouring elements in the demux units that feeds
  the binary interfaces.  This cuts down on the number of individual
  copies needed  when splitting out individual channels from the incoming
  channel scans.
* Other demux related cleanups such as using roundup instead of a local
  implementation.

Cleanups

* Drop an unnecessary double setting of the owner field in xilinx adc.
* Some more patches to use managed (devm) interfaces to cut down on
  complexity of removal code.
* adis16060 coding style fixlets.
* Fix some incorrect error returns in the Xilinx ADC driver.
* Coding style fixlets for various accelerometer drivers.
* Some sparse warning fixes to do with endianness and sign of variables.
* Fix an incorrect and entirely pointless use of sizeof on a dynamic pointer
  in hid-sensor-magn-3d by dropping the relevant code.
2014-08-25 11:09:35 -07:00
Michal Simek ff9e762158 iio: adc: xilinx: Remove .owner field for driver
There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-19 20:25:10 +01:00
Lars-Peter Clausen c83441e0a7 staging:iio: Remove ad5930/ad9850/ad9852/ad9910/ad9951 dummy drivers
All what these 'drivers' do is expose a single (non standard ABI) sysfs
attribute that when written to does a direct pass-through to spi_write(). This
is rather ugly and does not justify the existence of a driver as the same can
easily done by using the spidev interface.

The drivers will eventually be rewritten as proper IIO ABI compliant drivers
which do have the proper abstraction layers between userspace and the device.
But in the meantime these driver do not add any extra value and just clutter up
the staging area. So just remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-19 20:25:10 +01:00
Lars-Peter Clausen 4ce72abc6e MAINTAINERS: Add entry for Analog Devices IIO drivers
Add Michael and myself as the maintainer for the Analog Devices IIO drivers.
The entry matches on all files in drivers/staging/iio and drivers/iio/ starting
with the 'ad' prefix, except for 'adjd' as that one is used by Avago
Technologies.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-19 20:25:09 +01:00
Lars-Peter Clausen f0d6116162 MAINTAINERS: Add designated reviewers for IIO subsystem
Add those persons who generally tend to review new IIO patches to the list of
designated reviewers to make sure that they are Cc'ed on new patches.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-19 20:12:26 +01:00
Konrad Zapalowicz ed7f92da59 staging: dgnc: Remove unnecessary dgnc_Major_Control_Registered variable
The dgnc_Major_Control_Registered variable purpose was to act as a flag
to indicate if the character device has been successfully registered
into the kernel. This flag was later checked in the module cleanup
function to know if the character device needs to be deregistered.

However the {device,class}_destroy and unregister_chrdev functions may
be called with 'invalid' data perfectly fine. This means that this
variable is not needed and can safely be removed which is what this
commit does.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:52:25 -07:00
Konrad Zapalowicz 0b3a07ede3 staging: dgnc: Remove not needed dgnc_driver_start variable
The dgnc_driver_start variable purpose was to indicate if the driver
'start' routine has been called. Now, because the 'start' routine can
only be called once this variable is not needed thus this commit
removes it.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:52:25 -07:00
Konrad Zapalowicz 3599abafcc staging: dgnc: Remove driver-wide polling counter variable
The polling counter variable is only exposed via sysfs and has no other
purpose.

Now, since the polling shall be implemented as a board specific feature
rather than being global in the driver this counter is obsolete.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:52:24 -07:00
Konrad Zapalowicz 1d8c5aa329 staging: dgnc: Remove driver-wide state variable
This commit removes the driver's global state variable. This is ok
because the state was changed only once at the end of init phase thus
the future usage of this variable is pointless.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:52:24 -07:00
Purnendu Kapadia 2fd2914a2e staging: android: fix attribute as suggested by checkpatch
we should use __packed attribute

Signed-off-by: Purnendu Kapadia <pro8linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:50:44 -07:00
Jeshwanth Kumar N K 230fa11f5f staging: wlan-ng: prism2mgmt.c Fix break not useful
Fixed up warnings, break is not useful after return statement.
And the exit Label is deleted, now returning inline.

Signed-off-by: Jeshwanth Kumar N K <jeshkumar555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:49:48 -07:00
Hema Prathaban b553a1a815 staging: lustre: lustre: libcfs: pr_warn instead printk
This patch fixes the following warning using checkpatch.pl
WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then
dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:46:40 -07:00
Hema Prathaban 74bb9d4fef staging: lustre: lustre: libcfs: do not use assignment in if condition
This patch fixes the following error using checkpatch.pl
Error: do not use assignment in if condition

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:46:40 -07:00
Oleg Drokin 21aef7d9d6 staging/lustre: get rid of obd_* typedefs
We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:45:30 -07:00
Oleg Drokin 114acca8ef staging/lustre: get rid of seqno_t and mdsno_t typedefs
seqno_t is u64 and mdsno_t is u32 so just use them as such.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:45:30 -07:00
Joe Perches 48caf5a060 staging: vt6655: Convert DBG_PRT to pr_<level>
DBG_PRT uses are unnecessarily complex.

Convert DBG_PRT msglevel to pr_<level>.
This changes the KERN_<level> type of several uses.
It also enables dynamic_debug for the pr_debug conversions.

This patch can be a prelude to converting these pr_<level>
uses to dev_<level> as appropriate.

Other changes:

Realign arguments of these conversions.
Remove now unused static int msglevel declarations.
Remove now unused DBG_PRT #define.

Compile tested only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:43:50 -07:00
Oleg Drokin c7b09efacf staging/lustre/llite: Fix integer overflow in ll_fid2path
Reported by Dan Carpenter <dan.carpenter@oracle.com>

outsize = sizeof(*gfout) + gfin->gf_pathlen;

Where outsize is int and gf_pathlen is u32 from userspace
can lead to integer overflowwhere outsize is some small number
less than sizeof(*gfout)

Add a check for pathlen to be of sensical size.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/11412
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5476
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:43 -07:00
Frank Zago 2b358b4ea5 staging/lustre/llite: optimize ll_fid2path()
The only parameter from userspace that matters is the length of the
buffer. We don't need to allocate then import the whole structure. By
importing only that length, we can save a memory allocation.

Add sparse annotations to that function.

Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11167
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5389
Reviewed-by: John L. Hammond <john.hammond@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>
2014-08-17 09:38:43 -07:00
John L. Hammond b6ee56fe2a staging/lustre/llite: hold inode mutex around ll_setattr_raw()
ll_setattr_raw() expects to be called with the inode mutex held so do
when calling it from ll_hsm_import().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11349
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5456
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:42 -07:00
John L. Hammond f7acd33763 staging/lustre/clio: reorder initialization in cl_req_alloc()
In cl_req_alloc() ensure that the list heads crq_pages and crq_layers
have been initialized before passing the request to
cl_req_completion(). This fixes an oops in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11009
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5290
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:42 -07:00
Fan Yong f261f48a39 staging/lustre/ldlm: drop redundant ibits lock interoperability check
In very old release (older than Lustre-1.8), if the client talks with
the server that does not support ibits lock, then the client needs to
convert it as plain lock. Such interoperability check and convertion
is out of date for a long time. Drop it.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Reviewed-on: http://review.whamcloud.com/11004
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4971
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:42 -07:00
Paul Cassella 6aa5107281 staging/lustre/llite: Make sure ft_flags is valid
In ll_fault0, the 'fault' struct is mostly cleared before the call to
cl_io_loop, but ft_flags is not reset. It is ordinarily set by
the call to filemap_fault in vvp_io_kernel_fault, but if Lustre
returns before calling filemap_fault, it still has the old value of
ft_flags.

ll_fault0 will then consume the ft_flags field. If it has the
VM_FAULT_RETRY bit set, it will be used as ll_fault0() and
ll_fault()'s return value.

This is a problem when VM_FAULT_RETRY is in ft_flags:
When fault/filemap_fault return with that flag set, they have already
released the mmap semaphore, and do_page_fault does not need to
release it.
Incorrectly returning this flag from ll_fault means mmap_sem
is not upped in the kernel's do_page_fault().

In addition to clearing ft_flags, this patch does not use it unless
it is valid.  It's potentially misleading to return ft_flags in
"fault_ret" if ft_flags has not been set by filemap_fault.

This adds clarity, but does not change the current behavior:
When not valid, ft_flags is replaced by fault_ret, which is zero,
as is ft_flags when not set by filemap_fault.

Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: http://review.whamcloud.com/10956
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5291
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:42 -07:00
John L. Hammond 7591805af5 staging/lustre/mdc: cleanup intent if mdc_finish_enqueue() fails
In mdc_enqueue() clear the lock handle, lock mode, and request stored
in the lookup intent if mdc_finish_enqueue() fails.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/10963
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5289
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:38:42 -07:00
Nathaniel Clark 6b2eb32e69 staging/lustre/llite: check for integer overflow in hsm user request
Check to make sure total size of request does not overflow when
calculated.  Return -1 from hur_len() if it does overflow.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/10615
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4984
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
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>
2014-08-17 09:38:42 -07:00
Artemiy Volkov d41b7b74cf Staging: wlan-ng: Merge string literals on adjacent lines in prism2fw.c
This patch fixes the 'quoted string split across lines' checkpatch.pl
warning in prism2fw.c.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:27 -07:00
vibi sreenivasan 72267c27fd staging/mt29f_spinand: coding style fixes
This patch fixes the coding style error :
"WARNING: else is not generally useful after a break or return"
reported by checkpatch.pl

Signed-off-by: Vibi Sreenivasan <vibisreenivasan@linuxmail.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:27 -07:00
H Hartley Sweeten f016209146 staging: comedi: 8255: provide common defines for registers
There are a couple comedi drivers that duplicate some of the register
defines used by the 8255 module. Move these defines into the header
so the duplication can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten 5c19084bbd staging: comedi: 8255: handle memory mapped io
The drivers that use this module with memory mapped io all have the
ioremap'ed base address stored in the comedi_device 'mmio' member.

Introduce a default (*io) function that does 8-bit memory mapped io.

Modify subdev_8255_init() so that it takes a flag parameter indicating
if the io is port or memory mapped. Make the function static and rename
it to __subdev_8255_init().

Introduce two exported wrappers for __subdev_8255_init():

  subdev_8255_init() - for drivers that do 8-bit port io
  subdev_8255_mm_init() - for drivers that do 8-bit memory mapped io

Use subdev_8255_mm_init() in the drivers that do 8-bit memory mapped io
and remove the private (*io) functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten 9067983867 staging: comedi: 8255: remove incomplete async command support
The async command support in this module is incomplete and nothing
has ever used it. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten 4085e93b9f staging: comedi: 8255: refactor how the (*io) function works
Currently, all users of is module that use the default (*io) function
pass an 'iobase' to subdev_8255_init() of the form:

  dev->iobase + OFFSET_TO_8255_BASE_REG

Now that the (*io) callback includes the comedi_device 'dev' pointer
the 'dev->iobase' does not need to be included.

Modify the default (*io) function, subdev_8255_io(), to automatically
add the dev->iobase to the address when reading/writing the port.

For aesthetics, rename the subdevice private data member to 'regbase'.
Also, rename the local variables in this module that are used to
access this member.

Add a comment in dev_8255_attach() about the 'iobase' that is passed
to subdev_8255_init(). For manually attached 8255 devices the io
region is requested with __comedi_request_region() which does not
set dev->iobase. For these devices the 'regbase' is actually the
'iobase'.

Remove the, now unnecessary, dev->iobase from all the callers of
subdev_8255_init(). There are a couple drivers that only passed the
dev->iobase. For those drivers pass a 'regbase' of 0x00.

Note that the das16m1 driver is a bit goofy. The devpriv->extra_iobase
is requested using __comedi_request_region() which does not set the
dev->iobase. But the starting address passed is dev->iobase + DAS16M1_82C55
so a 'regbase' of DAS16M1_82C55 is passed to subdev_8255_init().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten 2b1a3fcfdf staging: comedi: 8255_pci: tidy up pci_8255_mmio()
The 8255 driver (*io) callback now includes the comedi_device pointer.
Using this we can get the ioremap'ed base address.

Instead of passing the (cast) mmio address to subdev_8255_init(), pass
the 'iobase' of the 8255 registers (i * 4).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten da261e1d38 staging: comedi: cb_pcidas64: tidy up dio_callback_4020()
The 8255 driver (*io) callback now includes the comedi_device pointer.
Using this we can get the ioremap'ed base address.

Instead of passing the (cast) mmio address to subdev_8255_init(), pass
the 'iobase' of the 8255 registers (I8255_4020_REG).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten 27fdf38574 staging: comedi: cb_pcidas64: tidy up dio_callback()
The 8255 driver (*io) callback now includes the comedi_device pointer.
Using this we can get the ioremap'ed base address.

Instead of passing the (cast) mmio address to subdev_8255_init(), pass
the 'iobase' of the 8255 registers (DIO_8255_OFFSET).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00
H Hartley Sweeten f4e29703c7 staging: comedi: daqboard2000: tidy up daqboard2000_8255_cb()
The 8255 driver (*io) callback now includes the comedi_device pointer.
Using this we can get the ioremap'ed base address.

Instead of passing the (cast) mmio address to subdev_8255_init(), pass
the 'iobase' of the 8255 registers (dioP2ExpansionIO8Bit).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:26 -07:00