The rules above the line deal with the case where the goto desination is
the same whether or not the the branch is taken. In that case, the goto is
created in just one instance after the if. This affects only the files
namei.c and llite_lib.c.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Thu, 28 Aug 2014 23:35:14 +0000 (18:35 -0500)]
staging/lustre: remove linux/lustre_lib.h
Inline the only call to inode_init_lvb(). Move some definitions from
lustre/include/linux/lustre_lib.h to lustre/include/lustre_lib.h and
remove the first header.
Signed-off-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Thu, 28 Aug 2014 18:54:23 +0000 (14:54 -0400)]
staging/lustre: remove unused request policies.
Client policies do not make much sense to have in client-only code,
so remove all references to everything but fifo.
This also removes lustre/libcfs/heap.c and its header, since it was
only used by certain request policies (crr and orr).
Andrew Morton [Mon, 25 Aug 2014 23:32:20 +0000 (16:32 -0700)]
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>
Honggang Li [Tue, 19 Aug 2014 11:29:43 +0000 (19:29 +0800)]
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>
Benjamin Romer [Mon, 18 Aug 2014 13:29:44 +0000 (09:29 -0400)]
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>
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.
Michal Simek [Wed, 13 Aug 2014 12:00:00 +0000 (13:00 +0100)]
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>
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>
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>
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>
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>
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>
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>
Oleg Drokin [Fri, 15 Aug 2014 16:55:56 +0000 (12:55 -0400)]
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
Joe Perches [Sun, 17 Aug 2014 16:17:04 +0000 (09:17 -0700)]
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>
Frank Zago [Fri, 15 Aug 2014 16:48:12 +0000 (12:48 -0400)]
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>
John L. Hammond [Fri, 15 Aug 2014 16:48:10 +0000 (12:48 -0400)]
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>
Fan Yong [Fri, 15 Aug 2014 16:48:09 +0000 (12:48 -0400)]
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.
Paul Cassella [Fri, 15 Aug 2014 16:48:08 +0000 (12:48 -0400)]
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.