Gao Xiang [Wed, 27 Feb 2019 05:33:31 +0000 (13:33 +0800)]
staging: erofs: fix illegal address access under memory pressure
Considering a read request with two decompressed file pages,
If a decompression work cannot be started on the previous page
due to memory pressure but in-memory LTP map lookup is done,
builder->work should be still NULL.
Moreover, if the current page also belongs to the same map,
it won't try to start the decompression work again and then
run into trouble.
This patch aims to solve the above issue only with little changes
as much as possible in order to make the fix backport easier.
kernel message is:
<4>[
1051408.015930s]SLUB: Unable to allocate memory on node -1, gfp=0x2408040(GFP_NOFS|__GFP_ZERO)
<4>[
1051408.015930s] cache: erofs_compress, object size: 144, buffer size: 144, default order: 0, min order: 0
<4>[
1051408.015930s] node 0: slabs: 98, objs: 2744, free: 0
* Cannot allocate the decompression work
<3>[
1051408.015960s]erofs: z_erofs_vle_normalaccess_readpages, readahead error at page 1008 of nid
5391488
* Note that the previous page was failed to read
<0>[
1051408.015960s]Internal error: Accessing user space memory outside uaccess.h routines:
96000005 [#1] PREEMPT SMP
...
<4>[
1051408.015991s]Hardware name: kirin710 (DT)
...
<4>[
1051408.016021s]PC is at z_erofs_vle_work_add_page+0xa0/0x17c
<4>[
1051408.016021s]LR is at z_erofs_do_read_page+0x12c/0xcf0
...
<4>[
1051408.018096s][<
ffffff80c6fb0fd4>] z_erofs_vle_work_add_page+0xa0/0x17c
<4>[
1051408.018096s][<
ffffff80c6fb3814>] z_erofs_vle_normalaccess_readpages+0x1a0/0x37c
<4>[
1051408.018096s][<
ffffff80c6d670b8>] read_pages+0x70/0x190
<4>[
1051408.018127s][<
ffffff80c6d6736c>] __do_page_cache_readahead+0x194/0x1a8
<4>[
1051408.018127s][<
ffffff80c6d59318>] filemap_fault+0x398/0x684
<4>[
1051408.018127s][<
ffffff80c6d8a9e0>] __do_fault+0x8c/0x138
<4>[
1051408.018127s][<
ffffff80c6d8f90c>] handle_pte_fault+0x730/0xb7c
<4>[
1051408.018127s][<
ffffff80c6d8fe04>] __handle_mm_fault+0xac/0xf4
<4>[
1051408.018157s][<
ffffff80c6d8fec8>] handle_mm_fault+0x7c/0x118
<4>[
1051408.018157s][<
ffffff80c8c52998>] do_page_fault+0x354/0x474
<4>[
1051408.018157s][<
ffffff80c8c52af8>] do_translation_fault+0x40/0x48
<4>[
1051408.018157s][<
ffffff80c6c002f4>] do_mem_abort+0x80/0x100
<4>[
1051408.018310s]---[ end trace
9f4009a3283bd78b ]---
Fixes:
3883a79abd02 ("staging: erofs: introduce VLE decompression support")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Wed, 27 Feb 2019 05:33:30 +0000 (13:33 +0800)]
staging: erofs: compressed_pages should not be accessed again after freed
This patch resolves the following page use-after-free issue,
z_erofs_vle_unzip:
...
for (i = 0; i < nr_pages; ++i) {
...
z_erofs_onlinepage_endio(page); (1)
}
for (i = 0; i < clusterpages; ++i) {
page = compressed_pages[i];
if (page->mapping == mngda) (2)
continue;
/* recycle all individual staging pages */
(void)z_erofs_gather_if_stagingpage(page_pool, page); (3)
WRITE_ONCE(compressed_pages[i], NULL);
}
...
After (1) is executed, page is freed and could be then reused, if
compressed_pages is scanned after that, it could fall info (2) or
(3) by mistake and that could finally be in a mess.
This patch aims to solve the above issue only with little changes
as much as possible in order to make the fix backport easier.
Fixes:
3883a79abd02 ("staging: erofs: introduce VLE decompression support")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Florian Fainelli [Fri, 22 Feb 2019 22:02:14 +0000 (14:02 -0800)]
staging: fsl-dpaa2: ethsw: Add missing netdevice check
port_switchdev_event() does not check that the target network device is
actually backed by the ethsw driver, this could be problematic in a
stacked environment case.
Fixes:
44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:57 +0000 (12:50 +0100)]
staging: rtl8188eu: cleanup comparsions to NULL in rtl8188eu_xmit.c
Use !x instead of x == NULL. Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:56 +0000 (12:50 +0100)]
staging: rtl8188eu: add spaces around '*' in rtl8188e_cmd.c
Add spaces around '*' to follow kernel coding style.
Reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:55 +0000 (12:50 +0100)]
staging: rtl8188eu: remove unused function declarations
There are no definitions of odm_DIGbyRSSI_LPS(), ODM_PhyStatusQuery()
and ODM_MacStatusQuery() in the driver code. So remove the unused
declarations from the headers odm.h and odm_hwconfig.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:54 +0000 (12:50 +0100)]
staging: rtl8188eu: remove blank line between declarations
Remove unnecessary blank line between declarations.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:53 +0000 (12:50 +0100)]
staging: rtl8188eu: cleanup declarations in rtl8188e_cmd.c
Replace tabs with spaces in declarations to cleanup whitespace.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Thu, 21 Feb 2019 02:34:11 +0000 (10:34 +0800)]
staging: erofs: switch to ->iterate_shared()
After commit
6192269444eb ("introduce a parallel variant of ->iterate()"),
readdir can be done without taking exclusive inode lock of course.
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 21 Feb 2019 11:50:52 +0000 (12:50 +0100)]
staging: rtl8188eu: remove unnecessary parentheses in rtl8188e_cmd.c
Remove unnecessary parentheses reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Thu, 21 Feb 2019 02:34:10 +0000 (10:34 +0800)]
staging: erofs: no need to take page lock in readdir
VFS will take inode_lock for readdir, therefore no need to
take page lock in readdir at all just as the majority of
other generic filesystems.
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Samuel Thibault [Sat, 23 Feb 2019 19:42:19 +0000 (20:42 +0100)]
staging: speakup: Note that simple_strtoul can't simply be replaced by kstrtoul
We often receive patches which erroneously try to use kstrtoul in these
places.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 25 Feb 2019 15:06:11 +0000 (15:06 +0000)]
staging: comedi: ni_tio: Allocate shadow regs for each counter chip
The "ni_tio" module contains code to allocate, destroy and operate on a
`struct ni_gpct_device`, which represents a number of counters spread
over one or more blocks (or "chips"). `struct ni_gpct_device` includes
an array member `regs` holding shadow copies of register values.
Unfortunately, this is currently shared by each block of counters so
they interfere with each other. This is a problem for the "ni_660x"
module, which has 8 counters spread over 2 blocks. The `regs` storage
needs to be two-dimensional, indexed by block (chip) number and register
number. (It does not need to be three-dimensional because the registers
for individual counters are intermingled within the block.)
Change the `regs` member to an array pointer that can be indexed like a
two-dimensional array to access the shadow storage for each register in
each block. Allocate the storage in `ni_gpct_device_construct()` and
free it in `ni_gpct_device_destroy()`. (`ni_gpct_device_construct()`
can determine the number of blocks from the `num_counters` and
`counters_per_chip` parameters.)
Add new member `num_chips` to hold the number of chips. Use that to
check that `chip_index` value is in range in the same places that
check the register offset is in range.
Remove the `counters_per_chip` member of `struct ni_gpct_device` as it
is not needed anywhere and could be easily derived from the
`num_counters` and `num_chips` members if required.
Thanks to GitHub user "raabej" (real name unknown) for an initial
implementation of this in the out-of-tree fork of the Comedi drivers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tetsuo Handa [Fri, 22 Feb 2019 11:03:55 +0000 (20:03 +0900)]
staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held.
ashmem_pin() is calling range_shrink() without checking whether
range_alloc() succeeded. Also, doing memory allocation with ashmem_mutex
held should be avoided because ashmem_shrink_scan() tries to hold it.
Therefore, move memory allocation for range_alloc() to ashmem_pin_unpin()
and make range_alloc() not to fail.
This patch is mostly meant for backporting purpose for fuzz testing on
stable/distributor kernels, for there is a plan to remove this code in
near future.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable@vger.kernel.org
Reviewed-by: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bo YU [Tue, 26 Feb 2019 07:25:56 +0000 (02:25 -0500)]
staging: wilc1000: fix incorrent type assignment
Fix sparse warning:
drivers/staging/wilc1000/host_interface.c:450:30: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/host_interface.c:450:30: expected restricted __le16 [usertype] beacon_period
drivers/staging/wilc1000/host_interface.c:450:30: got unsigned short [usertype] beacon_interval
drivers/staging/wilc1000/host_interface.c:451:25: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/host_interface.c:451:25: expected restricted __le16 [usertype] cap_info
drivers/staging/wilc1000/host_interface.c:451:25: got unsigned short [usertype] capability
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:32:44 +0000 (06:02 +0530)]
Staging: greybus: Alignment should match open parenthesis
Clean checkpatch.pl issue in various files:
CHECK: Alignment should match open parenthesis
Adjust parameters to match alignment with open paranthesis
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:32:45 +0000 (06:02 +0530)]
Staging: greybus: Blank lines not required before '}'
Remove blank line to resolve checkpatch.pl issue:
CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:32:47 +0000 (06:02 +0530)]
Staging: greybus: Do not use multiple blank lines
Remove unnecessary blank line
issue found with checkpatch.pl:
CHECK: Please don't use multiple blank lines
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:15:23 +0000 (05:45 +0530)]
Staging: ks7010: Match alignments with open parenthesis
Adjust parameters of "netdev_dbg" to match alignment with
open parenthesis.
Issue found using checkpatch.pl
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Madhumitha Prabakaran [Mon, 25 Feb 2019 20:13:32 +0000 (14:13 -0600)]
Staging: vt6655: Alignment should match open parenthesis
Fix the check to improve readibility.
CHECK: Alignment should match open parenthesis
Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Mon, 25 Feb 2019 15:00:51 +0000 (20:30 +0530)]
Staging: fwserial: Add blank line after declarations
Add blank line after the structure declaration,
struct fwtty_port *port = tty->driver_data;
Issue found using checkpatch.pl
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Mon, 25 Feb 2019 16:05:11 +0000 (21:35 +0530)]
Staging: fbtft: Fix line over 80 characters
Fix the checkpatch.pl warning:
WARNING:line over 80 characters
Move Parameters to the next lines with proper alignment
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Mon, 25 Feb 2019 16:05:10 +0000 (21:35 +0530)]
Staging: fbtft: Extra blank line not required before '}'
Remove unnecesessary extra blank line before the closing brace,
to solve the checkpatch.pl check:
CHECK: Extra blank line not required before closing brace '}'
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:26:16 +0000 (05:56 +0530)]
Staging: fbtft: Alignment should match open parenthesis
Clear the warning found by checkpatch.pl
WARNING:Alignment should match open parenthesis
Adjust paremeters in fbtft_par_dbg and write_reg.
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhagyashri Dighole [Sat, 23 Feb 2019 09:51:49 +0000 (15:21 +0530)]
staging: netlogic: Remove boilerplate license text
Removes the boilerplate license text.
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhagyashri Dighole [Sat, 23 Feb 2019 09:51:08 +0000 (15:21 +0530)]
staging: netlogic: Add SPDX-License-Identifier tag at the top
Adds the SPDX GPL-2.0 or BSD-2-clause license identifier,
which solves the checkpatch.pl warnings: "WARNING: Missing
or malformed SPDX-License-Identifier tag in line 1".
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhagyashri Dighole [Fri, 22 Feb 2019 18:20:35 +0000 (23:50 +0530)]
staging: netlogic: Modify coding style alignments
Fix coding style alignment issues detected by checkpatch.pl
Match alignments with parenthesis.
Limit lines to 80 characters.
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:36:26 +0000 (06:06 +0530)]
Staging: mt761-dma: Alignment should match open parenthesis
Adjust "dev_dbg" parameters to match alignment with open parenthesis
Issue found with checkpatch.pl
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 26 Feb 2019 00:36:27 +0000 (06:06 +0530)]
Staging: mt7621_dma: Prefer unsigned int over just unsigned
Replace 'unsigned' with 'unsigned int' to be specific with data type.
Issue found with checkpatch.pl
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumit Pundir [Wed, 20 Feb 2019 12:02:08 +0000 (17:32 +0530)]
staging: octeon-usb: fix misspelled "re-enable"
Fixes misspelled "re-enable" in comment. Reported by checkpatch.pl
Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nathan Chancellor [Thu, 21 Feb 2019 05:25:24 +0000 (22:25 -0700)]
staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx
Clang warns:
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:2472:11:
warning: implicit conversion from enumeration type 'enum
halmac_cmd_process_status' to different enumeration type 'enum
halmac_ret_status' [-Wenum-conversion]
return HALMAC_CMD_PROCESS_ERROR;
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Fix this by using the proper enum for allocation failures,
HALMAC_RET_MALLOC_FAIL, which is used in the rest of this file.
Fixes:
e4b08e16b7d9 ("staging: r8822be: check kzalloc return or bail")
Link: https://github.com/ClangBuiltLinux/linux/issues/375
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Thu, 21 Feb 2019 07:34:51 +0000 (13:04 +0530)]
Staging: rtl8192e: Replace license text with SPDX identifier
- adds the SPDX GPL-2.0 license identifier which solves the checkpatch.pl warning
- Removed license boilerplate text
- Issue found with checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Sat, 16 Feb 2019 08:46:50 +0000 (16:46 +0800)]
staging: erofs: remove rcu_read_lock() in erofs_try_to_free_cached_page
page_private(page) cannot be changed if page lock is taken.
Besides, the corresponding workgroup won't be freed
if the page is already protected by page lock, therefore
no need to take rcu read lock.
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Mon, 18 Feb 2019 07:19:04 +0000 (15:19 +0800)]
staging: erofs: fix race of initializing xattrs of a inode at the same time
In real scenario, there could be several threads accessing xattrs
of the same xattr-uninitialized inode, and init_inode_xattrs()
almost at the same time.
That's actually an unexpected behavior, this patch closes the race.
Fixes:
b17500a0fdba ("staging: erofs: introduce xattr & acl support")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jann Horn [Fri, 15 Feb 2019 18:16:16 +0000 (19:16 +0100)]
staging: visornic: use skb_put_zero() instead of open-coded version
Replace an open-coded version of skb_put_zero() with a call to the helper.
This is a cleanup and is also useful for potentially adding KASAN
integration to SKBs in the future.
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 19 Feb 2019 09:25:25 +0000 (14:55 +0530)]
staging: erofs: match alignment with open parentheses
Align code with open parantheses to improve the readability.
Issue found using checkpatch.pl
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tetsuo Handa [Tue, 5 Feb 2019 10:28:40 +0000 (19:28 +0900)]
staging: android: ashmem: Don't call fallocate() with ashmem_mutex held.
syzbot is hitting lockdep warnings [1][2][3]. This patch tries to fix
the warning by eliminating ashmem_shrink_scan() => {shmem|vfs}_fallocate()
sequence.
[1] https://syzkaller.appspot.com/bug?id=
87c399f6fa6955006080b24142e2ce7680295ad4
[2] https://syzkaller.appspot.com/bug?id=
7ebea492de7521048355fc84210220e1038a7908
[3] https://syzkaller.appspot.com/bug?id=
e02419c12131c24e2a957ea050c2ab6dcbbc3270
Reported-by: syzbot <syzbot+a76129f18c89f3e2ddd4@syzkaller.appspotmail.com>
Reported-by: syzbot <syzbot+148c2885d71194f18d28@syzkaller.appspotmail.com>
Reported-by: syzbot <syzbot+4b8b031b89e6b96c4b2e@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable@vger.kernel.org
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhanusree Pola [Tue, 19 Feb 2019 06:38:48 +0000 (12:08 +0530)]
staging: mt7621-mmc: Prefer using BIT macro
Use BIT(x) instead of (1<<x), reported by checkpatch.pl.
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
YueHaibing [Tue, 19 Feb 2019 03:26:48 +0000 (11:26 +0800)]
staging: rtlwifi: Remove set but not used variables 'dataempty, hoffset'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtlwifi/efuse.c: In function 'efuse_pg_packet_write':
drivers/staging/rtlwifi/efuse.c:922:24: warning:
variable 'dataempty' set but not used [-Wunused-but-set-variable]
drivers/staging/rtlwifi/efuse.c: In function 'efuse_get_current_size':
drivers/staging/rtlwifi/efuse.c:1185:5: warning:
variable 'hoffset' set but not used [-Wunused-but-set-variable]
They're never used and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
YueHaibing [Mon, 18 Feb 2019 12:29:29 +0000 (12:29 +0000)]
staging: mt7621-mmc: Remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stephen Martin [Tue, 19 Feb 2019 00:01:55 +0000 (16:01 -0800)]
staging: rtl8188eu: fix bad indentation for conditional statement
Fixed else block indentation
Signed-off-by: Stephen Martin <lockwood@opperline.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Mon, 18 Feb 2019 18:52:01 +0000 (12:52 -0600)]
staging: vt6656: key: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/staging/vt6656/key.c: In function ‘vnt_set_keymode’:
drivers/staging/vt6656/key.c:70:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
key->hw_key_idx = entry;
~~~~~~~~~~~~~~~~^~~~~~~
drivers/staging/vt6656/key.c:71:2: note: here
case VNT_KEY_ALLGROUP:
^~~~
drivers/staging/vt6656/key.c:73:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (onfly_latch)
^
drivers/staging/vt6656/key.c:75:2: note: here
case VNT_KEY_GROUP_ADDRESS:
^~~~
drivers/staging/vt6656/key.c:76:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
key_mode |= mode;
~~~~~~~~~^~~~~~~
drivers/staging/vt6656/key.c:77:2: note: here
case VNT_KEY_GROUP:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
YueHaibing [Mon, 18 Feb 2019 15:15:43 +0000 (15:15 +0000)]
staging: rtl8192e: Remove set but not used variables 'broad_addr, stype'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_tx':
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1732:28: warning:
variable 'broad_addr' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1731:24: warning:
variable 'stype' set but not used [-Wunused-but-set-variable]
This remove unnessesary bool variable 'multi_addr, broad_addr, uni_addr'
Also 'stype' never used and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 15 Feb 2019 12:10:40 +0000 (13:10 +0100)]
staging: mt7621-pci: reverse condition to check for enabled port
Each enabled port is being checked in 'mt7621_pcie_enable_ports"
function calling 'mt7621_pcie_enable_port'. The return value for
this function on success is zero, so the check is reversed. Fix it.
Fixes:
802a2f7b2fe3: staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 12 Feb 2019 08:19:22 +0000 (09:19 +0100)]
staging: mt7621-pci: remove two register writes
There is no need to write IO and memory space window Host PCI bridge
registers before doing anything else. Just use its default values which
should be ok.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 12 Feb 2019 08:19:21 +0000 (09:19 +0100)]
staging: mt7621-pci: replace spaces with tabs in comment
To properly follow kernel style replace spaces with tabs in comment
where link status bits are explained.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 12 Feb 2019 08:19:20 +0000 (09:19 +0100)]
staging: mt7621-pci: remove not used definitions
There are two definitions which are not being used at all.
Remove them.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 12 Feb 2019 08:19:19 +0000 (09:19 +0100)]
staging: mt7621-dts: add general pcie reset line to pcie bindings
Add general pci reset line to pcie bindings to use reset_control properly
in driver code.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 12 Feb 2019 08:19:18 +0000 (09:19 +0100)]
staging: mt7621-pci: add reset control for general pcie reset
There is still a reset line which is not being handled using reset_control
properly and just being accessing writing registers. Use reset_control
instead for pcie general reset line.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Sun, 17 Feb 2019 22:20:04 +0000 (22:20 +0000)]
staging: rtlwifi: fix spelling mistake: "Hightest" -> "Highest"
Trivial fix to spelling mistake in ODM_RT_TRACE message text, fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 15 Feb 2019 06:18:38 +0000 (07:18 +0100)]
staging: mt7621-pci-phy: use 'module_init' instead of 'arch_initcall'
Init driver as 'arch_initcall()' does not work. It causes phy_create()
to be called before the phy module is initialized, so 'phy_class' is NULL,
the new phy isn't placed in the right class, and it cannot be found.
Change to 'module_init()' which works properly in this case.
Fixes:
00981d31d6df: staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci
Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 15 Feb 2019 06:18:37 +0000 (07:18 +0100)]
staging: mt7621-dts: fix pci phy register addresses
Both pci-phy0 and pci-phy1 are using bad addresses to search
for its registers. Use proper register values.
Fixes:
06184ba5a33a: staging: mt7621-dts: add pci-phy related bindings to board's device tree
Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Mc Guire [Fri, 15 Feb 2019 09:24:22 +0000 (10:24 +0100)]
staging: r8822be: check kzalloc return or bail
The kzalloc() in halmac_parse_psd_data_88xx() can fail and return NULL
so check the psd_set->data after allocation and if allocation failed
return HALMAC_CMD_PROCESS_ERROR.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes:
938a0447f094 ("staging: r8822be: Add code for halmac sub-drive")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Qing Xia [Fri, 1 Feb 2019 06:59:46 +0000 (14:59 +0800)]
staging: android: ion: fix sys heap pool's gfp_flags
In the first loop, gfp_flags will be modified to high_order_gfp_flags,
and there will be no chance to change back to low_order_gfp_flags.
Fixes:
e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc")
Signed-off-by: Qing Xia <saberlily.xia@hisilicon.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Jing Xia <jing.xia@unisoc.com>
Reviewed-by: Yuming Han <yuming.han@unisoc.com>
Reviewed-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Reviewed-by: Orson Zhai <orson.zhai@unisoc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gao Xiang [Fri, 1 Feb 2019 12:16:31 +0000 (20:16 +0800)]
staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()
As Al pointed out, "
... and while we are at it, what happens to
unsigned int nameoff = le16_to_cpu(de[mid].nameoff);
unsigned int matched = min(startprfx, endprfx);
struct qstr dname = QSTR_INIT(data + nameoff,
unlikely(mid >= ndirents - 1) ?
maxsize - nameoff :
le16_to_cpu(de[mid + 1].nameoff) - nameoff);
/* string comparison without already matched prefix */
int ret = dirnamecmp(name, &dname, &matched);
if le16_to_cpu(de[...].nameoff) is not monotonically increasing? I.e.
what's to prevent e.g. (unsigned)-1 ending up in dname.len?
Corrupted fs image shouldn't oops the kernel.. "
Revisit the related lookup flow to address the issue.
Fixes:
d72d1ce60174 ("staging: erofs: add namei functions")
Cc: <stable@vger.kernel.org> # 4.19+
Suggested-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Wed, 13 Feb 2019 21:39:27 +0000 (03:09 +0530)]
staging: rtl8192e: rename macro arguments to avoid camel case - style
Rename following macro arguments to fix checkpatch warning: Avoid
CamelCase and make the arguments more readable, understandable.
__pIeeeDev -> __ieee_dev
__pTa -> __address
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hyun Kwon [Thu, 14 Feb 2019 00:01:46 +0000 (16:01 -0800)]
staging: android: ion: Add the GPL exception for syscalls
Add "WITH Linux-syscall-note" to the license to not put GPL
restrictions on user space programs using this header.
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sheng Yong [Thu, 14 Feb 2019 06:46:36 +0000 (14:46 +0800)]
staging: erofs: fix memleak of inode's shared xattr array
If it fails to read a shared xattr page, the inode's shared xattr array
is not freed. The next time the inode's xattr is accessed, the previously
allocated array is leaked.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Fixes:
b17500a0fdba ("staging: erofs: introduce xattr & acl support")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Tue, 12 Feb 2019 20:17:11 +0000 (01:47 +0530)]
staging: rtl8192e: rename function cpMacAddr to copy_mac_addr - style
Rename function cpMacAddr to copy_mac_addr in order to fix checkpatch
warning: Avoid CamelCase and make the function name more readable,
understandable.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Tue, 12 Feb 2019 18:44:50 +0000 (12:44 -0600)]
staging: comedi: ni_660x: fix missing break in switch statement
Add missing break statement in order to prevent the code from falling
through to the default case and return -EINVAL every time.
This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.
Fixes:
aa94f2888825 ("staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 13 Feb 2019 07:24:50 +0000 (08:24 +0100)]
Merge tag 'iio-for-5.1b' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of new device support, features and cleanup for IIO in the 5.1 cycle.
There are a few late breaking fixes in here that weren't worth trying to
rush into 5.0 as they have been with us for quite a while.
New device support
* ad7476
- add support for TI ADS786X parts that are compatible with this Analog
Devices driver. Good to see some simple devices are so similar.
* Ingenic jz47xx SoC ADCs
- new driver and bindings
* Plantower PMS7003 partical sensor
- new driver and bindings including vendor prefix.
* TI
DAC7612
- new driver and bindings for this dual DAC.
New features
* ad7768-1
- Sampling frequency control
* bmi160
- Data ready trigger support, including open-drain dt binding.
Cleanup / minor fixes.
* Analog Device DACs
- Fix some inconsistent licenses. These are only ones where there were
two different license marked in the same file, and hence were previously
unclear.
* ads124s08
- Spelling fix.
* adxl345
- Parameter alignement tidy up.
* bmi160
- SPDX
- correct a note on the types of supported interrupts which was too strict.
- use iio_pollfunc_store_time to grab an earlier timestamp.
- use if (ret) instead of if (ret < 0) to be consistent whilst simplifying
some handling where ret was effectively getting written to 0 even though
it was always already 0.
* exynos_adc
- Fix a null pointer dereference on unbind.
- Fix number of channels on Exynos4x12 devices to be 4 rather than 8.
* lpc32xx-adc
- Move DT bindings doc out of staging. Oops, I missed this one when
moving the driver.
- SPDX.
* npcm-adc
- drop documentation of reset node as going to be done differently.
It's a new driver this cycle so no need to support the previous
binding going forwards.
* sps30
- Fix an issue with a loop timeout test that meant it would never identify
a timeout.
- Mark deliberate switch fall throughs.
* tag 'iio-for-5.1b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (26 commits)
iio: adc: exynos-adc: Use proper number of channels for Exynos4x12
dt-binding: iio: remove rst node from NPCM ADC document
dt-bindings: iio: chemical: pms7003: add device tree support
dt-bindings: add Plantower to the vendor prefixes
iio: chemical: add support for Plantower PMS7003 sensor
iio:chemical:sps30 Supress some switch fallthrough warnings.
iio:adc:lpc32xx use SPDX-License-Identifier
dt-bindings: iio: adc: move lpc32xx-adc out of staging
iio: adc: ads124s08: fix spelling mistake "converions" -> "conversions"
iio: adc: exynos-adc: Fix NULL pointer exception on unbind
iio: chemical: sps30: fix a loop timeout test
iio:accel:adxl345: Change alignment to match paranthesis
iio:dac:
dac7612: device tree bindings
iio:dac:ti-
dac7612: Add driver for Texas Instruments
DAC7612
iio: adc: ad7476: Add support for TI ADS786X ADCs
iio: adc: ad7768-1: Add support for setting the sampling frequency
drivers: iio: dac: Fix wrong license for ADI drivers
IIO: add Ingenic JZ47xx ADC driver.
dt-bindings: iio/adc: Add bindings for Ingenic JZ47xx SoCs ADC.
dt-bindings: iio/adc: Add docs for Ingenic JZ47xx SoCs ADC.
...
Krzysztof Kozlowski [Tue, 12 Feb 2019 17:45:49 +0000 (18:45 +0100)]
iio: adc: exynos-adc: Use proper number of channels for Exynos4x12
Exynos4212 and Exynos4412 have only four ADC channels so using
"samsung,exynos-adc-v1" compatible (for eight channels ADCv1) on them is
wrong. Add a new compatible for Exynos4x12.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Chengguang Xu [Tue, 12 Feb 2019 03:24:23 +0000 (11:24 +0800)]
staging: erofs: remove redundant unlikely annotation in unzip_vle.c
unlikely has already included in IS_ERR(),
so just remove it.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chengguang Xu [Tue, 12 Feb 2019 03:24:22 +0000 (11:24 +0800)]
staging: erofs: remove redundant likely/unlikely annotation in namei.c
unlikely has already included in IS_ERR(),
so just remove redundant likely/unlikely
annotation.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tomer Maimon [Sun, 10 Feb 2019 20:47:49 +0000 (22:47 +0200)]
dt-binding: iio: remove rst node from NPCM ADC document
Remove NPCM7xx rst node for preparing the NPCM ADC
document to describe ADC reset binding.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tomasz Duszynski [Sat, 9 Feb 2019 17:36:09 +0000 (18:36 +0100)]
dt-bindings: iio: chemical: pms7003: add device tree support
Add device tree support for Plantower PMS7003 particulate matter sensor.
Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tomasz Duszynski [Sat, 9 Feb 2019 17:36:08 +0000 (18:36 +0100)]
dt-bindings: add Plantower to the vendor prefixes
Add Plantower to the vendor prefixes.
Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tomasz Duszynski [Sat, 9 Feb 2019 17:36:07 +0000 (18:36 +0100)]
iio: chemical: add support for Plantower PMS7003 sensor
Add support for Plantower PMS7003 particulate matter sensor.
Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Jonathan Cameron [Sat, 9 Feb 2019 19:32:58 +0000 (19:32 +0000)]
iio:chemical:sps30 Supress some switch fallthrough warnings.
Fixes warnings reported on linux-next but marking one path
and adding an explicit return in the other.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andreas Brauchli <a.brauchli@elementarea.net>
Acked-by: Tomasz Duszynski <tduszyns@gmail.com>
Sergio Paracuellos [Sun, 10 Feb 2019 14:35:58 +0000 (15:35 +0100)]
staging: mt7621-pci: update driver's TODO file
Some of the things included in driver's TODO file have
been properly achieved. Update file accordly.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guilherme Tadashi Maeoka [Sat, 9 Feb 2019 17:17:18 +0000 (15:17 -0200)]
Staging: mt7621-pci: Fix space required coding style
Fix some space required coding style.
Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:18 +0000 (14:13 +0530)]
staging: rtl8192e: rename parameters of function dot11d_update_country - style
Rename following parameters of function dot11d_update_country to fix
checkpatch warning: Avoid CamelCase and make the parameter names more
readable, understandable.
pTaddr -> address
CoutryIeLen -> country_len
pCoutryIe -> country
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:17 +0000 (14:13 +0530)]
staging: rtl8192e: rename local variables of function dot11d_update_country - style
Rename following local variables of function dot11d_update_country to
fix checkpatch warning: Avoid CamelCase and make the variable names more
readable, understandable.
NumTriples -> number_of_triples
MaxChnlNum -> max_channel_number
pTriple -> triple
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:16 +0000 (14:13 +0530)]
staging: rtl8192e: rename function DOT11D_ScanComplete to dot11d_scan_complete - style
Rename function DOT11D_ScanComplete to dot11d_scan_complete to fix
checkpatch warning: Avoid CamelCase.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:15 +0000 (14:13 +0530)]
staging: rtl8192e: rename function Dot11d_UpdateCountryIe to dot11d_update_country - style
Rename function Dot11d_UpdateCountryIe to dot11d_update_country to fix
checkpatch warning: Avoid CamelCase.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:14 +0000 (14:13 +0530)]
staging: rtl8192e: rename function Dot11d_Reset to dot11d_reset - style
Rename function Dot11d_Reset to dot11d_reset to fix checkpatch warning:
Avoid CamelCase.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himadri Pandya [Sun, 10 Feb 2019 08:43:13 +0000 (14:13 +0530)]
staging: rtl8192e: rename function Dot11d_Channelmap to dot11d_channel_map - style
Rename function Dot11d_Channelmap to dot11d_channel_map to fix
checkpatch warning: Avoid CamelCase.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 11 Feb 2019 08:25:01 +0000 (09:25 +0100)]
Merge 5.0-rc6 into staging-next
We need the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 10 Feb 2019 22:42:20 +0000 (14:42 -0800)]
Linux 5.0-rc6
Linus Torvalds [Sun, 10 Feb 2019 18:39:37 +0000 (10:39 -0800)]
Merge tag 'dmaengine-fix-5.0-rc6' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fixes from Vinod Koul:
- Fix in at_xdmac fr wrongful channel state
- Fix for imx driver for wrong callback invocation
- Fix to bcm driver for interrupt race & transaction abort.
- Fix in dmatest to abort in mapping error
* tag 'dmaengine-fix-5.0-rc6' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: dmatest: Abort test in case of mapping error
dmaengine: bcm2835: Fix abort of transactions
dmaengine: bcm2835: Fix interrupt race on RT
dmaengine: imx-dma: fix wrong callback invoke
dmaengine: at_xdmac: Fix wrongfull report of a channel as in use
Linus Torvalds [Sun, 10 Feb 2019 17:57:42 +0000 (09:57 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"A handful of fixes:
- Fix an MCE corner case bug/crash found via MCE injection testing
- Fix 5-level paging boot crash
- Fix MCE recovery cache invalidation bug
- Fix regression on Xen guests caused by a recent PMD level mremap
speedup optimization"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Make set_pmd_at() paravirt aware
x86/mm/cpa: Fix set_mce_nospec()
x86/boot/compressed/64: Do not corrupt EDX on EFER.LME=1 setting
x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()
Linus Torvalds [Sun, 10 Feb 2019 17:54:19 +0000 (09:54 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull irq fixes from Ingo Molnar:
"irqchip driver fixes: most of them are race fixes for ARM GIC (General
Interrupt Controller) variants, but also a fix for the ARM MMP
(Marvell PXA168 et al) irqchip affecting OLPC keyboards"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3-its: Fix ITT_entry_size accessor
irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
irqchip/gic-v3-its: Gracefully fail on LPI exhaustion
irqchip/gic-v3-its: Plug allocation race for devices sharing a DevID
irqchip/gic-v4: Fix occasional VLPI drop
Linus Torvalds [Sun, 10 Feb 2019 17:48:18 +0000 (09:48 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"A couple of kernel side fixes:
- Fix the Intel uncore driver on certain hardware configurations
- Fix a CPU hotplug related memory allocation bug
- Remove a spurious WARN()
... plus also a handful of perf tooling fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf script python: Add Python3 support to tests/attr.py
perf trace: Support multiple "vfs_getname" probes
perf symbols: Filter out hidden symbols from labels
perf symbols: Add fallback definitions for GELF_ST_VISIBILITY()
tools headers uapi: Sync linux/in.h copy from the kernel sources
perf clang: Do not use 'return std::move(something)'
perf mem/c2c: Fix perf_mem_events to support powerpc
perf tests evsel-tp-sched: Fix bitwise operator
perf/core: Don't WARN() for impossible ring-buffer sizes
perf/x86/intel: Delay memory deallocation until x86_pmu_dead_cpu()
perf/x86/intel/uncore: Add Node ID mask
Linus Torvalds [Sun, 10 Feb 2019 17:44:52 +0000 (09:44 -0800)]
Merge branch 'locking-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar:
"An rtmutex (PI-futex) deadlock scenario fix, plus a locking
documentation fix"
* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
futex: Handle early deadlock return correctly
futex: Fix barrier comment
Juergen Gross [Sun, 10 Feb 2019 07:40:56 +0000 (08:40 +0100)]
x86/mm: Make set_pmd_at() paravirt aware
set_pmd_at() calls native_set_pmd() unconditionally on x86. This was
fine as long as only huge page entries were written via set_pmd_at(),
as Xen pv guests don't support those.
Commit
2c91bd4a4e2e53 ("mm: speed up mremap by 20x on large regions")
introduced a usage of set_pmd_at() possible on pv guests, leading to
failures like:
BUG: unable to handle kernel paging request at
ffff888023e26778
#PF error: [PROT] [WRITE]
RIP: e030:move_page_tables+0x7c1/0xae0
move_vma.isra.3+0xd1/0x2d0
__se_sys_mremap+0x3c6/0x5b0
do_syscall_64+0x49/0x100
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Make set_pmd_at() paravirt aware by just letting it use set_pmd().
Fixes:
2c91bd4a4e2e53 ("mm: speed up mremap by 20x on large regions")
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com
Cc: sstabellini@kernel.org
Cc: hpa@zytor.com
Cc: bp@alien8.de
Cc: torvalds@linux-foundation.org
Link: https://lkml.kernel.org/r/20190210074056.11842-1-jgross@suse.com
Linus Torvalds [Sat, 9 Feb 2019 21:43:12 +0000 (13:43 -0800)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"One PM related driver bugfix and a MAINTAINERS update"
* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
MAINTAINERS: Update the ocores i2c bus driver maintainer, etc
i2c: omap: Use noirq system sleep pm ops to idle device for suspend
Linus Torvalds [Sat, 9 Feb 2019 20:41:14 +0000 (12:41 -0800)]
Merge tag 'mips_fixes_5.0_3' of git://git./linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton:
"A batch of MIPS fixes for 5.0, nothing too scary.
- A workaround for a Loongson 3 CPU bug is the biggest change, but
still fairly straightforward. It adds extra memory barriers (sync
instructions) around atomics to avoid a CPU bug that can break
atomicity.
- Loongson64 also sees a fix for powering off some systems which
would incorrectly reboot rather than waiting for the power down
sequence to complete.
- We have DT fixes for the Ingenic JZ4740 SoC & the JZ4780-based Ci20
board, and a DT warning fix for the Nexsys4/MIPSfpga board.
- The Cavium Octeon platform sees a further fix to the behaviour of
the pcie_disable command line argument that was introduced in v3.3.
- The VDSO, introduced in v4.4, sees build fixes for configurations
of GCC that were built using the --with-fp-32= flag to specify a
default 32-bit floating point ABI.
- get_frame_info() sees a fix for configurations with
CONFIG_KALLSYMS=n, for which it previously always returned an
error.
- If the MIPS Coherence Manager (CM) reports an error then we'll now
clear that error correctly so that the GCR_ERROR_CAUSE register
will be updated with information about any future errors"
* tag 'mips_fixes_5.0_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
mips: cm: reprime error cause
mips: loongson64: remove unreachable(), fix loongson_poweroff().
MIPS: Remove function size check in get_frame_info()
MIPS: Use lower case for addresses in nexys4ddr.dts
MIPS: Loongson: Introduce and use loongson_llsc_mb()
MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
MIPS: VDSO: Use same -m%-float cflag as the kernel proper
MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
DTS: CI20: Fix bugs in ci20's device tree.
MIPS: DTS: jz4740: Correct interrupt number of DMA core
Gregory CLEMENT [Fri, 8 Feb 2019 16:09:42 +0000 (17:09 +0100)]
iio:adc:lpc32xx use SPDX-License-Identifier
Convert the driver to SPDX license description which allow removing
several lines in the file.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gregory CLEMENT [Fri, 8 Feb 2019 16:09:40 +0000 (17:09 +0100)]
dt-bindings: iio: adc: move lpc32xx-adc out of staging
The drivers has been moved out since
0097e20e7771 ("staging:iio:adc:lpc32xx Move out of staging.") in v4.10,
so let's align the binding documentation.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Colin Ian King [Thu, 7 Feb 2019 09:39:02 +0000 (09:39 +0000)]
iio: adc: ads124s08: fix spelling mistake "converions" -> "conversions"
There is a spelling mistake in several dev_err messages. Fix these.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Krzysztof Kozlowski [Fri, 8 Feb 2019 23:39:27 +0000 (00:39 +0100)]
iio: adc: exynos-adc: Fix NULL pointer exception on unbind
Fix NULL pointer exception on device unbind when device tree does not
contain "has-touchscreen" property. In such case the input device is
not registered so it should not be unregistered.
$ echo "
12d10000.adc" > /sys/bus/platform/drivers/exynos-adc/unbind
Unable to handle kernel NULL pointer dereference at virtual address
00000474
...
(input_unregister_device) from [<
c0772060>] (exynos_adc_remove+0x20/0x80)
(exynos_adc_remove) from [<
c0587d5c>] (platform_drv_remove+0x20/0x40)
(platform_drv_remove) from [<
c05860f0>] (device_release_driver_internal+0xdc/0x1ac)
(device_release_driver_internal) from [<
c0583ecc>] (unbind_store+0x60/0xd4)
(unbind_store) from [<
c031b89c>] (kernfs_fop_write+0x100/0x1e0)
(kernfs_fop_write) from [<
c029709c>] (__vfs_write+0x2c/0x17c)
(__vfs_write) from [<
c0297374>] (vfs_write+0xa4/0x184)
(vfs_write) from [<
c0297594>] (ksys_write+0x4c/0xac)
(ksys_write) from [<
c0101000>] (ret_fast_syscall+0x0/0x28)
Fixes:
2bb8ad9b44c5 ("iio: exynos-adc: add experimental touchscreen support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dan Carpenter [Sat, 9 Feb 2019 09:03:52 +0000 (12:03 +0300)]
iio: chemical: sps30: fix a loop timeout test
The "while (tries--) {" loop is a postop so it exits with "tries" set
to -1.
Fixes:
232e0f6ddeae ("iio: chemical: add support for Sensirion SPS30 sensor")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Luciana da Costa Marques [Sat, 9 Feb 2019 12:25:42 +0000 (10:25 -0200)]
iio:accel:adxl345: Change alignment to match paranthesis
Align broken line to match upper line parenthesis. Solves the
checkpatch.pl's message:
CHECK: Alignment should match open parenthesis
Signed-off-by: Luciana da Costa Marques <lucianadacostamarques@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ricardo Ribalda Delgado [Mon, 4 Feb 2019 12:48:33 +0000 (13:48 +0100)]
iio:dac:
dac7612: device tree bindings
Bindings for
dac7612.
Cc: devicetree@vger.kernel.org
Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ricardo Ribalda Delgado [Mon, 4 Feb 2019 12:48:32 +0000 (13:48 +0100)]
iio:dac:ti-
dac7612: Add driver for Texas Instruments
DAC7612
It is a driver for Texas Instruments Dual, 12-Bit Serial Input
Digital-to-Analog Converter.
Datasheet of this chip:
http://www.ti.com/lit/ds/sbas106/sbas106.pdf
Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ricardo Ribalda Delgado [Mon, 4 Feb 2019 12:44:41 +0000 (13:44 +0100)]
iio: adc: ad7476: Add support for TI ADS786X ADCs
Add support for Texas Instruments ADS7866, ADS7867 and ADS7868
8/10/12 bit Single channel ADC.
Datasheet: http://www.ti.com/lit/ds/symlink/ads7868.pdf
Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stefan Popa [Mon, 4 Feb 2019 10:30:15 +0000 (12:30 +0200)]
iio: adc: ad7768-1: Add support for setting the sampling frequency
The AD7768-1 core ADC receives a master clock signal (MCLK). The MCLK
frequency combined with the MCLK division and the digital filter
decimation rates, determines the sampling frequency. Along with
MCLK_DIV, the power mode is also configured according to datasheet
recommendations.
From user space, available sampling frequencies can be read. However,
it is not required for an exact value to be entered, since the driver
will look for the closest available match.
When the device configuration changes (for example, if the filter
decimation rate changes), a SYNC_IN pulse is required.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stefan Popa [Mon, 4 Feb 2019 09:19:35 +0000 (11:19 +0200)]
drivers: iio: dac: Fix wrong license for ADI drivers
Analog Devices drivers are typically GPL v2 only. This patch fixes the
inconsistencies between the module license and SPDX.
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Artur Rojek [Mon, 4 Feb 2019 00:15:14 +0000 (01:15 +0100)]
IIO: add Ingenic JZ47xx ADC driver.
Add an IIO driver for the ADC hardware present on Ingenic JZ47xx SoCs.
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Linus Torvalds [Sat, 9 Feb 2019 18:26:09 +0000 (10:26 -0800)]
Merge tag 'for-linus-
20190209' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
- NVMe pull request from Christoph, fixing namespace locking when
dealing with the effects log, and a rapid add/remove issue (Keith)
- blktrace tweak, ensuring requests with -1 sectors are shown (Jan)
- link power management quirk for a Smasung SSD (Hans)
- m68k nfblock dynamic major number fix (Chengguang)
- series fixing blk-iolatency inflight counter issue (Liu)
- ensure that we clear ->private when setting up the aio kiocb (Mike)
- __find_get_block_slow() rate limit print (Tetsuo)
* tag 'for-linus-
20190209' of git://git.kernel.dk/linux-block:
blk-mq: remove duplicated definition of blk_mq_freeze_queue
Blk-iolatency: warn on negative inflight IO counter
blk-iolatency: fix IO hang due to negative inflight counter
blktrace: Show requests without sector
fs: ratelimit __find_get_block_slow() failure message.
m68k: set proper major_num when specifying module param major_num
libata: Add NOLPM quirk for SAMSUNG MZ7TE512HMHP-000L1 SSD
nvme-pci: fix rapid add remove sequence
nvme: lock NS list changes while handling command effects
aio: initialize kiocb private in case any filesystems expect it.