Re: [PATCH] kpc_i2c: Remove unused file

2019-05-08 Thread Greg KH
On Thu, May 09, 2019 at 02:05:22AM +, Matt Sickler wrote: > The whole file was wrapped in an #if 0. I'm guessing it was a leftover file > from when we were first developing the driver and we just forgot about it. > --- > drivers/staging/kpc2000/kpc_i2c/Makefile | 2 +- > drivers/staging/kp

[PATCH] kpc_i2c: Remove unused file

2019-05-08 Thread Matt Sickler
The whole file was wrapped in an #if 0. I'm guessing it was a leftover file from when we were first developing the driver and we just forgot about it. --- drivers/staging/kpc2000/kpc_i2c/Makefile | 2 +- drivers/staging/kpc2000/kpc_i2c/fileops.c | 181 -- 2 files ch

Re: [PATCH] Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE

2019-05-08 Thread Sasha Levin
On Tue, May 07, 2019 at 12:51:51PM +, Michael Kelley wrote: From: Dexuan Cui Sent: Tuesday, May 7, 2019 12:47 AM In the case of X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM

Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes

2019-05-08 Thread Randy Dunlap
On 5/8/19 12:01 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > Some buffers may only be partially filled with useful data, while the rest > is padded (typically with 0x00 or 0xff). > > This patch introduces a flag to allow the supression of lines of repeated > bytes, which are replaced

[PATCH] drivers/staging/kpc2000: fix build error on xtensa

2019-05-08 Thread Max Filippov
kpc2000/kpc_dma/fileops.c includes asm/uaccess.h instead of linux/uaccess.h, which results in the following build error on xtensa architecture: In file included from drivers/staging/kpc2000/kpc_dma/fileops.c:11: arch/xtensa/include/asm/uaccess.h: In function ‘clear_user’: arch/xtensa/inc

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-08 Thread Ardelean, Alexandru
On Wed, 2019-05-08 at 15:20 +0300, Dan Carpenter wrote: > > > On Wed, May 08, 2019 at 02:28:35PM +0300, Alexandru Ardelean wrote: > > -static const char * const phy_types[] = { > > - "emmc 5.0 phy", > > - "emmc 5.1 phy" > > -}; > > - > > enum xenon_phy_type_enum { > > EMMC_5_0_PHY,

Re: [PATCH 03/16] lib,treewide: add new match_string() helper/macro

2019-05-08 Thread Ardelean, Alexandru
On Wed, 2019-05-08 at 15:18 +0200, Greg KH wrote: > > > On Wed, May 08, 2019 at 04:11:28PM +0300, Andy Shevchenko wrote: > > On Wed, May 08, 2019 at 02:28:29PM +0300, Alexandru Ardelean wrote: > > > This change re-introduces `match_string()` as a macro that uses > > > ARRAY_SIZE() to compute the

Re: [PATCH 03/16] lib,treewide: add new match_string() helper/macro

2019-05-08 Thread Andy Shevchenko
On Wed, May 08, 2019 at 02:28:29PM +0300, Alexandru Ardelean wrote: > This change re-introduces `match_string()` as a macro that uses > ARRAY_SIZE() to compute the size of the array. > The macro is added in all the places that do > `match_string(_a, ARRAY_SIZE(_a), s)`, since the change is pretty >

Re: [PATCH 03/16] lib,treewide: add new match_string() helper/macro

2019-05-08 Thread Greg KH
On Wed, May 08, 2019 at 04:11:28PM +0300, Andy Shevchenko wrote: > On Wed, May 08, 2019 at 02:28:29PM +0300, Alexandru Ardelean wrote: > > This change re-introduces `match_string()` as a macro that uses > > ARRAY_SIZE() to compute the size of the array. > > The macro is added in all the places that

Re: [PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-08 Thread Dan Carpenter
On Wed, May 08, 2019 at 02:28:35PM +0300, Alexandru Ardelean wrote: > -static const char * const phy_types[] = { > - "emmc 5.0 phy", > - "emmc 5.1 phy" > -}; > - > enum xenon_phy_type_enum { > EMMC_5_0_PHY, > EMMC_5_1_PHY, > NR_PHY_TYPES There is no need for NR_PHY_TYPES

[PATCH 13/16] drm/edid: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `generic_edid_name` is a static array of strings. Using match_string() (which computes the array size via ARRAY_SIZE()) is possible. The change is mostly cosmetic. No functionality change. Signed-off-by: Alexandru Ardelean --- drivers/gpu/drm/drm_edid_load.c | 2 +- 1 file changed, 1 insert

RE: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Alastair D'Silva
> -Original Message- > From: David Laight > Sent: Wednesday, 8 May 2019 7:20 PM > To: 'Alastair D'Silva' ; alast...@d-silva.org > Cc: Jani Nikula ; Joonas Lahtinen > ; Rodrigo Vivi ; > David Airlie ; Daniel Vetter ; Dan > Carpenter ; Karsten Keil pingi.de>; Jassi Brar ; Tom Lendacky > ; D

Re: [PATCH 01/16] lib: fix match_string() helper on -1 array size

2019-05-08 Thread Ardelean, Alexandru
On Wed, 2019-05-08 at 14:28 +0300, Alexandru Ardelean wrote: > The documentation the `_match_string()` helper mentions that `n` > should be: > * @n: number of strings in the array or -1 for NULL terminated arrays > > The behavior of the function is different, in the sense that it exits on > the f

[PATCH 16/16] sched: debug: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `sched_feat_names` array is a static array of strings. Using match_string() (which computes the array size via ARRAY_SIZE()) is possible. The change is mostly cosmetic. No functionality change. Signed-off-by: Alexandru Ardelean --- kernel/sched/debug.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 12/16] rdmacg: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `rdmacg_resource_names` array is a static array of strings. Using match_string() (which computes the array size via ARRAY_SIZE()) is possible. The change is mostly cosmetic. No functionality change. Signed-off-by: Alexandru Ardelean --- kernel/cgroup/rdma.c | 2 +- 1 file changed, 1 inserti

[PATCH 15/16] video: fbdev: pxafb: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `lcd_types` array is a static array of strings. Using match_string() (which computes the array size via ARRAY_SIZE()) is possible. This reduces the array by 1 element, since the NULL (at the end of the array) is no longer needed. Signed-off-by: Alexandru Ardelean --- drivers/video/fbdev/pxa

[PATCH 14/16] staging: gdm724x: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `DRIVER_STRING` array is a static array of strings. Using match_string() (which computes the array size via ARRAY_SIZE()) is possible. The change is mostly cosmetic. No functionality change. Signed-off-by: Alexandru Ardelean --- drivers/staging/gdm724x/gdm_tty.c | 3 +-- 1 file changed, 1 i

[PATCH 10/16] pinctrl: armada-37xx: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The change is mostly cosmetic. The `armada_37xx_pin_group` struct is defined as. struct armada_37xx_pin_group { const char *name; unsigned intstart_pin; unsigned intnpins; u32 reg_mask; u32 val[NB_FUNCS]; unsigned

[PATCH 11/16] mm/vmpressure.c: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
__match_string() is called on 2 static array of strings in this file. For this reason, the conversion to the new match_string() macro/helper, was done in this separate commit. Using the new match_string() helper is mostly a cosmetic change (at this point in time). The sizes of the arrays will be c

[PATCH 08/16] cpufreq/intel_pstate: remove NULL entry + use match_string()

2019-05-08 Thread Alexandru Ardelean
The change is mostly cosmetic. The `energy_perf_strings` array is static, so match_string() can be used (which will implicitly do a ARRAY_SIZE(energy_perf_strings)). The only small benefit here, is the reduction of the array size by 1 element. Signed-off-by: Alexandru Ardelean --- drivers/cpuf

[PATCH 01/16] lib: fix match_string() helper when array size is positive

2019-05-08 Thread Alexandru Ardelean
The documentation the `_match_string()` helper mentions that `n` (size of the given array) should be: * @n: number of strings in the array or -1 for NULL terminated arrays The behavior of the function is different, in the sense that it exits on the first NULL element in the array, regardless of w

[PATCH 09/16] mmc: sdhci-xenon: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The change is also cosmetic, but it also does a tighter coupling between the enums & the string values. This way, the ARRAY_SIZE(phy_types) that is implicitly done in the match_string() macro is also a bit safer. Signed-off-by: Alexandru Ardelean --- drivers/mmc/host/sdhci-xenon-phy.c | 12 +

[PATCH 01/16] lib: fix match_string() helper on -1 array size

2019-05-08 Thread Alexandru Ardelean
The documentation the `_match_string()` helper mentions that `n` should be: * @n: number of strings in the array or -1 for NULL terminated arrays The behavior of the function is different, in the sense that it exits on the first NULL element in the array, regardless of whether `n` is -1 or a posi

[PATCH 06/16] x86/mtrr: use new match_string() helper + add gaps == minor fix

2019-05-08 Thread Alexandru Ardelean
This change is a bit more than cosmetic. It replaces 2 values in mtrr_strings with NULL. Previously, they were defined as "?", which is not great because you could technically pass "?", and you would get value 2. It's not sure whether that was intended (likely it wasn't), but this fixes that. Sig

[PATCH 03/16] lib,treewide: add new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
This change re-introduces `match_string()` as a macro that uses ARRAY_SIZE() to compute the size of the array. The macro is added in all the places that do `match_string(_a, ARRAY_SIZE(_a), s)`, since the change is pretty straightforward. Signed-off-by: Alexandru Ardelean --- drivers/clk/bcm/clk

[PATCH 00/16] treewide: fix match_string() helper when array size

2019-05-08 Thread Alexandru Ardelean
The intent of this patch series is to make a case for fixing the match_string() string helper. The doc-string of the `__sysfs_match_string()` helper mentions that `n` (the size of the given array) should be: * @n: number of strings in the array or -1 for NULL terminated arrays However, this is n

[PATCH 05/16] ALSA: oxygen: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The change is purely cosmetic at this point in time, but it does highlight the change done in lib/string.c for match_string(). Particularly for this change, a control mode can be removed/added at a different index/enum-value, and the match_string() helper will continue until the end of the array a

[PATCH 02/16] treewide: rename match_string() -> __match_string()

2019-05-08 Thread Alexandru Ardelean
This change does a rename of match_string() -> __match_string(). There are a few parts to the intention here (with this change): 1. Align with sysfs_match_string()/__sysfs_match_string() 2. This helps to group users of `match_string()` into simple users: a. those that use ARRAY_SIZE(_a) to spec

[PATCH 07/16] device connection: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The `device_connection` struct is defined as: struct device_connection { struct fwnode_handle*fwnode; const char *endpoint[2]; const char *id; struct list_headlist; }; The `endpoint` member is a static array of strings (on the s

[PATCH 04/16] powerpc/xmon: use new match_string() helper/macro

2019-05-08 Thread Alexandru Ardelean
The change is purely cosmetic at this point in time, but it does highlight the change done in lib/string.c for match_string(). Particularly for this change, if a regname is removed (replaced with NULL) in the list, the match_string() helper will continue until the end of the array and ignore the N

Re: [GIT PULL] Staging/IIO driver patches for 5.2-rc1

2019-05-08 Thread Greg KH
On Tue, May 07, 2019 at 01:33:06PM -0700, Linus Torvalds wrote: > On Tue, May 7, 2019 at 10:59 AM Greg KH wrote: > > > > All of these have been in linux-next for a while with no reported > > issues, other than an odd gcc warning for one of the new drivers that > > should be fixed up soon. > > Ok,

Re: [PATCH 2/4] staging: iio: ad7150: use FIELD_GET and GENMASK

2019-05-08 Thread Ardelean, Alexandru
On Tue, 2019-05-07 at 17:44 -0300, Melissa Wen wrote: > [External] > > > On 05/06, Ardelean, Alexandru wrote: > > On Sat, 2019-05-04 at 13:43 +0300, Alexandru Ardelean wrote: > > > [External] > > > > > > > > > On Sat, May 4, 2019 at 1:25 AM Melissa Wen > > > wrote: > > > > > > > > Use the bit

RE: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread David Laight
From: Alastair D'Silva > Sent: 08 May 2019 08:02 > To: alast...@d-silva.org ... > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -480,13 +480,13 @@ enum { > DUMP_PREFIX_OFFSET > }; > > -extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, > -

Re: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Greg Kroah-Hartman
On Wed, May 08, 2019 at 05:01:44PM +1000, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c

Re: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Jani Nikula
On Wed, 08 May 2019, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c| 2 +- For i915

[PATCH v2 7/7] lib/hexdump.c: Optionally retain byte ordering

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva The behaviour of hexdump groups is to print the data out as if it was a native-endian number. This patch tweaks the documentation to make this clear, and also adds the HEXDUMP_RETAIN_BYTE_ORDER flag to allow groups of multiple bytes to be printed without affecting the orde

[PATCH v2 6/7] lib/hexdump.c: Allow multiple groups to be separated by spaces

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Similar to the previous patch, this patch separates groups by 2 spaces for the hex fields, and 1 space for the ASCII field. eg. buf:: 454d414e 43415053 4e495f45 00584544 NAMESPAC E_INDEX. buf:0010: 0002 Sign

[PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva In order to support additional features in hex_dump_to_buffer, replace the ascii bool parameter with flags. Signed-off-by: Alastair D'Silva --- drivers/gpu/drm/i915/intel_engine_cs.c| 2 +- drivers/isdn/hardware/mISDN/mISDNisar.c | 6 -- drive

[PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Some buffers may only be partially filled with useful data, while the rest is padded (typically with 0x00 or 0xff). This patch introduces a flag to allow the supression of lines of repeated bytes, which are replaced with '** Skipped %u bytes of value 0x%x **' An inline wr

[PATCH v2 2/7] lib/hexdump.c: Relax rowsize checks in hex_dump_to_buffer

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva This patch removes the hardcoded row limits and allows for other lengths. These lengths must still be a multiple of groupsize. This allows structs that are not 16/32 bytes to display on a single line. This patch also expands the self-tests to test row sizes up to 64 bytes

[PATCH v2 5/7] lib/hexdump.c: Allow multiple groups to be separated by lines '|'

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva With the wider display format, it can become hard to identify how many bytes into the line you are looking at. The patch adds new flags to hex_dump_to_buffer() and print_hex_dump() to print vertical lines to separate every N groups of bytes. eg. buf:: 454d414e 434

[PATCH v2 0/7] Hexdump Enhancements

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva Apologies for the large CC list, it's a heads up for those responsible for subsystems where a prototype change in generic code causes a change in those subsystems. This series enhances hexdump. These improve the readability of the dumped data in certain situations (eg. wi

[PATCH v2 1/7] lib/hexdump.c: Fix selftests

2019-05-08 Thread Alastair D'Silva
From: Alastair D'Silva The overflow tests did not account for the situation where no overflow occurs and len < rowsize. This patch renames the cryptic variables and accounts for the above case. The selftests now pass. Signed-off-by: Alastair D'Silva --- lib/test_hexdump.c | 47 ++