GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
8 years agostaging: lustre: lov: handle the case of stripe size is not power 2
Jinshan Xiong [Tue, 16 Aug 2016 20:18:45 +0000 (16:18 -0400)]
staging: lustre: lov: handle the case of stripe size is not power 2

Calculate the end of current stripe correctly when the stripe size
is not power 2.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4860
Reviewed-on: http://review.whamcloud.com/9882
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: avoid a deadlock in page write
Jinshan Xiong [Tue, 16 Aug 2016 20:18:44 +0000 (16:18 -0400)]
staging: lustre: llite: avoid a deadlock in page write

For a partial page write, it will have to issue a READ RPC firstly
to get a full uptodate page. If another page is already locked by
this thread it can easily cause deadlock.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4873
Reviewed-on: http://review.whamcloud.com/9928
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: Ensure lmv_intent_lookup cleans up reqp
Nathaniel Clark [Tue, 16 Aug 2016 20:18:43 +0000 (16:18 -0400)]
staging: lustre: lmv: Ensure lmv_intent_lookup cleans up reqp

Ensure there aren't invalid pointers hanging around after
ptlrpc_req_finished is called.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826
Reviewed-on: http://review.whamcloud.com/9841
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: lookup remote migrating object in LMV
wang di [Tue, 16 Aug 2016 20:18:42 +0000 (16:18 -0400)]
staging: lustre: lmv: lookup remote migrating object in LMV

If remote object is being found in a migrating directory,
it should continue to lookup the object in remote MDT,
instead of return.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4805
Reviewed-on: http://review.whamcloud.com/9806
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: access lum_stripe_offset as little endian
John L. Hammond [Tue, 16 Aug 2016 20:18:41 +0000 (16:18 -0400)]
staging: lustre: lmv: access lum_stripe_offset as little endian

By the time that a struct lmv_user_md reaches lmv_placement_policy()
it has already been converted to little endian. Therefore use the
appropriate macros around accesses to this this field. This issue was
found by rewriting the definition of struct lmv_user_md to use the
__leXX typedefs and running sparse.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4738
Reviewed-on: http://review.whamcloud.com/9671
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Swapnil Pimpale <spimpale@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: simplify inline functions in lustre_fid.h
John L. Hammond [Tue, 16 Aug 2016 20:18:40 +0000 (16:18 -0400)]
staging: lustre: simplify inline functions in lustre_fid.h

Several inline functions return a structure that was passed in.
Their is no need for this so just make these function void.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/8641
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: use bool for several function in lustre_idl.h/lustre_fid.h
John L. Hammond [Tue, 16 Aug 2016 20:18:39 +0000 (16:18 -0400)]
staging: lustre: use bool for several function in lustre_idl.h/lustre_fid.h

Change the return type of several predicate functions from int to bool.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/8641
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: const correct FID/OSTID/... helpers
John L. Hammond [Tue, 16 Aug 2016 20:18:38 +0000 (16:18 -0400)]
staging: lustre: const correct FID/OSTID/... helpers

Add a const qualifier wherever possible to the pointer parameters of
the inline helper functions in lustre_idl.h and lustre_fid.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/8641
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: don't need to const __u64 parameters for lustre_idl.h
John L. Hammond [Tue, 16 Aug 2016 20:18:37 +0000 (16:18 -0400)]
staging: lustre: don't need to const __u64 parameters for lustre_idl.h

Remove the const for the __u64 parameters for inline functions
in lustre_idl.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/8641
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: mdc: fixup MDS_SWAP_LAYOUTS ELC handling
John L. Hammond [Tue, 16 Aug 2016 20:18:36 +0000 (16:18 -0400)]
staging: lustre: mdc: fixup MDS_SWAP_LAYOUTS ELC handling

In mdc_ioc_swap_layouts() cancel *any* unused locks with LAYOUT or
XATTR IBITS set on the two files. (This matches the locks acquired in
mdt_swap_layouts(). Previously only locks that conflicted with a CR
LAYOUT lock were cancelled.)

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4320
Reviewed-on: http://review.whamcloud.com/9329
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: a few fixes for migration.
wang di [Tue, 16 Aug 2016 20:18:35 +0000 (16:18 -0400)]
staging: lustre: llite: a few fixes for migration.

1. Clear the client dentry cache before migrating file/directory
   to the remote MDT.

2. Do not return stripe information to client, if it did not get
   the layout lock.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4682
Reviewed-on: http://review.whamcloud.com/9522
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: osc: allow to call brw_commit() multiple times
Jinshan Xiong [Tue, 16 Aug 2016 20:18:34 +0000 (16:18 -0400)]
staging: lustre: osc: allow to call brw_commit() multiple times

Sometimes the rq_commit_cb of BRW RPC can be called twice if that RPC
has already committed at reply time. This will cause inaccuracy of
unstable pages accounting and then assertion.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3274
Reviewed-on: http://review.whamcloud.com/8215
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: enable clients to inject error for lfsck
Fan Yong [Tue, 16 Aug 2016 20:18:33 +0000 (16:18 -0400)]
staging: lustre: llite: enable clients to inject error for lfsck

This enables the client to inject an error by altering
the parent FID in order to test if the server side file
system checker behaves properly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3951
Reviewed-on: http://review.whamcloud.com/7667
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: libcfs: Only dump log once per sec. to avoid EEXIST
Ryan Haasken [Tue, 16 Aug 2016 20:18:32 +0000 (16:18 -0400)]
staging: lustre: libcfs: Only dump log once per sec. to avoid EEXIST

Since the log file name contains the current time in seconds, dumping
the logs more than once per second causes EEXIST errors to be emitted.
Add a static variable to libcfs_debug_dumplog_internal that records
the time of the last Lustre log dump.  If the current time in seconds
is equal to the last time, do not dump logs again.

Note that this is not thread-safe.  However, in the rare case that two
threads try to access last_dump_time simultaneously, the worst thing
that could happen is that one of the threads will get an EEXIST error
when trying to write the log file.  This is no worse than the current
situation, and it is not likely to happen.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4129
Reviewed-on: http://review.whamcloud.com/8964
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: fix issue found by Klocwork Insight tool
Dmitry Eremin [Tue, 16 Aug 2016 20:18:31 +0000 (16:18 -0400)]
staging: lustre: lmv: fix issue found by Klocwork Insight tool

'plock.cookie' might be used uninitialized in this function.

sscanf format specification '%d' expects type 'int *' for 'd',
but parameter 3 has a different type '__u32*'

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9390
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: add ability to migrate inodes.
wang di [Tue, 16 Aug 2016 20:18:30 +0000 (16:18 -0400)]
staging: lustre: add ability to migrate inodes.

Add client support to migrate the individual inodes
from one MDT to another MDT, and this functionality
will only migrate inode layout on MDT but not touch
data object on OST.

The directory will be migrated from top to the bottom,
i.e. migrating parent first, then migrating the child.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2430
Reviewed-on: http://review.whamcloud.com/6662
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obdclass: bug fixes for lu_device_type handling
Fan Yong [Tue, 16 Aug 2016 20:18:29 +0000 (16:18 -0400)]
staging: lustre: obdclass: bug fixes for lu_device_type handling

There was no protection when inc/dec lu_device_type::ldt_device_nr,
which may caused the ldt_device_nr to be wrong and trigger assert.
This patch redefine lu_device_type::ldt_device_nr as atomic type.

There was no protection when add/del lu_device_type::ldt_linkage
into/from the global lu_device_types list, which may caused bad
address accessing. This patch uses the existing obd_types_lock
to protect related operations.

We do NOT need lu_types_stop() any longer. Such function scans
the global lu_device_types list, and for each type item on it
which has zerod lu_device_type::ldt_device_nr, call its stop()
method. In fact, the lu_device_type::ldt_device_nr only will be
zero when the last lu_device_fini() is called, and at that time,
inside the lu_device_fini(), its stop() method will be called.
So it is unnecessary to call the stop() again via lu_types_stop().

Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4604
Reviewed-on: http://review.whamcloud.com/8694
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obdclass: fix lmd_parse() to handle comma-separated NIDs
Jian Yu [Tue, 16 Aug 2016 20:18:28 +0000 (16:18 -0400)]
staging: lustre: obdclass: fix lmd_parse() to handle comma-separated NIDs

This patch handles the  upgrade situation that old mountdata already
contains comma-separated NIDs. The correct way to fix the original
issue is to parse comma-separated NIDs in lmd_parse().

Signed-off-by: Jian Yu <jian.yu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4460
Reviewed-on: http://review.whamcloud.com/8918
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: delete striped directory
wang di [Tue, 16 Aug 2016 20:18:27 +0000 (16:18 -0400)]
staging: lustre: delete striped directory

Add delete striped directory, it includes

1. enable sync log between MDTs, so slave objects will
   be delete by unlink log, which is similar as deleting ost
   object.

2. retrieve layout information of striped directory on MDT,
   then lock all of the slave objects before unlink.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-on: http://review.whamcloud.com/7445
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: fix "getdirstripe" to show stripe info
wang di [Tue, 16 Aug 2016 20:18:26 +0000 (16:18 -0400)]
staging: lustre: llite: fix "getdirstripe" to show stripe info

Fix "lfs getdirstripe", so it can show layout information
of striped directory

[root@testnode tests]# ../utils/lfs getdirstripe /mnt/lustre/test1
/mnt/lustre/test1
lmv_stripe_count: 2
lmv_stripe_offset: 0
mdtidx               FID[seq:oid:ver]
     0               [0x280000400:0x1:0x0]
     1               [0x2c0000400:0x1:0x0]

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-on: http://review.whamcloud.com/7228
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: create striped directory
wang di [Tue, 16 Aug 2016 20:18:25 +0000 (16:18 -0400)]
staging: lustre: create striped directory

1. client send create request to the master MDT, which
  will allocate FIDs and create slaves. for all of slaves.

2. Client needs to revalidate slaves during intent getattr
   and open request.

3. lmv_stripe_md will include attributes(size, nlink etc)
   from all of stripe, which will be protected by UPDATE lock.
   client needs to merge these attributes when update inode.

4. send create request to the MDT where the file is located,
   which can help creating master stripe of striped directory.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3529
Reviewed-on: http://review.whamcloud.com/7196
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: replace obd_free_memmd with lmv_free_memmd
wang di [Tue, 16 Aug 2016 20:18:24 +0000 (16:18 -0400)]
staging: lustre: lmv: replace obd_free_memmd with lmv_free_memmd

Use lmv_free_memmd for proper cleanup instead of
the generic obd_free_memmd.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: remove lmv_get_easize
wang di [Tue, 16 Aug 2016 20:18:23 +0000 (16:18 -0400)]
staging: lustre: lmv: remove lmv_get_easize

Completely replace lmv_get_easize with lmv_mds_md_size.
With this change we can delete lmv_get_easize.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: change handling of lmv striping information
wang di [Tue, 16 Aug 2016 20:18:22 +0000 (16:18 -0400)]
staging: lustre: lmv: change handling of lmv striping information

The lmv_[un]pack_md function are used to calculate the
size of the data used to represent the LMV striping data.
The original code was straight forward in its calculate
with lmv_get_easize since only one type of data format
could exist. We want to be able to support different
version of this data in the future so this patch moves
to generating the size of the data using the stripe count
and which LMV_MAGIC_* version.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: remove duplicate MAX_HASH_*
wang di [Tue, 16 Aug 2016 20:18:21 +0000 (16:18 -0400)]
staging: lustre: lmv: remove duplicate MAX_HASH_*

The MAX_HASH_* macros already exist in obd.h. Remove
the duplicated defines in lustre_idl.h.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: remove unused lmv_get_mea function
wang di [Tue, 16 Aug 2016 20:18:20 +0000 (16:18 -0400)]
staging: lustre: lmv: remove unused lmv_get_mea function

The function lmv_get_mea() is not used so remove it.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: mdc: don't take rpc lock for readdir case
wang di [Tue, 16 Aug 2016 20:18:19 +0000 (16:18 -0400)]
staging: lustre: mdc: don't take rpc lock for readdir case

If the operation is IT_READDIR don't need to handle the
mdc RPC lock.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10761
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: change remove parameter to bool
wang di [Tue, 16 Aug 2016 20:18:18 +0000 (16:18 -0400)]
staging: lustre: llite: change remove parameter to bool

Change the 3rd parameter remove to a bool for ll_release_page
function.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: pass inode to ll_release_page
wang di [Tue, 16 Aug 2016 20:18:17 +0000 (16:18 -0400)]
staging: lustre: llite: pass inode to ll_release_page

Add a inode parameter to ll_release_page. This will be
used in the future.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: style cleanup for llite_internal.h
wang di [Tue, 16 Aug 2016 20:18:16 +0000 (16:18 -0400)]
staging: lustre: llite: style cleanup for llite_internal.h

Group function prototypes together related to dir.c. Move
ll_release_page to be with function declarations.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: remove comment from ll_dir_read
wang di [Tue, 16 Aug 2016 20:18:15 +0000 (16:18 -0400)]
staging: lustre: llite: remove comment from ll_dir_read

Remove comment about fixing swabbing that is not needed.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: add md_op_data parameter to ll_get_dir_page
wang di [Tue, 16 Aug 2016 20:18:14 +0000 (16:18 -0400)]
staging: lustre: llite: add md_op_data parameter to ll_get_dir_page

Pass in struct md_op_data for ll_get_dir_page function.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: aim-network: fix interrupt unsafe spinlocks
Christian Gromm [Thu, 18 Aug 2016 13:28:27 +0000 (15:28 +0200)]
staging: most: aim-network: fix interrupt unsafe spinlocks

The networking AIM does not use the *_irqsave and *_irqrestore flavored
spinlock functions. The rx_completion callback, however, can be called
from an interrupt context.

This patch is needed to fix this problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: android: ion: ion_test.c: fix parenthesis alignment
Ben LeMasurier [Tue, 16 Aug 2016 17:01:44 +0000 (11:01 -0600)]
Staging: android: ion: ion_test.c: fix parenthesis alignment

This fixes the checkpatch.pl "Alignment should match open parenthesis"
issues in ion_test.c.

Signed-off-by: Ben LeMasurier <ben@crypt.ly>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: android: ion: ion_heap.c: fix parenthesis alignment
Ben LeMasurier [Wed, 17 Aug 2016 03:02:00 +0000 (21:02 -0600)]
Staging: android: ion: ion_heap.c: fix parenthesis alignment

This fixes the checkpatch.pl "Alignment should match open parenthesis"
issues in ion_heap.c.

Signed-off-by: Ben LeMasurier <ben@crypt.ly>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: dim2-hdm: introduce function dim2_transfer_madr
Christian Gromm [Thu, 18 Aug 2016 14:58:47 +0000 (16:58 +0200)]
staging: most: dim2-hdm: introduce function dim2_transfer_madr

This patch removes duplicated code by putting it into the new function
dim2_transfer_madr.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: dim2-hdm: initialize DBR memory of synchronous channels
Christian Gromm [Thu, 18 Aug 2016 14:58:46 +0000 (16:58 +0200)]
staging: most: dim2-hdm: initialize DBR memory of synchronous channels

In the time after a synchronous DIM2 channel is enabled and before the
first buffer travels this channel, the DIM2 macro is babbling random
random data to the network.

This patch initializes the internal DBR memory of the DIM2 that is used
to transfer the synchronous data.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorinput: make lock_visor_dev a mutex
Tim Sell [Sat, 11 Jun 2016 01:48:26 +0000 (21:48 -0400)]
staging: unisys: visorinput: make lock_visor_dev a mutex

Since lock_visor_dev is a binary semaphore it makes more sense to
use a mutex lock.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorinput: ensure proper locking wrt creation & ints
Tim Sell [Sat, 11 Jun 2016 01:48:25 +0000 (21:48 -0400)]
staging: unisys: visorinput: ensure proper locking wrt creation & ints

Ensure we properly lock between visorinput_channel_interrupt(),
visorinput_open(), and devdata_create().  We now guarantee that:

* interrupts will be disabled and remain disabled during device creation,
  by setting 'paused = true' across device creation

* we canNOT get into visorinput_open() until the device structure is
  totally initialized, by delaying the input_register_device() until the
  end of device initialization

We also now ensure that lock_visor_dev is held across updates of devdata
state, to ensure state consistency.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: Move vbushelper.h to visorbus directory
David Kershner [Sat, 11 Jun 2016 01:48:24 +0000 (21:48 -0400)]
staging: unisys: Move vbushelper.h to visorbus directory

Only visorbus needs this header file so move it to visorbus
directory.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: fix visorbus_private.h comments
Tim Sell [Sat, 11 Jun 2016 01:48:23 +0000 (21:48 -0400)]
staging: unisys: visorbus: fix visorbus_private.h comments

This patch ONLY touches comment lines, i.e., NO executable code is
affected.

Comments were fixed in visorbus_private.h:
* Minor typos were corrected.
* Useless comments were removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Rename function to follow existing convention
David Binder [Sat, 11 Jun 2016 01:48:22 +0000 (21:48 -0400)]
staging: unisys: visorbus: Rename function to follow existing convention

Renames visorchipset_device_pause_response to device_pause_response,
thereby following the convention that other responder functions follow.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Remove notifier-related code from visorbus
David Binder [Sat, 11 Jun 2016 01:48:21 +0000 (21:48 -0400)]
staging: unisys: visorbus: Remove notifier-related code from visorbus

When this functionality was first implemented, visorchipset and visorbus
were separate drivers, which necessitated a registration mechanism for
them to communicate.  More-recently, visorchipset and visorbus were
combined into a single driver, and now exist as separate source files
within the same driver, known as 'visorbus'.  This eliminated the need
for a registration mechanism, but it has remained nevertheless until now.
For the sake of simplification, this registration mechanism is now being
removed.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: rectify kerneldoc comment for struct
David Binder [Sat, 11 Jun 2016 01:48:20 +0000 (21:48 -0400)]
staging: unisys: visorbus: rectify kerneldoc comment for struct

Fixes the kerneldoc comment for struct visor_device - the struct members
were not listed with the appropriate @ prefix.

Signed-off-by: David Binder <david.binder@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Move visorbus-unique functions to private header
David Binder [Sat, 11 Jun 2016 01:48:19 +0000 (21:48 -0400)]
staging: unisys: visorbus: Move visorbus-unique functions to private header

Moves function prototypes that are unique to visorbus from
include/visorbus.h to visorbus/visorbus_private.h.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Rectify commenting in visorchipset.c
David Binder [Sat, 11 Jun 2016 01:48:18 +0000 (21:48 -0400)]
staging: unisys: visorbus: Rectify commenting in visorchipset.c

Adds kerneldoc formatting to appropriate functions. Other multi-line
comments now use proper formatting.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: fix visorchannel.c comments
David Binder [Sat, 11 Jun 2016 01:48:17 +0000 (21:48 -0400)]
staging: unisys: visorbus: fix visorchannel.c comments

This patch ONLY touches comment lines, i.e., NO executable code is
affected.

Comments were fixed in visorchannel.c:
* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Multi-line comments were tweaked so as to use appropriate conventions.
* Minor typos were corrected.
* Useless comments were removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: David Binder <david.binder@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: fix commenting in visorbus_main.c
David Binder [Sat, 11 Jun 2016 01:48:16 +0000 (21:48 -0400)]
staging: unisys: visorbus: fix commenting in visorbus_main.c

This patch ONLY touches comment lines, i.e., NO executable code is
affected.

* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Improper uses of kerneldoc formatting were converted to standard
  multi-line comments.
* Multi-line comments were tweaked so as to use appropriate conventions.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: fix commenting in vbusdevinfo.h
David Binder [Sat, 11 Jun 2016 01:48:15 +0000 (21:48 -0400)]
staging: unisys: visorbus: fix commenting in vbusdevinfo.h

This patch ONLY touches comment lines, i.e., NO executable code is
affected.

* All functions worthy of documenting now use standard kerneldoc
  formatting.
* Multi-line comments were tweaked so as to use appropriate conventions.
* Minor typos were corrected.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused parameter from function
Tim Sell [Sat, 11 Jun 2016 01:48:14 +0000 (21:48 -0400)]
staging: unisys: visorbus: remove unused parameter from function

The off parameter to visorchannel_create_guts() was never used, so it was
removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: Remove reference to unused STANDALONE_CLIENT
Bryan Thompson [Sat, 11 Jun 2016 01:48:13 +0000 (21:48 -0400)]
staging: unisys: Remove reference to unused STANDALONE_CLIENT

The STANDALONE_CLIENT define is no longer used by Unisys driver code.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Remove unused functions
Bryan Thompson [Sat, 11 Jun 2016 01:48:12 +0000 (21:48 -0400)]
staging: unisys: visorbus: Remove unused functions

Remove visorbus_clear_channel, visorchannel_signalqueue_slots_avail,
visorchannel_signalqueue_max_slots, visorchannel_clear, and
visorchannel_debug which are no longer called by any driver.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Remove unnecessary EXPORT_SYMBOL statements
Bryan Thompson [Sat, 11 Jun 2016 01:48:11 +0000 (21:48 -0400)]
staging: unisys: visorbus: Remove unnecessary EXPORT_SYMBOL statements

The driver that is now visorbus started out as multiple separate drivers,
and when they were merged the EXPORT_SYMBOL statements that were required
for separate drivers were left in the code. This patch removes those now
unnecessary exports.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Make visordriver_callback_lock a mutex
Bryan Thompson [Sat, 11 Jun 2016 01:48:10 +0000 (21:48 -0400)]
staging: unisys: visorbus: Make visordriver_callback_lock a mutex

visordriver_callback_lock is just a binary semaphore that logically
makes more sense as a mutex.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove periodic_work.h/.c
Tim Sell [Sat, 11 Jun 2016 01:48:09 +0000 (21:48 -0400)]
staging: unisys: visorbus: remove periodic_work.h/.c

These files were made no-longer-necessary by recent commits.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: use kernel timer instead of workqueue
Tim Sell [Sat, 11 Jun 2016 01:48:08 +0000 (21:48 -0400)]
staging: unisys: visorbus: use kernel timer instead of workqueue

A kernel timer is now used as the vehicle to periodically call the
channel_interrupt function of registered visor drivers, instead of a
workqueue.

This simplifies a lot of things by making periodic_work.c and
periodic_work.h no longer necessary.  This change also means that the
channel_interrupt() callbacks registered by visor drivers (via
visorbus_register_visor_driver()) will now be called in atomic context
(i.e., canNOT sleep) rather than kernel thread context (CAN sleep).
Fortunately this did NOT necessitate any change to the existing
channel_interrupt() callbacks, because none of them ever perform any
operations that would be invalid in atomic context.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorinput: remove unnecessary locking
Tim Sell [Sat, 11 Jun 2016 01:48:07 +0000 (21:48 -0400)]
staging: unisys: visorinput: remove unnecessary locking

Locking in the _interrupt() function is NOT necessary so long as we ensure
that interrupts have been stopped whenever we need to pause or resume the
device, which we now do.

While a device is paused, we ensure that interrupts stay disabled, i.e.
that the _interrupt() function will NOT be called, yet remember the desired
state in devdata->interrupts_enabled if open() or close() are called are
called while the device is paused.  Then when the device is resumed, we
restore the actual state of interrupts (i.e., whether _interrupt() is going
to be called or not) to the desired state in devdata->interrupts_enabled.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: removed unused periodic_test_workqueue
Tim Sell [Sat, 11 Jun 2016 01:48:06 +0000 (21:48 -0400)]
staging: unisys: visorbus: removed unused periodic_test_workqueue

periodic_test_workqueue was an unused relic from the past, and was removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: include: Remove thread-related enum members
David Binder [Sat, 11 Jun 2016 01:48:05 +0000 (21:48 -0400)]
staging: unisys: include: Remove thread-related enum members

Code relating to ktheads was previously removed from s-Par driver code.
This patch cleans up lingering remnants of kthreads by removing thread-
related enum types.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic: Correct comment spelling mistake
David Binder [Sat, 11 Jun 2016 01:48:04 +0000 (21:48 -0400)]
staging: unisys: visornic: Correct comment spelling mistake

Fixes a comment spelling mistake in visornic.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: modify format string to match argument
David Binder [Sat, 11 Jun 2016 01:48:03 +0000 (21:48 -0400)]
staging: unisys: visorbus: modify format string to match argument

Modifies the format string of snprintf to expect an unsigned int
instead of a signed one, per the supplied argument.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused struct
David Binder [Sat, 11 Jun 2016 01:48:02 +0000 (21:48 -0400)]
staging: unisys: visorbus: remove unused struct

Removes unused struct definition, channel_size_info, in response to
findings by SonarQube.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused module parameters
David Binder [Sat, 11 Jun 2016 01:48:01 +0000 (21:48 -0400)]
staging: unisys: visorbus: remove unused module parameters

Removes unused module parameters from visorbus_main.c, in response to
findings by SonarQube.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: check parahotplug_request_complete_result
Erik Arfvidson [Sat, 11 Jun 2016 01:48:00 +0000 (21:48 -0400)]
staging: unisys: visorbus: check parahotplug_request_complete_result

This patch modifies the caller of parahotplug_request_complete()
to check the return value and return appropriate result.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove return values for write_vbus functions
Erik Arfvidson [Sat, 11 Jun 2016 01:47:59 +0000 (21:47 -0400)]
staging: unisys: visorbus: remove return values for write_vbus functions

This patch removes the return values from the write_vbus_* channel
functions. Nobody was checking the return values and the value stored
into the vbus info is not critical to the functioning of the device.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: reduce context of list_del mutex
Christian Gromm [Mon, 18 Jul 2016 15:25:27 +0000 (17:25 +0200)]
staging: most: hdm-usb: reduce context of list_del mutex

This patch reduces context of the list_del mutex for the function
hdm_enqueue().

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: core: rename device struct of core module
Christian Gromm [Mon, 27 Jun 2016 13:00:33 +0000 (15:00 +0200)]
staging: most: core: rename device struct of core module

This patch gives the struct device variable of the core a more meaningful
name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: core: remove debug print
Christian Gromm [Mon, 27 Jun 2016 13:00:32 +0000 (15:00 +0200)]
staging: most: core: remove debug print

This patch removes the debug print in case an HDM ran out of rx buffers.
This is not needed since the status is reflected in the sysfs
channel_starving flag. Additionally, it prevents the system form slowing
down.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: dim2-hdm: fix possible kernel freeze when reusing a dim2 channel
Christian Gromm [Mon, 13 Jun 2016 14:24:25 +0000 (16:24 +0200)]
staging: most: dim2-hdm: fix possible kernel freeze when reusing a dim2 channel

If a DIM2 channel is being closed while it is busy, the channels's status
flag could possibly stay active for this very channel. This causes the
kernel to freeze by the time the channel is opened again.

This patch fixes the problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: dim2-hdm: add configuration for fcnt
Christian Gromm [Mon, 13 Jun 2016 14:24:24 +0000 (16:24 +0200)]
staging: most: dim2-hdm: add configuration for fcnt

This patch adds possibility to configure the DIM2-IP parameter
representing the number of frames per sub-buffer for synchronous
channels.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: dim2-hdm: fix race condition when closing a channel
Christian Gromm [Mon, 13 Jun 2016 14:24:23 +0000 (16:24 +0200)]
staging: most: dim2-hdm: fix race condition when closing a channel

This patch fixes race between the function poison_channel that clears
the state is_initialized and the tasklet function dim2_tasklet_fn that
checks the state is_initialized.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: remove unnecessary spaces
Christian Gromm [Mon, 6 Jun 2016 13:23:11 +0000 (15:23 +0200)]
staging: most: v4l2-aim: remove unnecessary spaces

This patch removes the unnecessary spaces.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: remove unnecessary label err_vbi_dev
Christian Gromm [Mon, 6 Jun 2016 13:23:10 +0000 (15:23 +0200)]
staging: most: v4l2-aim: remove unnecessary label err_vbi_dev

For optimization purposes this patch removes the label err_vbi_dev.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: remove unnecessary retval
Christian Gromm [Mon, 6 Jun 2016 13:23:09 +0000 (15:23 +0200)]
staging: most: v4l2-aim: remove unnecessary retval

The function aim_register_videodev() uses the variables 'ret' and
'retval' to represent the same value.

This patch removes 'retval' and replaces it with 'ret'. Further, it
replaces the constant return value '-ENODEV' with the result returned by
function video_register_device() in the event something went wrong.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: replace pr_xx calls by v4l2_xx calls
Christian Gromm [Mon, 6 Jun 2016 13:23:08 +0000 (15:23 +0200)]
staging: most: v4l2-aim: replace pr_xx calls by v4l2_xx calls

This patch replaces pr_info, pr_err, etc. function calls by the
v4l2_... ones to get the device dependent logs.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: assign unique names to devices
Christian Gromm [Mon, 6 Jun 2016 13:23:07 +0000 (15:23 +0200)]
staging: most: v4l2-aim: assign unique names to devices

The current V4L2 AIM implementation assigns to all video devices and to
all V4L devices the same names.

This patch makes use of hardware dependent names for the video devices and
allows the user to choose the names for the V4L devices.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: optimize list_for_each_entry_safe
Christian Gromm [Mon, 6 Jun 2016 13:23:06 +0000 (15:23 +0200)]
staging: most: v4l2-aim: optimize list_for_each_entry_safe

As the function get_aim_dev() does not delete elements of the list, the
use of macro list_for_each_entry_safe is not necessary.

This patch replaces the macro list_for_each_entry_safe with the macro
list_for_each_entry.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: v4l2-aim: fix interrupt unsafe spinlocks
Christian Gromm [Mon, 6 Jun 2016 13:23:05 +0000 (15:23 +0200)]
staging: most: v4l2-aim: fix interrupt unsafe spinlocks

The functions get_aim_dev() and aim_rx_data() are using interrupt unsafe
spinlocks even though they may be called from an interrupt context.

This patch fixes the described problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: speakup: ensure we do not overrun synths array
Colin Ian King [Mon, 9 May 2016 22:22:14 +0000 (23:22 +0100)]
staging: speakup: ensure we do not overrun synths array

synth_add allows one to add MAXSYNTHS synths to the synths array;
however it always NULLifies the next synth in the array which
means that on the MAXSYNTHS synth we get an out-of-bounds write of
the NULL to the synths array.  Make the synths array MAXSYNTHS + 1
elements in size to allow for the final NULL sentinal to avoid the
out-of-bounds write.

Issue found wit CoverityScan, CID#744671

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: speakup: Remove space after cast
Laurence Rochfort [Wed, 18 May 2016 20:07:45 +0000 (21:07 +0100)]
Staging: speakup: Remove space after cast

Fix the checkpatch.pl warning "No space is necessary after a cast".

Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'ch_intr_rx'
Daeseok Youn [Wed, 6 Jul 2016 06:19:58 +0000 (15:19 +0900)]
staging: dgnc: remove useless variable 'ch_intr_rx'

The 'ch_intr_rx' variable was used only for increasing.
So the 'ch_intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'ch_intr_tx'
Daeseok Youn [Wed, 6 Jul 2016 06:19:27 +0000 (15:19 +0900)]
staging: dgnc: remove useless variable 'ch_intr_tx'

The 'ch_intr_tx' variable was used only for increasing.
So the 'ch_intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'ch_intr_modem'
Daeseok Youn [Wed, 6 Jul 2016 06:18:56 +0000 (15:18 +0900)]
staging: dgnc: remove useless variable 'ch_intr_modem'

The 'ch_intr_modem' variable was used only for increasing.
So the 'ch_intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'intr_rx'
Daeseok Youn [Wed, 6 Jul 2016 06:18:25 +0000 (15:18 +0900)]
staging: dgnc: remove useless variable 'intr_rx'

The 'intr_rx' variable was used only for increasing.
So the 'intr_rx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'intr_tx'
Daeseok Youn [Wed, 6 Jul 2016 06:17:53 +0000 (15:17 +0900)]
staging: dgnc: remove useless variable 'intr_tx'

The 'intr_tx' variable was used only for increasing.
So the 'intr_tx' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove unused variable 'intr_modem'
Daeseok Youn [Wed, 6 Jul 2016 06:17:18 +0000 (15:17 +0900)]
staging: dgnc: remove unused variable 'intr_modem'

The 'intr_modem' variable was used only for increasing.
So the 'intr_modem' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant null check in
Daeseok Youn [Wed, 6 Jul 2016 06:16:44 +0000 (15:16 +0900)]
staging: dgnc: remove redundant null check in

the "brd" was already checked for NULL before calling dgnc_do_remap().

the dgnc_do_remap() function was called only
from the dgnc_found_board() and the DGNC_BOARD_MAGIC value
was assigned to "brd->magic" in dgcn_found_board(). So it doesn't
need to check about magic value.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless variable 'intr_count'
Daeseok Youn [Wed, 6 Jul 2016 06:16:12 +0000 (15:16 +0900)]
staging: dgnc: remove useless variable 'intr_count'

The 'intr_count' variable was used only for increasing.
So the 'intr_count' variable is not useful for this driver.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant NULL check for brd
Daeseok Youn [Wed, 6 Jul 2016 06:15:34 +0000 (15:15 +0900)]
staging: dgnc: remove redundant NULL check for brd

the "brd" value cannot be NULL in dgnc_finalize_board_init().
Because "brd" as a parameter of this function was already
checked for NULL.

the dgnc_finalize_board_init() as a static function was called
only from dgnc_found_board() function and brd->magic value
was assigned once in dgnc_found_board(). So it doesn't need to
check for DGNC_BOARD_MAGIC value.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: re-arrange functions for removing
Daeseok Youn [Wed, 6 Jul 2016 06:14:37 +0000 (15:14 +0900)]
staging: dgnc: re-arrange functions for removing

Re-arrange the functions for removing forward declarations in dgnc_cls.c file.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: removes redundant null check and change
Daeseok Youn [Wed, 6 Jul 2016 06:13:55 +0000 (15:13 +0900)]
staging: dgnc: removes redundant null check and change

The dgnc_set_modem_info() used only channel_t variable.
Any other variables were used only for checking NULL.

So fist parameter changed from "tty_struct" to "channel_t" and
useless NULL checks and variables are removed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant variable null check
Daeseok Youn [Wed, 6 Jul 2016 06:13:14 +0000 (15:13 +0900)]
staging: dgnc: remove redundant variable null check

The unit struct(un_t) was not used in dgnc_tty_hangup().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant local variable for
Daeseok Youn [Wed, 6 Jul 2016 06:12:29 +0000 (15:12 +0900)]
staging: dgnc: remove redundant local variable for

The local variable "bd" was not used in dgnc_carrier() function.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove useless error value assignment
Daeseok Youn [Wed, 6 Jul 2016 06:11:52 +0000 (15:11 +0900)]
staging: dgnc: remove useless error value assignment

The "result" variable in dgnc_get_mstat() was initialized with
"-EIO". But if the "ch" is not null, "result" will be set to zero
and if the "ch" is null, dgnc_get_mstat() will return "-ENXIO" as
an error. So "-EIO" error value was useless in dgnc_get_mstat().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove redundant NULL checks in
Daeseok Youn [Wed, 6 Jul 2016 06:11:13 +0000 (15:11 +0900)]
staging: dgnc: remove redundant NULL checks in

The dgnc_block_til_ready() is only used in dgnc_tty_open().
The unit data(struct un_t) was stored into tty->driver_data in dgnc_tty_open().
And also tty and un were tested about NULL so these variables doesn't
need to check for NULL in dgnc_block_til_ready().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: add __exit macro to dgnc_driver.c
Joshua Houghton [Sat, 18 Jun 2016 19:42:07 +0000 (19:42 +0000)]
staging: dgnc: add __exit macro to dgnc_driver.c

Add the __exit macro to the dgnc_cleanup_module(void) function
in dgnc_driver.c

Signed-off-by: Joshua Houghton <josh@awful.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: don't reinvent struct bio_vec
Al Viro [Sat, 23 Jul 2016 06:37:00 +0000 (02:37 -0400)]
lustre: don't reinvent struct bio_vec

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: simplify the living hell out of ksocknal_lib_recv_kiov()
Al Viro [Sat, 23 Jul 2016 06:36:59 +0000 (02:36 -0400)]
lustre: simplify the living hell out of ksocknal_lib_recv_kiov()

... by using ITER_BVEC recvmsg

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: switch lnet_sock_write() to sock_sendmsg()
Al Viro [Sat, 23 Jul 2016 06:36:58 +0000 (02:36 -0400)]
lustre: switch lnet_sock_write() to sock_sendmsg()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: do post work for statahead in readdir case
wang di [Fri, 22 Jul 2016 02:44:11 +0000 (22:44 -0400)]
staging: lustre: llite: do post work for statahead in readdir case

Increase the post-work for the statahead thread in the readdir
case since it can become very busy.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10761
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>