platform/kernel/linux-starfive.git
4 years agostaging: rts5208: Fixed checkpath warning.
Prakhar Sinha [Fri, 30 Aug 2019 12:16:56 +0000 (17:46 +0530)]
staging: rts5208: Fixed checkpath warning.

This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397.

WARNING: line over 80 characters
+                               option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;

Signed-off-by: Prakhar Sinha <prakharsinha2808@gmail.com>
Link: https://lore.kernel.org/r/20190830121656.GA2740@MeraComputer
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rts5208: remove redundant sd30_mode checks
Colin Ian King [Fri, 30 Aug 2019 08:10:47 +0000 (09:10 +0100)]
staging: rts5208: remove redundant sd30_mode checks

There are two hunks of code that check if sd30_mode is true however
an earlier check in an outer code block on sd30_mode being false means
that sd30_mode can never be true at these points so these checks are
redundant.  Remove the dead code.

Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190830081047.13630-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: remove return and error return via a goto
Colin Ian King [Mon, 2 Sep 2019 09:40:52 +0000 (10:40 +0100)]
staging: exfat: remove return and error return via a goto

The return statement is incorrect, the error exit should be by
assigning ret with the error code and exiting via label out.
Thanks to Valdis Klētnieks for correcting my original fix.

Addresses-Coverity: ("Structurally dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190902094052.28029-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: fix uninitialized variable ret
Colin Ian King [Fri, 30 Aug 2019 18:46:44 +0000 (19:46 +0100)]
staging: exfat: fix uninitialized variable ret

Currently there are error return paths in ffsReadFile that
exit via lable err_out that return and uninitialized error
return in variable ret. Fix this by initializing ret to zero.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: c48c9f7ff32b ("staging: exfat: add exfat filesystem code to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>,
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lore.kernel.org/r/20190830184644.15590-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: use BIT macro for defining sizes
Valentin Vidic [Mon, 2 Sep 2019 18:43:19 +0000 (20:43 +0200)]
staging: exfat: use BIT macro for defining sizes

Fixes checkpatch.pl warning:

  CHECK: Prefer using the BIT macro

Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Link: https://lore.kernel.org/r/20190902184319.11971-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: cleanup blank line warnings
Valentin Vidic [Mon, 2 Sep 2019 19:03:29 +0000 (21:03 +0200)]
staging: exfat: cleanup blank line warnings

Fixes checkpatch.pl warnings:

  CHECK: Please don't use multiple blank lines
  CHECK: Blank lines aren't necessary after an open brace '{'
  CHECK: Please use a blank line after function/struct/union/enum
         declarations

Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Link: https://lore.kernel.org/r/20190902190329.18685-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: make exfat depend on BLOCK
Greg Kroah-Hartman [Mon, 2 Sep 2019 17:45:06 +0000 (19:45 +0200)]
staging: exfat: make exfat depend on BLOCK

This should fix a build error in some configurations when CONFIG_BLOCK
is not selected.  Also properly set the dependancy for no FAT support at
the same time.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20190902174631.GB31445@kroah.com
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agodrivers/staging/exfat - by default, prohibit mount of fat/vfat
Valdis Klētnieks [Fri, 30 Aug 2019 16:42:39 +0000 (12:42 -0400)]
drivers/staging/exfat - by default, prohibit mount of fat/vfat

Concerns have been raised about the exfat driver accidentally mounting
fat/vfat file systems.  Add an extra configure option to help prevent that.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Link: https://lore.kernel.org/r/245727.1567183359@turing-police
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoerofs: reduntant assignment in __erofs_get_meta_page()
Gao Xiang [Thu, 29 Aug 2019 17:17:41 +0000 (01:17 +0800)]
erofs: reduntant assignment in __erofs_get_meta_page()

As Joe Perches suggested [1],
  err = bio_add_page(bio, page, PAGE_SIZE, 0);
- if (unlikely(err != PAGE_SIZE)) {
+ if (err != PAGE_SIZE) {
  err = -EFAULT;
  goto err_out;
  }

The initial assignment to err is odd as it's not
actually an error value -E<FOO> but a int size
from a unsigned int len.

Here the return is either 0 or PAGE_SIZE.

This would be more legible to me as:

if (bio_add_page(bio, page, PAGE_SIZE, 0) != PAGE_SIZE) {
err = -EFAULT;
goto err_out;
}

[1] https://lore.kernel.org/r/74c4784319b40deabfbaea92468f7e3ef44f1c96.camel@perches.com/
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190829171741.225219-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoerofs: remove all likely/unlikely annotations
Gao Xiang [Thu, 29 Aug 2019 16:38:27 +0000 (00:38 +0800)]
erofs: remove all likely/unlikely annotations

As Dan Carpenter suggested [1], I have to remove
all erofs likely/unlikely annotations.

[1] https://lore.kernel.org/linux-fsdevel/20190829154346.GK23584@kadam/
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190829163827.203274-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMAINTAINERS: fix up exfat directory location
Greg Kroah-Hartman [Fri, 30 Aug 2019 06:56:37 +0000 (08:56 +0200)]
MAINTAINERS: fix up exfat directory location

I messed up on the exfat MAINTAINER entry, the code is in
drivers/staging/exfat/ not fs/exfat/

Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Reported-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: add exfat filesystem code to staging
Valdis Klētnieks [Wed, 28 Aug 2019 16:08:17 +0000 (18:08 +0200)]
staging: exfat: add exfat filesystem code to staging

The exfat code needs a lot of work to get it into "real" shape for
the fs/ part of the kernel, so put it into drivers/staging/ for now so
that it can be worked on by everyone in the community.

The full specification of the filesystem can be found at:
  https://docs.microsoft.com/en-us/windows/win32/fileio/exfat-specification

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20190828160817.6250-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: sound: Fix error path of audio_init
YueHaibing [Tue, 27 Aug 2019 13:13:46 +0000 (21:13 +0800)]
staging: most: sound: Fix error path of audio_init

If most_register_configfs_subsys() fails, we should
call most_deregister_component() do cleanup.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 919c03ae11b9 ("staging: most: enable configfs support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190827131346.12704-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Fix indentation
Stephen Brennan [Wed, 28 Aug 2019 04:35:42 +0000 (21:35 -0700)]
staging: rtl8192u: Fix indentation

Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix
this by aligning code properly with tabs.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190828043542.3753-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: fix more header declarations
Rui Miguel Silva [Wed, 28 Aug 2019 12:48:25 +0000 (13:48 +0100)]
staging: greybus: fix more header declarations

More headers needed to be fixed when moving greybus out of staging and
enabling the COMPILE_TEST option.

Add forward declarations for the needed structures.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20190828124825.20800-1-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: add missing includes
Rui Miguel Silva [Tue, 27 Aug 2019 15:53:02 +0000 (16:53 +0100)]
staging: greybus: add missing includes

Before moving greybus core out of staging and moving header files to
include/linux some greybus header files were missing the necessary
includes. This would trigger compilation faillures with some example
errors logged bellow for with CONFIG_KERNEL_HEADER_TEST=y.

So, add the necessary headers to compile clean before relocating the
header files.

./include/linux/greybus/hd.h:23:50: error: unknown type name 'u16'
  int (*cport_disable)(struct gb_host_device *hd, u16 cport_id); ^~~
./include/linux/greybus/greybus_protocols.h:1314:2: error: unknown type name '__u8'
  __u8 data[0];
  ^~~~
./include/linux/greybus/hd.h:24:52: error: unknown type name 'u16'
  int (*cport_connected)(struct gb_host_device *hd, u16 cport_id); ^~~
./include/linux/greybus/hd.h:25:48: error: unknown type name 'u16'
  int (*cport_flush)(struct gb_host_device *hd, u16 cport_id); ^~~
./include/linux/greybus/hd.h:26:51: error: unknown type name 'u16'
  int (*cport_shutdown)(struct gb_host_device *hd, u16 cport_id, ^~~
./include/linux/greybus/hd.h:27:5: error: unknown type name 'u8'
u8 phase, unsigned int timeout);
     ^~
./include/linux/greybus/hd.h:28:50: error: unknown type name 'u16'
  int (*cport_quiesce)(struct gb_host_device *hd, u16 cport_id, ^~~
./include/linux/greybus/hd.h:29:5: error: unknown type name 'size_t'
     size_t peer_space, unsigned int timeout);
     ^~~~~~
./include/linux/greybus/hd.h:29:5: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
./include/linux/greybus/hd.h:1:1:
+#include <stddef.h>
 /* SPDX-License-Identifier: GPL-2.0 */
./include/linux/greybus/hd.h:29:5:
     size_t peer_space, unsigned int timeout);
     ^~~~~~
./include/linux/greybus/hd.h:30:48: error: unknown type name 'u16'
  int (*cport_clear)(struct gb_host_device *hd, u16 cport_id); ^~~
./include/linux/greybus/hd.h:32:49: error: unknown type name 'u16'
  int (*message_send)(struct gb_host_device *hd, u16 dest_cport_id, ^~~
./include/linux/greybus/hd.h:33:32: error: unknown type name 'gfp_t'
struct gb_message *message, gfp_t gfp_mask); ^~~~~
./include/linux/greybus/hd.h:35:55: error: unknown type name 'u16'
  int (*latency_tag_enable)(struct gb_host_device *hd, u16 cport_id);

Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Gao Xiang <hsiangkao@aol.com>
Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20190827155302.25704-1-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: move es2 to drivers/greybus/
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:29 +0000 (07:54 +0200)]
staging: greybus: move es2 to drivers/greybus/

The es2 Greybus host controller has long been stable, so move it out of
drivers/staging/ to drivers/greybus/

Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-10-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: move the greybus core to drivers/greybus
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:28 +0000 (07:54 +0200)]
staging: greybus: move the greybus core to drivers/greybus

The Greybus core code has been stable for a long time, and has been
shipping for many years in millions of phones.  With the advent of a
recent Google Summer of Code project, and a number of new devices in the
works from various companies, it is time to get the core greybus code
out of staging as it really is going to be with us for a while.

Cc: Johan Hovold <johan@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: greybus-dev@lists.linaro.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: move core include files to include/linux/greybus/
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:27 +0000 (07:54 +0200)]
staging: greybus: move core include files to include/linux/greybus/

With the goal of moving the core of the greybus code out of staging, the
include files need to be moved to include/linux/greybus.h and
include/linux/greybus/

Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: David Lin <dtwlin@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: loopback: Fix up some alignment checkpatch issues
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:26 +0000 (07:54 +0200)]
staging: greybus: loopback: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-7-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: log: Fix up some alignment checkpatch issues
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:25 +0000 (07:54 +0200)]
staging: greybus: log: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: David Lin <dtwlin@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: manifest: Fix up some alignment checkpatch issues
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:24 +0000 (07:54 +0200)]
staging: greybus: manifest: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-5-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: hd: Fix up some alignment checkpatch issues
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:23 +0000 (07:54 +0200)]
staging: greybus: hd: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: remove license "boilerplate"
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:22 +0000 (07:54 +0200)]
staging: greybus: remove license "boilerplate"

When the greybus drivers were converted to SPDX identifiers for the
license text, some license boilerplate was not removed.  Clean this up
by removing this unneeded text now.

Cc: Johan Hovold <johan@kernel.org>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Mark Greer <mgreer@animalcreekk.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: fix up SPDX comment in .h files
Greg Kroah-Hartman [Sun, 25 Aug 2019 05:54:21 +0000 (07:54 +0200)]
staging: greybus: fix up SPDX comment in .h files

When these files originally got an SPDX tag, I used // instead of /* */
for the .h files.  Fix this up to use // properly.

Cc: Johan Hovold <johan@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Alex Elder <elder@kernel.org>
Link: https://lore.kernel.org/r/20190825055429.18547-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoerofs: fix compile warnings when moving out include/trace/events/erofs.h
Gao Xiang [Mon, 26 Aug 2019 13:26:53 +0000 (21:26 +0800)]
erofs: fix compile warnings when moving out include/trace/events/erofs.h

As Stephon reported [1], many compile warnings are raised when
moving out include/trace/events/erofs.h:

In file included from include/trace/events/erofs.h:8,
                 from <command-line>:
include/trace/events/erofs.h:28:37: warning: 'struct dentry' declared inside parameter list will not be visible outside of this definition or declaration
  TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
                                     ^~~~~~
include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
  static inline void trace_##name(proto)    \
                                  ^~~~~
include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
  __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                        ^~~~~~
include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
  ^~~~~~~~~~~~~
include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
  DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                      ^~~~~~
include/trace/events/erofs.h:26:1: note: in expansion of macro 'TRACE_EVENT'
 TRACE_EVENT(erofs_lookup,
 ^~~~~~~~~~~
include/trace/events/erofs.h:28:2: note: in expansion of macro 'TP_PROTO'
  TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
  ^~~~~~~~

That makes me very confused since most original EROFS tracepoint code
was taken from f2fs, and finally I found

commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")

It seems these warnings are generated from KERNEL_HEADER_TEST feature and
ext4/f2fs tracepoint files were in blacklist.

Anyway, let's fix these issues for KERNEL_HEADER_TEST feature instead
of adding to blacklist...

[1] https://lore.kernel.org/lkml/20190826162432.11100665@canb.auug.org.au/

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20190826132653.100731-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Add or remove blank lines as required
Sumera Priyadarsini [Mon, 26 Aug 2019 18:22:27 +0000 (23:52 +0530)]
staging: rtl8192u: Add or remove blank lines as required

This patch fixes the file r8190_rtl8256.c to avoid the following
checkpatch.pl warnings:
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please use a blank line after function/struct/union/enum declarations
CHECK: Please don't use multiple blank line

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190826182227.30738-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Add or remove spaces to fix style issues
Sumera Priyadarsini [Mon, 26 Aug 2019 18:09:09 +0000 (23:39 +0530)]
staging: rtl8192u: Add or remove spaces to fix style issues

This patch fixes the file r8190_rtl8256.c to avoid the following
checkpatch.pl warnings:
CHECK: spaces preferred around that '<<' (ctx:VxV)
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: No space is necessary after a cast

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190826180909.27775-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8712: wifi: checkpatch style fix
Taihsiang Ho (tai271828) [Mon, 26 Aug 2019 05:20:18 +0000 (13:20 +0800)]
staging: rtl8712: wifi: checkpatch style fix

Remove multiple blank lines.

Signed-off-by: Taihsiang Ho (tai271828) <tai271828@gmail.com>
Link: https://lore.kernel.org/r/20190826052018.18649-1-tai271828@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most-core: Fix checkpatch warnings
Peikan Tsai [Sun, 25 Aug 2019 17:58:49 +0000 (01:58 +0800)]
staging: most-core: Fix checkpatch warnings

Hi,

This patch solves the following checkpatch.pl's messages in drivers/staging/most/core.c.

WARNING: line over 80 characters
+ return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);

CHECK: Please use a blank line after function/struct/union/enum declarations
+}
+/**

Signed-off-by: Peikan Tsai <peikantsai@gmail.com>
Link: https://lore.kernel.org/r/20190825175849.GA74586@MarkdeMacBook-Pro.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Add space around binary operators
Sumera Priyadarsini [Thu, 22 Aug 2019 19:35:35 +0000 (01:05 +0530)]
staging: rtl8192u: Add space around binary operators

This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warnings:

CHECK: spaces preferred around that '<<' (ctx:VxV)
CHECK: spaces preferred around that '-' (ctx:VxV)

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190822193535.14357-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: remove code under TO_DO_LIST
Stephen Brennan [Fri, 23 Aug 2019 16:24:10 +0000 (09:24 -0700)]
staging: rtl8192u: remove code under TO_DO_LIST

Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is
defined, compilation fails. No machinery exists to define this, and no
documenation on the in-progress feature exists. Since this code is dead,
let's delete it.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190823162410.10038-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Remove unnecessary blank lines
Sumera Priyadarsini [Thu, 22 Aug 2019 14:55:45 +0000 (20:25 +0530)]
staging: rtl8192u: Remove unnecessary blank lines

This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warning:

CHECK: Please don't use multiple blank lines

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190822145545.19894-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: remove redundant assignment to pointer crypt
Colin Ian King [Thu, 22 Aug 2019 08:46:09 +0000 (09:46 +0100)]
staging: rtl8192u: remove redundant assignment to pointer crypt

The pointer crypt is being set with a value that is never read,
the assignment is redundant and hence can be removed.

Thanks to Dan Carpenter for sanity checking that this was indeed
redundant.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190822084609.8971-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: os_dep: Drop condition with no effect
Saurav Girepunje [Wed, 21 Aug 2019 18:16:34 +0000 (23:46 +0530)]
staging: rtl8723bs: os_dep: Drop condition with no effect

As the "else if" and "else" branch body are identical the condition
has no effect. So drop the "else if" condition.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20190821181631.GA11082@saurav
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: hal: Drop condition with no effect
Saurav Girepunje [Wed, 21 Aug 2019 18:02:01 +0000 (23:32 +0530)]
staging: rtl8723bs: hal: Drop condition with no effect

As the "else if" and "else" branch body are identical the condition
has no effect. So drop the else if condition.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20190821180153.GA10678@saurav
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: os_dep: Remove unused declarations
Hariprasad Kelam [Wed, 21 Aug 2019 17:01:10 +0000 (22:31 +0530)]
staging: rtl8723bs: os_dep: Remove unused declarations

Remove unused Macro declarations

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Link: https://lore.kernel.org/r/1566406901-6700-1-git-send-email-hariprasad.kelam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoerofs: move erofs out of staging
Gao Xiang [Thu, 22 Aug 2019 21:36:59 +0000 (05:36 +0800)]
erofs: move erofs out of staging

EROFS filesystem has been merged into linux-staging for a year.

EROFS is designed to be a better solution of saving extra storage
space with guaranteed end-to-end performance for read-only files
with the help of reduced metadata, fixed-sized output compression
and decompression inplace technologies.

In the past year, EROFS was greatly improved by many people as
a staging driver, self-tested, betaed by a large number of our
internal users, successfully applied to almost all in-service
HUAWEI smartphones as the part of EMUI 9.1 and proven to be stable
enough to be moved out of staging.

EROFS is a self-contained filesystem driver. Although there are
still some TODOs to be more generic, we have a dedicated team
actively keeping on working on EROFS in order to make it better
with the evolution of Linux kernel as the other in-kernel filesystems.

As Pavel suggested, it's better to do as one commit since git
can do moves and all histories will be saved in this way.

Let's promote it from staging and enhance it more actively as
a "real" part of kernel for more wider scenarios!

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Pavel Machek <pavel@denx.de>
Cc: David Sterba <dsterba@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Darrick J . Wong <darrick.wong@oracle.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Richard Weinberger <richard@nod.at>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Chao Yu <yuchao0@huawei.com>
Cc: Miao Xie <miaoxie@huawei.com>
Cc: Li Guifu <bluce.liguifu@huawei.com>
Cc: Fang Wei <fangwei1@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190822213659.5501-1-hsiangkao@aol.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: fix spacing in ieee80211
Stephen Brennan [Wed, 21 Aug 2019 14:35:40 +0000 (07:35 -0700)]
staging: rtl8192u: fix spacing in ieee80211

Checkpatch emits several errors, warnings, and checks about spacing.
Apply checkpatch's suggested spacing rules.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-4-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: fix macro alignment in ieee80211
Stephen Brennan [Wed, 21 Aug 2019 14:35:39 +0000 (07:35 -0700)]
staging: rtl8192u: fix macro alignment in ieee80211

Several macros display unaligned, due to mixes of tabs and spaces. These
can be fixed by making spacing consistent, do this.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-3-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: fix OPEN_BRACE errors in ieee80211
Stephen Brennan [Wed, 21 Aug 2019 14:35:38 +0000 (07:35 -0700)]
staging: rtl8192u: fix OPEN_BRACE errors in ieee80211

Checkpatch emits several errors regarding braces being on the incorrect
line. These can be fixed by moving the brace, do this. In a few cases,
some comments were moved to facilitate this.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-2-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192e: remove set but not used variable 'data_len'
YueHaibing [Wed, 21 Aug 2019 12:28:02 +0000 (20:28 +0800)]
staging: rtl8192e: remove set but not used variable 'data_len'

Fixes gcc '-Wunused-but-set-variable' warning:

 In function ieee80211_ccmp_encrypt:
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6:
 warning: variable data_len set but not used [-Wunused-but-set-variable]

It is not used since commit 5ee5265674ce ("staging:
rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190821122802.44028-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192e: remove two set but not used variables
YueHaibing [Wed, 21 Aug 2019 12:25:56 +0000 (20:25 +0800)]
staging: rtl8192e: remove two set but not used variables

Fixes gcc '-Wunused-but-set-variable' warning:

 In function '_rtl92e_dm_tx_power_tracking_callback_tssi':
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:621:7:
 warning: variable 'bHighpowerstate' set but not used [-Wunused-but-set-variable]
 In function '_rtl92e_dm_rx_path_sel_byrssi':
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c:1904:32:
 warning: variable 'cck_rx_ver2_min_index' set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190821122556.37636-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: ieee80211: remove set but not used variable 'data_len'
YueHaibing [Wed, 21 Aug 2019 12:22:50 +0000 (20:22 +0800)]
staging: rtl8192u: ieee80211: remove set but not used variable 'data_len'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:
 In function ieee80211_ccmp_encrypt:
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6:
 warning: variable data_len set but not used [-Wunused-but-set-variable]

It is not used since commit eb0e7bf3ca94 ("staging:
rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190821122250.71404-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: detect potential multiref due to corrupted images
Gao Xiang [Wed, 21 Aug 2019 14:01:52 +0000 (22:01 +0800)]
staging: erofs: detect potential multiref due to corrupted images

As reported by erofs-utils fuzzer, currently, multiref
(ondisk deduplication) hasn't been supported for now,
we should forbid it properly.

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>
Link: https://lore.kernel.org/r/20190821140152.229648-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rts5208: remove redundant assignment to retval
Colin Ian King [Sun, 18 Aug 2019 18:46:49 +0000 (19:46 +0100)]
staging: rts5208: remove redundant assignment to retval

Variable retval is initialized to a value that is never read and it
is re-assigned later. The initialization is redundant and can be
removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190818184649.13828-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: kpc2000: kpc2000_i2c: Fix different address spaces warnings
Eduardo Barretto [Sun, 18 Aug 2019 18:35:55 +0000 (15:35 -0300)]
staging: kpc2000: kpc2000_i2c: Fix different address spaces warnings

This patch fixes the following sparse warnings:

kpc2000_i2c.c:137: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:137:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:137:    got void *
kpc2000_i2c.c:146: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:146:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:146:    got void *
kpc2000_i2c.c:147: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:147:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:147:    got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:166:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166:    got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:166:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166:    got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:168:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168:    got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:168:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168:    got void *
kpc2000_i2c.c:171: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:171:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:171:    got void *
kpc2000_i2c.c:174: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:174:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:174:    got void *
kpc2000_i2c.c:193: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:193:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:193:    got void *
kpc2000_i2c.c:194: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:194:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:194:    got void *
kpc2000_i2c.c:214: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:214:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:214:    got void *
kpc2000_i2c.c:219: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:219:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:219:    got void *
kpc2000_i2c.c:226: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:226:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:226:    got void *
kpc2000_i2c.c:238: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:238:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:238:    got void *
kpc2000_i2c.c:244: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:244:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:244:    got void *
kpc2000_i2c.c:252: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:252:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:252:    got void *
kpc2000_i2c.c:257: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:257:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:257:    got void *
kpc2000_i2c.c:259: warning: incorrect type in argument 2
   (different address spaces)
kpc2000_i2c.c:259:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:259:    got void *
kpc2000_i2c.c:267: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:267:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:267:    got void *
kpc2000_i2c.c:273: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:273:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:273:    got void *
kpc2000_i2c.c:293: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:293:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:293:    got void *
kpc2000_i2c.c:294: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:294:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:294:    got void *
kpc2000_i2c.c:309: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:309:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:309:    got void *
kpc2000_i2c.c:312: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:312:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:312:    got void *
kpc2000_i2c.c:317: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:317:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:317:    got void *
kpc2000_i2c.c:324: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:324:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:324:    got void *
kpc2000_i2c.c:328: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:328:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:328:    got void *
kpc2000_i2c.c:329: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:329:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:329:    got void *
kpc2000_i2c.c:330: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:330:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:330:    got void *
kpc2000_i2c.c:338: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:338:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:338:    got void *
kpc2000_i2c.c:340: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:340:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:340:    got void *
kpc2000_i2c.c:342: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:342:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:342:    got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:350:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350:    got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:350:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350:    got void *
kpc2000_i2c.c:351: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:351:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:351:    got void *
kpc2000_i2c.c:414: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:414:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:414:    got void *
kpc2000_i2c.c:420: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:420:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:420:    got void *
kpc2000_i2c.c:422: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:422:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:422:    got void *
kpc2000_i2c.c:427: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:427:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:427:    got void *
kpc2000_i2c.c:428: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:428:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:428:    got void *
kpc2000_i2c.c:430: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:430:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:430:    got void *
kpc2000_i2c.c:435: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:435:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:435:    got void *
kpc2000_i2c.c:436: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:436:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:436:    got void *
kpc2000_i2c.c:438: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:438:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:438:    got void *
kpc2000_i2c.c:439: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:439:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:439:    got void *
kpc2000_i2c.c:445: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:445:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:445:    got void *
kpc2000_i2c.c:446: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:446:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:446:    got void *
kpc2000_i2c.c:454: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:454:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:454:    got void *
kpc2000_i2c.c:459: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:459:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:459:    got void *
kpc2000_i2c.c:461: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:461:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:461:    got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:472:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472:    got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:472:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472:    got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:475:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475:    got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:475:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475:    got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:493:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493:    got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:493:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493:    got void *
kpc2000_i2c.c:512: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:512:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:512:    got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:516:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516:    got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:516:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516:    got void *

Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com>
Link: https://lore.kernel.org/r/20190818183555.7167-1-edusbarretto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: android: Remove ion device tree bindings from the TODO
Donald Yandt [Sun, 18 Aug 2019 15:20:23 +0000 (11:20 -0400)]
staging: android: Remove ion device tree bindings from the TODO

Commit 23a4388f24f5 ("staging: android: ion: Remove file ion_chunk_heap.c")
and eadbf7a34e44 ("staging: android: ion: Remove file ion_carveout_heap.c")
removed the chunk and carveout heaps from ion but left behind the device
tree bindings for them in the TODO, this patch removes it.

Signed-off-by: Donald Yandt <donald.yandt@gmail.com>
Link: https://lore.kernel.org/r/20190818152023.891-1-donald.yandt@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8712: Improve naming of include hearder guards
Christophe JAILLET [Sun, 18 Aug 2019 15:06:09 +0000 (17:06 +0200)]
staging: rtl8712: Improve naming of include hearder guards

Choose a better name for the include hearder guard used in rtl871x_io.h.
'_IO_H_' is to generic and does not match the comment after the #endif.
Use '_RTL871X_IO_H_' instead.

Also make the comments in the #endif /* XXX */ match the name used in
#ifndef.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20190818150609.3376-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: avoid loop in submit chains
Gao Xiang [Wed, 21 Aug 2019 03:09:08 +0000 (11:09 +0800)]
staging: erofs: avoid loop in submit chains

As reported by erofs-utils fuzzer, 2 conditions
can happen in corrupted images, which can cause
unexpected behaviors.
 - access the same pcluster one more time;
 - access the tail end pcluster again, e.g.
            _ access again (will trigger tail merging)
           |
     1 2 3 1 2             ->   1 2 3 1
     |_ tail end of the chain    \___/ (unexpected behavior)
Let's detect and avoid them now.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190821030908.40282-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: core: Remove unneeded declaration WFD_OUI
Hariprasad Kelam [Mon, 19 Aug 2019 16:57:05 +0000 (22:27 +0530)]
staging: rtl8723bs: core: Remove unneeded declaration WFD_OUI

Remove unneeded declaration "extern unsigned char WFD_OUI"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Link: https://lore.kernel.org/r/20190819165705.GA5782@hari-Inspiron-1545
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: ni_mio_common: Fix a typo in ni_mio_common.c
Masanari Iida [Tue, 20 Aug 2019 15:33:56 +0000 (00:33 +0900)]
staging: comedi: ni_mio_common: Fix a typo in ni_mio_common.c

This patch fix a spelling typo in ni_mio_common.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Link: https://lore.kernel.org/r/20190820153356.25189-1-standby24x7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: avoid endless loop of invalid lookback distance 0
Gao Xiang [Mon, 19 Aug 2019 10:34:26 +0000 (18:34 +0800)]
staging: erofs: avoid endless loop of invalid lookback distance 0

As reported by erofs-utils fuzzer, Lookback distance should
be a positive number, so it should be actually looked back
rather than spinning.

Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20190819103426.87579-7-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: add two missing erofs_workgroup_put for corrupted images
Gao Xiang [Mon, 19 Aug 2019 10:34:23 +0000 (18:34 +0800)]
staging: erofs: add two missing erofs_workgroup_put for corrupted images

As reported by erofs-utils fuzzer, these error handling
path will be entered to handle corrupted images.

Lack of erofs_workgroup_puts will cause unmounting
unsuccessfully.

Fix these return values to EFSCORRUPTED as well.

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>
Link: https://lore.kernel.org/r/20190819103426.87579-4-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails
Gao Xiang [Mon, 19 Aug 2019 10:34:22 +0000 (18:34 +0800)]
staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails

As reported by erofs-utils fuzzer, unsupported compressed
clustersize will make fill_inode_lazy fail, for such case
we cannot set EROFS_V_Z_INITED_BIT since we need return
failure for each z_erofs_map_blocks_iter().

Fixes: 152a333a5895 ("staging: erofs: add compacted compression indexes support")
Cc: <stable@vger.kernel.org> # 5.3+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20190819103426.87579-3-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: some compressed cluster should be submitted for corrupted images
Gao Xiang [Mon, 19 Aug 2019 10:34:21 +0000 (18:34 +0800)]
staging: erofs: some compressed cluster should be submitted for corrupted images

As reported by erofs_utils fuzzer, a logical page can belong
to at most 2 compressed clusters, if one compressed cluster
is corrupted, but the other has been ready in submitting chain.

The chain needs to submit anyway in order to keep the page
working properly (page unlocked with PG_error set, PG_uptodate
not set).

Let's fix it now.

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>
Link: https://lore.kernel.org/r/20190819103426.87579-2-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: fix an error handling in erofs_readdir()
Gao Xiang [Sun, 18 Aug 2019 12:54:57 +0000 (20:54 +0800)]
staging: erofs: fix an error handling in erofs_readdir()

Richard observed a forever loop of erofs_read_raw_page() [1]
which can be generated by forcely setting ->u.i_blkaddr
to 0xdeadbeef (as my understanding block layer can
handle access beyond end of device correctly).

After digging into that, it seems the problem is highly
related with directories and then I found the root cause
is an improper error handling in erofs_readdir().

Let's fix it now.

[1] https://lore.kernel.org/r/1163995781.68824.1566084358245.JavaMail.zimbra@nod.at/

Reported-by: Richard Weinberger <richard@nod.at>
Fixes: 3aa8ec716e52 ("staging: erofs: add directory operations")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190818125457.25906-1-hsiangkao@aol.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: refuse to mount images with malformed volume name
Gao Xiang [Sun, 18 Aug 2019 10:28:24 +0000 (18:28 +0800)]
staging: erofs: refuse to mount images with malformed volume name

As Richard reminder [1], A valid volume name should be
ended in NIL terminator within the length of volume_name.

Since this field currently isn't really used, let's fix
it to avoid potential bugs in the future.

[1] https://lore.kernel.org/r/1133002215.69049.1566119033047.JavaMail.zimbra@nod.at/

Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20190818102824.22330-1-hsiangkao@aol.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge 5.3-rc5 into staging-next
Greg Kroah-Hartman [Mon, 19 Aug 2019 05:13:42 +0000 (07:13 +0200)]
Merge 5.3-rc5 into staging-next

We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoLinux 5.3-rc5
Linus Torvalds [Sun, 18 Aug 2019 21:31:08 +0000 (14:31 -0700)]
Linux 5.3-rc5

4 years agoMerge tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd...
Linus Torvalds [Sun, 18 Aug 2019 19:56:42 +0000 (12:56 -0700)]
Merge tag 'fixes-for-5.3-rc5' of git://git./linux/kernel/git/mtd/linux

Pull MTD fix from Richard Weinberger:
 "A single fix for MTD to correctly set the spi-nor WP pin"

* tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: spi-nor: Fix the disabling of write protection at init

4 years agoMerge tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Sun, 18 Aug 2019 16:51:48 +0000 (09:51 -0700)]
Merge tag 'for-5.3-rc4-tag' of git://git./linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "Two fixes that popped up during testing:

   - fix for sysfs-related code that adds/removes block groups, warnings
     appear during several fstests in connection with sysfs updates in
     5.3, the fix essentially replaces a workaround with scope NOFS and
     applies to 5.2-based branch too

   - add sanity check of trim range"

* tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: trim: Check the range passed into to prevent overflow
  Btrfs: fix sysfs warning and missing raid sysfs directories

4 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 18 Aug 2019 16:45:42 +0000 (09:45 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A set of fixes for x86:

   - Fix the inconsistent error handling in the umwait init code

   - Rework the boot param zeroing so gcc9 stops complaining about out
     of bound memset. The resulting source code is actually more sane to
     read than the smart solution we had

   - Maintainers update so Tony gets involved when Intel models are
     added

   - Some more fallthrough fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Save fields explicitly, zero out everything else
  MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h
  x86/fpu/math-emu: Address fallthrough warnings
  x86/apic/32: Fix yet another implicit fallthrough warning
  x86/umwait: Fix error handling in umwait_init()

4 years agoMerge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 18 Aug 2019 16:36:51 +0000 (09:36 -0700)]
Merge branch 'efi-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull EFI fix from Thomas Gleixner:
 "A single fix for a EFI mixed mode regression caused by recent rework
  which did not take the firmware bitwidth into account"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi-stub: Fix get_efi_config_table on mixed-mode setups

4 years agoMerge tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 18 Aug 2019 16:26:16 +0000 (09:26 -0700)]
Merge tag 'spdx-5.3-rc5' of git://git./linux/kernel/git/gregkh/spdx

Pull SPDX fixes from Greg KH:
 "Here are four small SPDX fixes for 5.3-rc5.

  A few style fixes for some SPDX comments, added an SPDX tag for one
  file, and fix up some GPL boilerplate for another file.

  All of these have been in linux-next for a few weeks with no reported
  issues (they are comment changes only, so that's to be expected...)"

* tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
  i2c: stm32: Use the correct style for SPDX License Identifier
  intel_th: Use the correct style for SPDX License Identifier
  coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
  kernel/configs: Replace GPL boilerplate code with SPDX identifier

4 years agoMerge tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 18 Aug 2019 16:17:41 +0000 (09:17 -0700)]
Merge tag 'char-misc-5.3-rc5' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small char and misc driver fixes for 5.3-rc5.

  These are two different subsystems needing some fixes, the habanalabs
  driver which is has some more big endian fixes for problems found. The
  other are some small soundwire fixes, including some Kconfig
  dependencies needed to resolve reported build errors.

  All of these have been in linux-next this week with no reported
  issues"

* tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: xilinx-sdfec: fix dependency and build error
  habanalabs: fix device IRQ unmasking for BE host
  habanalabs: fix endianness handling for internal QMAN submission
  habanalabs: fix completion queue handling when host is BE
  habanalabs: fix endianness handling for packets from user
  habanalabs: fix DRAM usage accounting on context tear down
  habanalabs: Avoid double free in error flow
  soundwire: fix regmap dependencies and align with other serial links
  soundwire: cadence_master: fix definitions for INTSTAT0/1
  soundwire: cadence_master: fix register definition for SLAVE_STATE

4 years agoMerge tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 18 Aug 2019 16:14:56 +0000 (09:14 -0700)]
Merge tag 'staging-5.3-rc5' of git://git./linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
 "Here are four small staging and iio driver fixes for 5.3-rc5

  Two are for the dt3000 comedi driver for some reported problems found
  in that codebase, and two are some small iio fixes.

  All of these have been in linux-next this week with no reported
  issues"

* tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: comedi: dt3000: Fix rounding up of timer divisor
  staging: comedi: dt3000: Fix signed integer overflow 'divider * base'
  iio: adc: max9611: Fix temperature reading in probe
  iio: frequency: adf4371: Fix output frequency setting

4 years agoMerge tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 18 Aug 2019 16:11:29 +0000 (09:11 -0700)]
Merge tag 'usb-5.3-rc5' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are number of small USB fixes for 5.3-rc5.

  Syzbot has been on a tear recently now that it has some good USB
  debugging hooks integrated, so there's a number of fixes in here found
  by those tools for some _very_ old bugs. Also a handful of gadget
  driver fixes for reported issues, some hopefully-final dma fixes for
  host controller drivers, and some new USB serial gadget driver ids.

  All of these have been in linux-next this week with no reported issues
  (the usb-serial ones were in linux-next in its own branch, but merged
  into mine on Friday)"

* tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: add a hcd_uses_dma helper
  usb: don't create dma pools for HCDs with a localmem_pool
  usb: chipidea: imx: fix EPROBE_DEFER support during driver probe
  usb: host: fotg2: restart hcd after port reset
  USB: CDC: fix sanity checks in CDC union parser
  usb: cdc-acm: make sure a refcount is taken early enough
  USB: serial: option: add the BroadMobi BM818 card
  USB: serial: option: Add Motorola modem UARTs
  USB: core: Fix races in character device registration and deregistraion
  usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt
  usb: gadget: composite: Clear "suspended" on reset/disconnect
  usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
  USB: serial: option: add D-Link DWM-222 device ID
  USB: serial: option: Add support for ZTE MF871A

4 years agostaging: gasket: Remove unnecessary line-breaks in function signatures
Sumera Priyadarsini [Fri, 16 Aug 2019 21:37:02 +0000 (03:07 +0530)]
staging: gasket: Remove unnecessary line-breaks in function signatures

This patch fixes the function signatures for gasket_read_page_table_size,
gasket_read_simple_page_table_size, gasket_partition_page_table,
gasket_config_coherent_allocator to avoid  the checkpatch.pl warning:

CHECK: Lines should not end with a '('

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190816213702.32116-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: erofs: use common file type conversion
Gao Xiang [Fri, 16 Aug 2019 07:11:42 +0000 (15:11 +0800)]
staging: erofs: use common file type conversion

Deduplicate the EROFS file type conversion implementation and
remove EROFS_FT_* definitions since it's the same as defined
by POSIX, let's follow ext2 as Linus pointed out [1]
commit e10892189428 ("ext2: use common file type conversion").

[1] https://lore.kernel.org/r/CAHk-=wiUs+b=iVKM3mVooXgVk7cmmC67KTmnAuL0cd_cMMVAKw@mail.gmail.com/

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20190816071142.8633-1-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)
Christina Quast [Fri, 16 Aug 2019 06:59:36 +0000 (08:59 +0200)]
staging: rtl8192e: rtllib_crypt_ccmp.c: Use crypto API ccm(aes)

Use ccm(aes) aead transform instead of invoking the AES block cipher
block by block.

Signed-off-by: Christina Quast <contact@christina-quast.de>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Link: https://lore.kernel.org/r/20190816065936.12214-3-contact@christina-quast.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)
Christina Quast [Fri, 16 Aug 2019 06:59:35 +0000 (08:59 +0200)]
staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)

Use ccm(aes) aead transform instead of invoking the AES block cipher
block by block.

Signed-off-by: Christina Quast <contact@christina-quast.de>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Link: https://lore.kernel.org/r/20190816065936.12214-2-contact@christina-quast.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 18 Aug 2019 02:39:54 +0000 (19:39 -0700)]
Merge tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A collection of fixes that should go into this series. This contains:

   - Revert of the REQ_NOWAIT_INLINE and associated dio changes. There
     were still corner cases there, and even though I had a solution for
     it, it's too involved for this stage. (me)

   - Set of NVMe fixes (via Sagi)

   - io_uring fix for fixed buffers (Anthony)

   - io_uring defer issue fix (Jackie)

   - Regression fix for queue sync at exit time (zhengbin)

   - xen blk-back memory leak fix (Wenwen)"

* tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block:
  io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list
  block: remove REQ_NOWAIT_INLINE
  io_uring: fix manual setup of iov_iter for fixed buffers
  xen/blkback: fix memory leaks
  blk-mq: move cancel of requeue_work to the front of blk_exit_queue
  nvme-pci: Fix async probe remove race
  nvme: fix controller removal race with scan work
  nvme-rdma: fix possible use-after-free in connect error flow
  nvme: fix a possible deadlock when passthru commands sent to a multipath device
  nvme-core: Fix extra device_put() call on error path
  nvmet-file: fix nvmet_file_flush() always returning an error
  nvmet-loop: Flush nvme_delete_wq when removing the port
  nvmet: Fix use-after-free bug when a port is removed
  nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns

4 years agoMerge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 18 Aug 2019 02:31:30 +0000 (19:31 -0700)]
Merge tag 'hyperv-fixes-signed' of git://git./linux/kernel/git/hyperv/linux

Pull Hyper-V fixes from Sasha Levin:

 - A few fixes for the userspace hyper-v tools from Adrian Vladu.

 - A fix for the hyper-v MAINTAINERs entry from Lan Tianyu.

 - Fix for SPDX license identifier in the userspace tools from Nishad
   Kamdar.

* tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  MAINTAINERS: Fix Hyperv vIOMMU driver file name
  tools: hv: Use the correct style for SPDX License Identifier
  tools: hv: fix typos in toolchain
  tools: hv: fix KVP and VSS daemons exit code
  tools: hv: fixed Python pep8/flake8 warnings for lsvmbus

4 years agoMAINTAINERS: Fix Hyperv vIOMMU driver file name
Lan Tianyu [Tue, 26 Mar 2019 06:28:21 +0000 (14:28 +0800)]
MAINTAINERS: Fix Hyperv vIOMMU driver file name

The Hyperv vIOMMU file name should be "hyperv-iommu.c" rather
than "hyperv_iommu.c". This patch is to fix it.

Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agotools: hv: Use the correct style for SPDX License Identifier
Nishad Kamdar [Mon, 22 Jul 2019 13:31:17 +0000 (19:01 +0530)]
tools: hv: Use the correct style for SPDX License Identifier

This patch corrects the SPDX License Identifier style
in the trace header file related to Microsoft Hyper-V
client drivers.
For C header files Documentation/process/license-rules.rst
mandates C-like comments (opposed to C source files where
C++ style should be used)

Changes made by using a script provided by Joe Perches here:
https://lkml.org/lkml/2019/2/7/46

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agotools: hv: fix typos in toolchain
Adrian Vladu [Mon, 6 May 2019 16:51:24 +0000 (16:51 +0000)]
tools: hv: fix typos in toolchain

Fix typos in the HyperV toolchain.

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agotools: hv: fix KVP and VSS daemons exit code
Adrian Vladu [Mon, 6 May 2019 16:50:58 +0000 (16:50 +0000)]
tools: hv: fix KVP and VSS daemons exit code

HyperV KVP and VSS daemons should exit with 0 when the '--help'
or '-h' flags are used.

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agotools: hv: fixed Python pep8/flake8 warnings for lsvmbus
Adrian Vladu [Mon, 6 May 2019 17:27:37 +0000 (17:27 +0000)]
tools: hv: fixed Python pep8/flake8 warnings for lsvmbus

Fixed pep8/flake8 python style code for lsvmbus tool.

The TAB indentation was on purpose ignored (pep8 rule W191) to make
sure the code is complying with the Linux code guideline.
The following command doe not show any warnings now:
pep8 --ignore=W191 lsvmbus
flake8 --ignore=W191 lsvmbus

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
4 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 17 Aug 2019 17:44:50 +0000 (10:44 -0700)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "I2C has one revert because of a regression, two fixes for tiny race
  windows (which we were not able to trigger), a MAINTAINERS addition,
  and a SPDX fix"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: stm32: Use the correct style for SPDX License Identifier
  i2c: emev2: avoid race when unregistering slave client
  i2c: rcar: avoid race when unregistering slave client
  MAINTAINERS: i2c-imx: take over maintainership
  Revert "i2c: imx: improve the error handling in i2c_imx_dma_request()"

4 years agoMerge tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv...
Linus Torvalds [Sat, 17 Aug 2019 17:36:47 +0000 (10:36 -0700)]
Merge tag 'riscv/for-v5.3-rc5' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - Two patches to fix significant bugs in floating point register
   context handling

 - A minor fix in RISC-V flush_tlb_page(), to supply a valid end address
   to flush_tlb_range()

 - Two minor defconfig additions: to build the virtio hwrng driver by
   default (for QEMU targets), and to partially synchronize the 32-bit
   defconfig with the 64-bit defconfig

* tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Make __fstate_clean() work correctly.
  riscv: Correct the initialized flow of FP register
  riscv: defconfig: Update the defconfig
  riscv: rv32_defconfig: Update the defconfig
  riscv: fix flush_tlb_range() end address for flush_tlb_page()

4 years agoMerge tag 'usb-serial-5.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sat, 17 Aug 2019 15:09:33 +0000 (17:09 +0200)]
Merge tag 'usb-serial-5.3-rc5' of https://git./linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB-serial fixes for 5.3-rc5

Here are some new modem device ids.

All have been in linux-next with no reported issues.

Signed-off-by: Johan Hovold <johan@kernel.org>
* tag 'usb-serial-5.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: option: add the BroadMobi BM818 card
  USB: serial: option: Add Motorola modem UARTs
  USB: serial: option: add D-Link DWM-222 device ID
  USB: serial: option: Add support for ZTE MF871A

4 years agoMerge tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa
Linus Torvalds [Sat, 17 Aug 2019 00:27:55 +0000 (17:27 -0700)]
Merge tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa fix from Max Filippov:
 "Add missing isync into cpu_reset to make sure ITLB changes are
  effective"

* tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa:
  xtensa: add missing isync to the cpu_reset TLB code

4 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Fri, 16 Aug 2019 17:51:47 +0000 (10:51 -0700)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Don't taint the kernel if CPUs have different sets of page sizes
   supported (other than the one in use).

 - Issue I-cache maintenance for module ftrace trampoline.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
  arm64: cpufeature: Don't treat granule sizes as strict

4 years agoarm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
Will Deacon [Fri, 16 Aug 2019 13:57:43 +0000 (14:57 +0100)]
arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side

The initial support for dynamic ftrace trampolines in modules made use
of an indirect branch which loaded its target from the beginning of
a special section (e71a4e1bebaf7 ("arm64: ftrace: add support for far
branches to dynamic ftrace")). Since no instructions were being patched,
no cache maintenance was needed. However, later in be0f272bfc83 ("arm64:
ftrace: emit ftrace-mod.o contents through code") this code was reworked
to output the trampoline instructions directly into the PLT entry but,
unfortunately, the necessary cache maintenance was overlooked.

Add a call to __flush_icache_range() after writing the new trampoline
instructions but before patching in the branch to the trampoline.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: James Morse <james.morse@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: be0f272bfc83 ("arm64: ftrace: emit ftrace-mod.o contents through code")
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
4 years agoMerge tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 16 Aug 2019 16:13:16 +0000 (09:13 -0700)]
Merge tag 'pm-5.3-rc5' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These add a check to avoid recent suspend-to-idle power regression on
  systems with NVMe drives where the PCIe ASPM policy is "performance"
  (or when the kernel is built without ASPM support), fix an issue
  related to frequency limits in the schedutil cpufreq governor and fix
  a mistake related to the PM QoS usage in the cpufreq core introduced
  recently.

  Specifics:

   - Disable NVMe power optimization related to suspend-to-idle added
     recently on systems where PCIe ASPM is not able to put PCIe links
     into low-power states to prevent excess power from being drawn by
     the system while suspended (Rafael Wysocki).

   - Make the schedutil governor handle frequency limits changes
     properly in all cases (Viresh Kumar).

   - Prevent the cpufreq core from treating positive values returned by
     dev_pm_qos_update_request() as errors (Viresh Kumar)"

* tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  nvme-pci: Allow PCI bus-level PM to be used if ASPM is disabled
  PCI/ASPM: Add pcie_aspm_enabled()
  cpufreq: schedutil: Don't skip freq update when limits change
  cpufreq: dev_pm_qos_update_request() can return 1 on success

4 years agoMerge tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Fri, 16 Aug 2019 15:59:33 +0000 (08:59 -0700)]
Merge tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "Fixes in dmaengine drivers for:

   - dw-edma: endianess, _iomem type and stack usages

   - ste_dma40: unneeded variable and null-pointer dereference

   - tegra210-adma: unused function

   - omap-dma: off-by-one fix"

* tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma:
  omap-dma/omap_vout_vrfb: fix off-by-one fi value
  dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler()
  dmaengine: tegra210-adma: Fix unused function warnings
  dmaengine: ste_dma40: fix unneeded variable warning
  dmaengine: dw-edma: fix endianess confusion
  dmaengine: dw-edma: fix __iomem type confusion
  dmaengine: dw-edma: fix unnecessary stack usage

4 years agoMerge tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 16 Aug 2019 15:49:45 +0000 (08:49 -0700)]
Merge tag 'sound-5.3-rc5' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All small fixes targeted for stable:

   - Two fixes for USB-audio with malformed descriptor, spotted by
     fuzzers

   - Two fixes Conexant HD-audio codec wrt power management

   - Quirks for HD-audio AMD platform and HP laptop

   - HD-audio memory leak fix"

* tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
  ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit
  ALSA: hda - Add a generic reboot_notify
  ALSA: hda - Let all conexant codec enter D3 when rebooting
  ALSA: hda/realtek - Add quirk for HP Envy x360
  ALSA: hda - Fix a memory leak bug
  ALSA: hda - Apply workaround for another AMD chip 1022:1487

4 years agoMerge tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Fri, 16 Aug 2019 15:41:15 +0000 (08:41 -0700)]
Merge tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Nothing too crazy this week, one amdgpu fix to use vmalloc for a
  struct that grew in size, and another MST fix for nouveau, and some
  other misc fixes:

  i915:
   - single GVT use after free fix

  scheduler:
   - entity destruction race fix

  amdgpu:
   - struct allocation fix
   - gfx9 soft recovery fix

  nouveau:
   - followup MST fix

  ast:
   - vga register race fix"

* tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm:
  drm/nouveau: Only recalculate PBN/VCPI on mode/connector changes
  drm/ast: Fixed reboot test may cause system hanged
  drm/scheduler: use job count instead of peek
  drm/amd/display: use kvmalloc for dc_state (v2)
  drm/amdgpu: fix gfx9 soft recovery
  drm/i915: Use after free in error path in intel_vgpu_create_workload()

4 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Fri, 16 Aug 2019 12:24:51 +0000 (14:24 +0200)]
Merge branch 'pm-cpufreq'

* pm-cpufreq:
  cpufreq: schedutil: Don't skip freq update when limits change
  cpufreq: dev_pm_qos_update_request() can return 1 on success

4 years agox86/boot: Save fields explicitly, zero out everything else
John Hubbard [Wed, 31 Jul 2019 05:46:27 +0000 (22:46 -0700)]
x86/boot: Save fields explicitly, zero out everything else

Recent gcc compilers (gcc 9.1) generate warnings about an out of bounds
memset, if the memset goes accross several fields of a struct. This
generated a couple of warnings on x86_64 builds in sanitize_boot_params().

Fix this by explicitly saving the fields in struct boot_params
that are intended to be preserved, and zeroing all the rest.

[ tglx: Tagged for stable as it breaks the warning free build there as well ]

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190731054627.5627-2-jhubbard@nvidia.com
4 years agoMerge tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Greg Kroah-Hartman [Fri, 16 Aug 2019 10:35:56 +0000 (12:35 +0200)]
Merge tag 'soundwire-5.3-rc5' of git://git./linux/kernel/git/vkoul/soundwire into char-misc-linus

Vinod writes:

soundwire fixes for v5.3-rc5

Pierre sent fixes which are queued now for v5.3-rc5 are:
 - regmap dependecy
 - cadence register definitions

* tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: fix regmap dependencies and align with other serial links
  soundwire: cadence_master: fix definitions for INTSTAT0/1
  soundwire: cadence_master: fix register definition for SLAVE_STATE

4 years agoMerge tag 'drm-intel-fixes-2019-08-15' of git://anongit.freedesktop.org/drm/drm-intel...
Dave Airlie [Fri, 16 Aug 2019 02:41:52 +0000 (12:41 +1000)]
Merge tag 'drm-intel-fixes-2019-08-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

drm/i915 fixes for v5.4-rc5:
- GVT use-after-free fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87zhkag9ic.fsf@intel.com
4 years agoALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
Hui Peng [Thu, 15 Aug 2019 04:31:34 +0000 (00:31 -0400)]
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term

`check_input_term` recursively calls itself with input from
device side (e.g., uac_input_terminal_descriptor.bCSourceID)
as argument (id). In `check_input_term`, if `check_input_term`
is called with the same `id` argument as the caller, it triggers
endless recursive call, resulting kernel space stack overflow.

This patch fixes the bug by adding a bitmap to `struct mixer_build`
to keep track of the checked ids and stop the execution if some id
has been checked (similar to how parse_audio_unit handles unitid
argument).

Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Signed-off-by: Hui Peng <benquike@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Thu, 15 Aug 2019 19:29:36 +0000 (12:29 -0700)]
Merge tag 'xfs-5.3-fixes-2' of git://git./fs/xfs/xfs-linux

Pull xfs fixes from Darrick Wong:

 - Fix crashes when the attr fork isn't present due to errors but inode
   inactivation tries to zap the attr data anyway.

 - Convert more directory corruption debugging asserts to actual
   EFSCORRUPTED returns instead of blowing up later on.

 - Don't fail writeback just because we ran out of memory allocating
   metadata log data.

* tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: don't crash on null attr fork xfs_bmapi_read
  xfs: remove more ondisk directory corruption asserts
  fs: xfs: xfs_log: Don't use KM_MAYFAIL at xfs_log_reserve().

4 years agoMerge tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Thu, 15 Aug 2019 19:15:45 +0000 (12:15 -0700)]
Merge tag 'iomap-5.3-fixes-1' of git://git./fs/xfs/xfs-linux

Pull iomap fixlet from Darrick Wong:
 "A single update to the MAINTAINERS entry for iomap now that we've
  removed fs/iomap.c"

* tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  MAINTAINERS: iomap: Remove fs/iomap.c record

4 years agoio_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list
Jackie Liu [Wed, 14 Aug 2019 09:35:22 +0000 (17:35 +0800)]
io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list

This patch may fix two issues:

First, when IOSQE_IO_DRAIN set, the next IOs need to be inserted into
defer list to delay execution, but link io will be actively scheduled to
run by calling io_queue_sqe.

Second, when multiple LINK_IOs are inserted together with defer_list,
the LINK_IO is no longer keep order.

   |-------------|
   |   LINK_IO   |      ----> insert to defer_list  -----------
   |-------------|                                            |
   |   LINK_IO   |      ----> insert to defer_list  ----------|
   |-------------|                                            |
   |   LINK_IO   |      ----> insert to defer_list  ----------|
   |-------------|                                            |
   |   NORMAL_IO |      ----> insert to defer_list  ----------|
   |-------------|                                            |
                                                              |
                              queue_work at same time   <-----|

Fixes: 9e645e1105c ("io_uring: add support for sqe links")
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agoblock: remove REQ_NOWAIT_INLINE
Jens Axboe [Thu, 15 Aug 2019 17:09:16 +0000 (11:09 -0600)]
block: remove REQ_NOWAIT_INLINE

We had a few issues with this code, and there's still a problem around
how we deal with error handling for chained/split bios. For now, just
revert the code and we'll try again with a thoroug solution. This
reverts commits:

e15c2ffa1091 ("block: fix O_DIRECT error handling for bio fragments")
0eb6ddfb865c ("block: Fix __blkdev_direct_IO() for bio fragments")
6a43074e2f46 ("block: properly handle IOCB_NOWAIT for async O_DIRECT IO")
893a1c97205a ("blk-mq: allow REQ_NOWAIT to return an error inline")

Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agoio_uring: fix manual setup of iov_iter for fixed buffers
Aleix Roca Nonell [Thu, 15 Aug 2019 12:03:22 +0000 (14:03 +0200)]
io_uring: fix manual setup of iov_iter for fixed buffers

Commit bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed
buffers") introduced an optimization to avoid using the slow
iov_iter_advance by manually populating the iov_iter iterator in some
cases.

However, the computation of the iterator count field was erroneous: The
first bvec was always accounted for an extent of page size even if the
bvec length was smaller.

In consequence, some I/O operations on fixed buffers were unable to
operate on the full extent of the buffer, consistently skipping some
bytes at the end of it.

Fixes: bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed buffers")
Cc: stable@vger.kernel.org
Signed-off-by: Aleix Roca Nonell <aleix.rocanonell@bsc.es>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agoMerge tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux
Linus Torvalds [Thu, 15 Aug 2019 16:20:17 +0000 (09:20 -0700)]
Merge tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux

Pull auxdisplay fixes from Miguel Ojeda:
 "A few minor auxdisplay improvements:

   - A couple of small header cleanups for charlcd (Masahiro Yamada)

   - A trivial typo fix for the examples of cfag12864b (Masahiro Yamada)

   - An Kconfig help text improvement for charlcd (Mans Rullgard)

   - An error path fix for panel (zhengbin)"

* tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux:
  auxdisplay: Fix a typo in cfag12864b-example.c
  auxdisplay: charlcd: add include guard to charlcd.h
  auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay
  auxdisplay: charlcd: add help text for backlight initial state
  auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach