1
0
Fork 0
Commit Graph

768272 Commits (47e541a17ec7d64e19c11f59dfce314a89f1b228)

Author SHA1 Message Date
Gao Xiang 47e541a17e staging: erofs: fix compile error without built-in decompression support
This patch fixes incorrect code snippets due to spilt code
into small patches by mistake.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050747.html
Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050750.html
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 08:05:02 +02:00
Wei Yongjun 6d4abf1c0e staging: axis-fifo: fix return value check in axis_fifo_probe()
In case of error, the function device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Fixes: 4a965c5f89 ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:26:31 +02:00
Todd Poynor 758c579ec6 staging: gasket: page table: remove code for "no dma_ops"
Remove code with TODOs on it for working around apparent problems
previously seen in a qemu environment where dma_ops was not set
correctly.  There is no user of this in the current code.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:24:10 +02:00
Todd Poynor 14d7022977 staging: gasket: sysfs: remove unnecessary NULL check on device ptr
The device pointer passed into get_mapping() will never be NULL; the
check is unnecessary.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:24:10 +02:00
Todd Poynor f390d08d8b staging: gasket: apex: fixup undefined PCI class
Apex chips with class 0 (PCI_CLASS_NOT_DEFINED) fixed up to
PCI_CLASS_SYSTEM_OTHER to enable PCI resource assignments.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:24:10 +02:00
Todd Poynor e7cffa03b3 staging: gasket: sysfs: remove check for refcount already zero
Remove the check for refcount already zero, which shouldn't be
necessary.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:24:10 +02:00
Gao Xiang 81edee7ac8 staging: erofs: fix a compile warning of Z_EROFS_VLE_VMAP_ONSTACK_PAGES
There is a type mismatch in the definition of
Z_EROFS_VLE_VMAP_ONSTACK_PAGES, let's fix it.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050707.html
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 09:21:30 +02:00
Gao Xiang 27cce7bc2f staging: erofs: add a TODO and update MAINTAINERS for staging
This patch adds a TODO to list the things to be done, and
the relevant info to MAINTAINERS so we can take all the blame :)

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:10 +02:00
Gao Xiang 105d4ad857 staging: erofs: introduce cached decompression
This patch adds an optional choice which can be
enabled by users in order to cache both incomplete
ends of compressed clusters as a complement to
the in-place decompression in order to boost random
read, but it costs more memory than the in-place
decompression only.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:10 +02:00
Gao Xiang 3883a79abd staging: erofs: introduce VLE decompression support
This patch introduces the basic in-place VLE decompression
implementation for the erofs file system.

Compared with fixed-sized input compression, it implements
what we call 'the variable-length extent compression' which
specifies the same output size for each compression block
to make the full use of IO bandwidth (which means almost
all data from block device can be directly used for decomp-
ression), improve the real (rather than just via data caching,
which costs more memory) random read and keep the relatively
lower compression ratios (it saves more storage space than
fixed-sized input compression which is also configured with
the same input block size), as illustrated below:

        |---  variable-length extent ---|------ VLE ------|---  VLE ---|
         /> clusterofs                  /> clusterofs     /> clusterofs /> clusterofs
   ++---|-------++-----------++---------|-++-----------++-|---------++-|
...||   |       ||           ||         | ||           || |         || | ... original data
   ++---|-------++-----------++---------|-++-----------++-|---------++-|
   ++->cluster<-++->cluster<-++->cluster<-++->cluster<-++->cluster<-++
        size         size         size         size         size
         \                             /                 /            /
          \                      /              /            /
           \               /            /            /
            ++-----------++-----------++-----------++
        ... ||           ||           ||           || ... compressed clusters
            ++-----------++-----------++-----------++
            ++->cluster<-++->cluster<-++->cluster<-++
                 size         size         size

The main point of 'in-place' refers to the decompression mode:
Instead of allocating independent compressed pages and data
structures, it reuses the allocated file cache pages at most
to store its compressed data and the corresponding pagevec in
a time-sharing approach by default, which will be useful for
low memory scenario.

In the end, unlike the other filesystems with (de)compression
support using a relatively large compression block size, which
reads and decompresses >= 128KB at once, and gains a more
good-looking random read (In fact it collects small random reads
into large sequential reads and caches all decompressed data
in memory, but it is unacceptable especially for embedded devices
with limited memory, and it is not the real random read), we
select a universal small-sized 4KB compressed cluster, which is
the smallest page size for most architectures, and all compressed
clusters can be read and decompressed independently, which ensures
random read number for all use cases.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:10 +02:00
Gao Xiang e7e9a307be staging: erofs: introduce workstation for decompression
This patch introduces another concept used by the unzip
subsystem called 'workstation'. It can be seen as a sparse
array that stores pointers pointed to data structures
related to the corresponding physical blocks.

All lookup cases are protected by RCU read lock. Besides,
reference count and spin_lock are also introduced to
manage its lifetime and serialize all update operations.

'workstation' is currently implemented on the in-kernel
radix tree approach for backward compatibility.
With the evolution of linux kernel, it could be migrated
into XArray implementation in the future.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:10 +02:00
Gao Xiang a158131262 staging: erofs: introduce erofs shrinker
This patch adds a dedicated shrinker targeting to free unneeded
memory consumed by a number of erofs in-memory data structures.

Like F2FS and UBIFS, it also adds:
  - sbi->umount_mutex to avoid races on shrinker and put_super
  - sbi->shrinker_run_no to not revisit recently scaned objects

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:10 +02:00
Gao Xiang 2497ee4129 staging: erofs: introduce superblock registration
In order to introducing shrinker solution for erofs,
let's manage all mounted erofs instances at first.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:09 +02:00
Gao Xiang 0d40d6e399 staging: erofs: add a generic z_erofs VLE decompressor
Currently, this patch only simply implements LZ4
decompressor due to its development priority.

In the future, erofs will support more compression
algorithm and format other than LZ4, thus a generic
decompressor interface will be needed.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:09 +02:00
Gao Xiang 366c96a3a8 staging: erofs: introduce a customized LZ4 decompression
We have to reduce the memory cost as much as possible,
so we don't want to decompress more data beyond
the output buffer size, however "LZ4_decompress_safe_partial"
doesn't guarantee to stop at the arbitary end position,
but stop just after its current LZ4 "sequence" is completed.

Link: https://groups.google.com/forum/#!topic/lz4c/_3kkz5N6n00

Therefore, I hacked the LZ4 decompression logic by hand,
probably NOT the fastest approach, and hope for better
implementation.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:09 +02:00
Gao Xiang 55441958bb staging: erofs: globalize prepare_bio and __submit_bio
The unzip subsystem also uses these functions,
let's export them to internal.h.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang b29e64d879 staging: erofs: add erofs_allocpage
This patch introduces an temporary _on-stack_ page
pool to reuse the freed page directly as much as
it can for better performance and release all pages
at a time, it also slightly reduces the possibility of
the potential memory allocation failure.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang 02827e1796 staging: erofs: add erofs_map_blocks_iter
This patch introduces an iterable L2P mapping
operation 'erofs_map_blocks_iter'.
Compared with 'erofs_map_blocks', it avoids
a number of redundant 'release and regrab'
processes if they request the same meta page.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang 5eb20ec3e5 staging: erofs: introduce pagevec for unzip subsystem
For each compressed cluster, there is a straight-forward
way of allocating a fixed or variable-sized (for VLE) array
to record the corresponding file pages for its decompression
if we decide to decompress these pages asynchronously (eg.
read-ahead case), however it could take much extra on-heap
memory compared with traditional uncompressed filesystems.

This patch introduces a pagevec solution to reuse some
allocated file page in the time-sharing approach storing
parts of the array itself in order to minimize the extra
memory overhead, thus only a constant and small-sized array
used for booting the whole array itself up will be needed.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang b8b58b3280 staging: erofs: <linux/tagptr.h>: introduce tagged pointer
Currently kernel has scattered tagged pointer usages hacked
by hand in plain code, without a unique and portable functionset
to highlight the tagged pointer itself and wrap these hacked code
in order to clean up all over meaningless magic masks.

Therefore, this patch introduces simple generic methods to fold
tags into a pointer integer. It currently supports the last n bits
of the pointer for tags, which can be selected by users.

In addition, it will also be used for the upcoming EROFS filesystem,
which heavily uses tagged pointer approach for high performance
and reducing extra memory allocation.

Link: https://en.wikipedia.org/wiki/Tagged_pointer

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Chao Yu 13f06f48f7 staging: erofs: support tracepoint
Add basic tracepoints for ->readpage{,s}, ->lookup,
->destroy_inode, fill_inode and map_blocks.

Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Chao Yu 9c07b3b39d staging: erofs: introduce error injection infrastructure
This patch introduces error injection infrastructure, with it, we can
inject error in any kernel exported common functions which erofs used,
so that it can force erofs running into error paths, it turns out that
tests can cover real rare paths more easily to find bugs.

Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Chao Yu d5beb31b6b staging: erofs: support special inode
This patch adds to support special inode, such as block dev, char,
socket, pipe inode.

Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang b17500a0fd staging: erofs: introduce xattr & acl support
This implements xattr and acl functionalities.

Inline and shared xattrs are introduced for flexibility.
Specifically, if the same xattr occurs for many times
in a large number of inodes or the value of a xattr is so large
that it isn't suitable to be inlined, a shared xattr
kept in the xattr meta will be used instead.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:24:08 +02:00
Gao Xiang fd68c6a20f staging: erofs: update Kconfig and Makefile
This commit adds Makefile and Kconfig for erofs, and
updates Makefile and Kconfig files in the fs directory.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:23:10 +02:00
Gao Xiang d72d1ce601 staging: erofs: add namei functions
This commit adds functions that transfer names to inodes.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:22:00 +02:00
Gao Xiang 3aa8ec716e staging: erofs: add directory operations
This adds functions for directory, mainly readdir.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:22:00 +02:00
Gao Xiang 431339ba90 staging: erofs: add inode operations
This adds core functions to get, read an inode.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:22:00 +02:00
Gao Xiang 81781b02f9 staging: erofs: add raw address_space operations
This commit adds functions for meta and raw data, and also
provides address_space_operations for raw data access.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:21:59 +02:00
Gao Xiang ba2b77a820 staging: erofs: add super block operations
This commit adds erofs super block operations, including (u)mount,
remount_fs, show_options, statfs, in addition to some private
icache management functions.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:21:59 +02:00
Gao Xiang bfb8674dc0 staging: erofs: add erofs in-memory stuffs
- erofs_sb_info:
   contains erofs-specific in-memory information.

 - erofs_vnode:
   contains vfs_inode and other fs-specific information.
   same as super block, the only one in-memory definition exists.

 - erofs_map_blocks
   plays a role in the file L2P mapping

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:21:59 +02:00
Gao Xiang aea1286dcb staging: erofs: add on-disk layout
This commit adds the on-disk layout header file of erofs.

Note that the on-disk layout is still WIP, and some fields are
reserved for the future use by design.

Any comments are welcome.

Thanks-to: Li Guifu <liguifu2@huawei.com>
Thanks-to: Sun Qiuyang <sunqiuyang@huawei.com>
Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:21:59 +02:00
Ioana Ciornei a89bac0a2c staging: fsl-dpaa2/ethsw: document nested structs as per kernel-doc
Document nested structs per kernel-doc requirements by moving
all comments before the actual struct.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:19 +02:00
Ioana Ciornei f970bec3cf staging: fsl-dpaa2/eth: document nested structs as per kernel-doc
Document nested structs per kernel-doc requirements by moving
all comments before the actual struct.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:19 +02:00
Ioana Radulescu 5b91b73b8c staging: fsl-dpaa2/eth: Remove unused driver version
We never really used the driver version, so no point
in keeping it around.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:19 +02:00
Ioana Radulescu 227686b652 staging: fsl-dpaa2/eth: Update default hash key
In our documentation, we claim to use a 5-tuple key for Rx hash
distribution of flows. The code however configures a key composed
of all supported header fields.

Update the Rx hash key to contain only the documented fields:
{IP src, IP dst, IP nextproto, L4 src, L4 dst}, which was the
original intention and makes most sense as a default.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:19 +02:00
Ioana Radulescu ff5c37987b staging: fsl-dpaa2/ethsw: Fix error message
Error message was referencing wrong function, fix it.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:19 +02:00
Georgios Tsotsos 4e336dff0d Staging: octeon-usb: Adding SPDX license identifier
Adding appropriate SPDX-License-Identifier (GPL-2) that were missing
from code, header and make files.

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:18:14 +02:00
Todd Poynor 330e5f2425 staging: gasket: don't print device addresses as kernel pointers
Print device addresses as unsigned long, not as kernel pointers.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:18 +02:00
Todd Poynor e8742fc322 staging: gasket: TODO: remove entry for convert to standard logging
Gasket/apex drivers now use standard logging, remove TODO entry for
this.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 76fe4ae0e7 staging: gasket: remove gasket logging header
Gasket logging functions no longer used.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 3ed768ea90 staging: gasket: apex: convert to standard logging
Drop gasket logging calls in favor of standard logging.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 0f647805c0 staging: gasket: sysfs: convert to standard logging
Drop gasket logging calls in favor of standard logging.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor c423d34478 staging: gasket: page table: convert to standard logging
Replace gasket logging calls with standard logging calls.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor e25bed80b6 staging: gasket: ioctl: convert to standard logging
Replace gasket logging calls with standard logging calls.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 952b02a281 staging: gasket: interrupt: convert to standard logging
Convert gasket logging calls to standard functions.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 803ff424e4 staging: gasket: core: convert to standard logging
Use standard logging functions, drop use of gasket log functions.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:17 +02:00
Todd Poynor 6cefe675f1 staging: gasket: save struct device for a gasket device
Save the struct device pointer to a gasket device in gasket's metadata,
to facilitate use of standard logging calls and in anticipation of
non-PCI gasket devices in the future.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27 17:09:16 +02:00
Greg Kroah-Hartman 3ceefa3ffd Second set of IIO new device support, features and cleanups.
There are also a couple of fixes that can wait for the coming merge
 window.
 
 Core new features
 
 * Support for phase channels (used in time of flight sensors amongst
   other things)
 * Support for deep UV light channel modifier.
 
 New Device Support
 
 * AD4758 DAC
   - New driver and dt bindings.
 * adxl345
   - Support the adxl375 +-200g part which is register compatible.
 * isl29501 Time of flight sensor.
   - New driver
 * meson-saradc
   - Support the Meson8m2 Socs - right now this is just an ID, but there will
     be additional difference in future.
 * mpu6050
   - New ID for 6515 variant.
 * si1133 UV sensor.
   - New driver
 * Spreadtrum SC27xx PMIC ADC
   - New driver and dt bindings.
 
 Features
 
 * adxl345
   - Add calibration offset readback and writing.
   - Add sampling frequency control.
 
 Fixes and Cleanups
 
 * ad5933
   - Use a macro for the channel definition to reduce duplication.
 * ad9523
   - Replace use of core mlock with a local lock. Part of ongoing efforts
     to avoid confusing the purpose of mlock which is only about iio core
     state changes.
   - Fix displayed phase which was out by a factor of 10.
 * adxl345
   - Add a link to the datasheet.
   - Rework the use of the address field in the chan_spec structures to
     allow addition of more per channel information.
 * adis imu
   - Mark switch fall throughs.
 * at91-sama5d2
   - Fix some casting on big endian systems.
 * bmp280
   - Drop some DT elements that aren't used and should mostly be done from
     userspace rather than in DT.
 * hx711
   - add clock-frequency dt binding and resulting delay to deal with capacitance
     issue on some boards.
   - fix a spurious unit-address in the example.
 * ina2xx
   - Avoid a possible kthread_stop with a stale task_struct.
 * ltc2632
   - Remove some unused local variables (assigned but value never used).
 * max1363
   - Use device_get_match_data to remove some boilerplate.
 * mma8452
   - Mark switch fall throughs.
 * sca3000
   - Fix a missing return in a switch statement (a bad fallthrough
     previously!)
 * sigma-delta-modulator
   - Drop incorrect unit address from the DT example.
 * st_accel
   - Use device_get_match_data to drop some boiler plate.
   - Move to probe_new for i2c driver as second parameter not used.
 * st_sensors library
   - Use a strlcpy (safe in this case).
 * st_lsm6dsx
   - Add some error logging.
 * ti-ads7950
   - SPDX
   - Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms
     EV3 where some channels are used for power supply monitoring at a very low
     rate.
 * ti-dac5571
   - Remove an unused variable.
 * xadc
   - Drop some dead code.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAltXZAkRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FohYZQ//VAjpDBYjLzYTvTJy5bDt61fbh8KabhBf
 oxLIpwYrCeleLnpbrY7nU8shdIL7Vm755jtsHbTtQPCKSQ0RGnhLLDoqoWcmn70J
 rF9iVaSv+S2lZO+9+hv2eeqyX+kSM+74fkWRuLmDbaSZWYO4Jt9zFER1zizmPypY
 DnxLcViw1kwOLbiZKwmcaK0MqlWHRPhEEcNVKy7VGZHznbylujh8evkzzQNVWOol
 QrR2NG7V8BcLTflmsYCErQDvgciGjscnVZUAyY3yNLIpceGCSHZfUsE8ld6iPrS+
 aPeuiIxDhHAKyoOTQwsGi9ex7KEOUOkoDHhKdR3Jr74mtfcPF5B+TxgXU0p5UZ9g
 GummuvSX0izYjUZ9P4keVgu3W4bvmR9Kd8oJUHNByWI1iecoXP9bQf33tEyb26R6
 G1zvGSDXPNK1V7OEaGvzGkgxOY0ZAIWLRX/+wasErdJnt3lmOV9+cCSkJAFSNrk3
 jQ922q2ZWLfYAL6nNIAx2dIiJirxTQ2JIq/bys2BHiYvkuvqNcKoBIDAGlQ4xBKm
 /c5z9Dm/DxQpdlKFQugHmc5awLEZxpq2LCTBLlgM8z6+uRWXui+slPfIrfX5RWun
 BHaLmPNm6tKQLadjwWCoxXYjKqgK0wm35Yq5d5He7d45d3QWKvtUgZAj33pcIgTE
 wKmwF5oaLiU=
 =T+hS
 -----END PGP SIGNATURE-----

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

Jonathan writes:

Second set of IIO new device support, features and cleanups.

There are also a couple of fixes that can wait for the coming merge
window.

Core new features

* Support for phase channels (used in time of flight sensors amongst
  other things)
* Support for deep UV light channel modifier.

New Device Support

* AD4758 DAC
  - New driver and dt bindings.
* adxl345
  - Support the adxl375 +-200g part which is register compatible.
* isl29501 Time of flight sensor.
  - New driver
* meson-saradc
  - Support the Meson8m2 Socs - right now this is just an ID, but there will
    be additional difference in future.
* mpu6050
  - New ID for 6515 variant.
* si1133 UV sensor.
  - New driver
* Spreadtrum SC27xx PMIC ADC
  - New driver and dt bindings.

Features

* adxl345
  - Add calibration offset readback and writing.
  - Add sampling frequency control.

Fixes and Cleanups

* ad5933
  - Use a macro for the channel definition to reduce duplication.
* ad9523
  - Replace use of core mlock with a local lock. Part of ongoing efforts
    to avoid confusing the purpose of mlock which is only about iio core
    state changes.
  - Fix displayed phase which was out by a factor of 10.
* adxl345
  - Add a link to the datasheet.
  - Rework the use of the address field in the chan_spec structures to
    allow addition of more per channel information.
* adis imu
  - Mark switch fall throughs.
* at91-sama5d2
  - Fix some casting on big endian systems.
* bmp280
  - Drop some DT elements that aren't used and should mostly be done from
    userspace rather than in DT.
* hx711
  - add clock-frequency dt binding and resulting delay to deal with capacitance
    issue on some boards.
  - fix a spurious unit-address in the example.
* ina2xx
  - Avoid a possible kthread_stop with a stale task_struct.
* ltc2632
  - Remove some unused local variables (assigned but value never used).
* max1363
  - Use device_get_match_data to remove some boilerplate.
* mma8452
  - Mark switch fall throughs.
* sca3000
  - Fix a missing return in a switch statement (a bad fallthrough
    previously!)
* sigma-delta-modulator
  - Drop incorrect unit address from the DT example.
* st_accel
  - Use device_get_match_data to drop some boiler plate.
  - Move to probe_new for i2c driver as second parameter not used.
* st_sensors library
  - Use a strlcpy (safe in this case).
* st_lsm6dsx
  - Add some error logging.
* ti-ads7950
  - SPDX
  - Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms
    EV3 where some channels are used for power supply monitoring at a very low
    rate.
* ti-dac5571
  - Remove an unused variable.
* xadc
  - Drop some dead code.
2018-07-25 10:12:07 +02:00
Gustavo A. R. Silva c5b974bee9 iio: sca3000: Fix missing return in switch
The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a
return and will fall through to the default case and errorenously
return -EINVAL.

Fix this by adding in missing *return ret*.

Fixes: 626f971b5b ("staging:iio:accel:sca3000 Add write support to the low pass filter control")
Reported-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-24 18:17:18 +01:00