[PATCH] Input: elan_i2c - Extend Flash-Write delay for Elan touch pad

2017-09-21 Thread KT Liao
Original 20ms delay is a margin timing after a block writing in FW update flow. Sometimes it will cause fail during FW-updating if I2C timing delay. We offten see this issue in rockchip's I2C host. Extend the delay timing is the safest way to improve it. Signed-off-by: KT Liao

[PATCH] Input: elan_i2c - Extend Flash-Write delay for Elan touch pad

2017-09-21 Thread KT Liao
Original 20ms delay is a margin timing after a block writing in FW update flow. Sometimes it will cause fail during FW-updating if I2C timing delay. We offten see this issue in rockchip's I2C host. Extend the delay timing is the safest way to improve it. Signed-off-by: KT Liao ---

Re: [PATCH] pinctrl: intel: Mask interrupts on driver probe

2017-09-21 Thread Mika Westerberg
On Thu, Sep 21, 2017 at 02:20:03PM -0500, Kyle Roeschley wrote: > Powering off the system on Apollo Lake does not clear the interrupt > enable registers for the GPIOs. To avoid an interrupt storm on driver > probe, clear all interrupt enables before enabling our interrupt line. It is up to the

Re: [PATCH] pinctrl: intel: Mask interrupts on driver probe

2017-09-21 Thread Mika Westerberg
On Thu, Sep 21, 2017 at 02:20:03PM -0500, Kyle Roeschley wrote: > Powering off the system on Apollo Lake does not clear the interrupt > enable registers for the GPIOs. To avoid an interrupt storm on driver > probe, clear all interrupt enables before enabling our interrupt line. It is up to the

Re: [PATCH v4] ARM: dts: Add initial Pistachio i.mx6q board support.

2017-09-21 Thread Shawn Guo
On Sat, Sep 09, 2017 at 08:54:21PM +0800, Wig C wrote: > From: YuanCheng Cheng > > Working items: > > - 800MHz CPU > - 2GB of RAM (DDR3) > - 4GB of eMMC storage > - 1T1R WiFi 2.4 GHz > - Power management support > - 1x 10/100/1000 Mbps Ethernet WAN port > - 2x USB 2.0 Host >

Re: [PATCH v4] ARM: dts: Add initial Pistachio i.mx6q board support.

2017-09-21 Thread Shawn Guo
On Sat, Sep 09, 2017 at 08:54:21PM +0800, Wig C wrote: > From: YuanCheng Cheng > > Working items: > > - 800MHz CPU > - 2GB of RAM (DDR3) > - 4GB of eMMC storage > - 1T1R WiFi 2.4 GHz > - Power management support > - 1x 10/100/1000 Mbps Ethernet WAN port > - 2x USB 2.0 Host > - PCIe > -

Re: [PATCH] arm64: dts: ls: Add optee node

2017-09-21 Thread Shawn Guo
On Sat, Sep 09, 2017 at 05:03:28AM +0530, Sumit Garg wrote: > Add optee device tree node on ls1012a, ls1043a, ls1046a, ls1088a > and ls208xa. > > Signed-off-by: Sumit Garg Applied, thanks.

Re: [PATCH] arm64: dts: ls: Add optee node

2017-09-21 Thread Shawn Guo
On Sat, Sep 09, 2017 at 05:03:28AM +0530, Sumit Garg wrote: > Add optee device tree node on ls1012a, ls1043a, ls1046a, ls1088a > and ls208xa. > > Signed-off-by: Sumit Garg Applied, thanks.

Re: [RFC][PATCH v2 0/7] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-21 Thread Santosh Sivaraj
* Sergey Senozhatsky wrote (on 2017-09-20 16:29:02 +): > Hello > > RFC > > On some arches C function pointers are indirect and point to > a function descriptor, which contains the actual pointer to the code. > This mostly doesn't

Re: [RFC][PATCH v2 0/7] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-21 Thread Santosh Sivaraj
* Sergey Senozhatsky wrote (on 2017-09-20 16:29:02 +): > Hello > > RFC > > On some arches C function pointers are indirect and point to > a function descriptor, which contains the actual pointer to the code. > This mostly doesn't matter, except for cases when

Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

2017-09-21 Thread Ingo Molnar
* Eric Biggers wrote: > From: Eric Biggers > > This series fixes the bug found by syzkaller where the ptrace syscall > can be used to set invalid bits in a task's FPU state. I also found > that an equivalent bug was reachable using the sigreturn

Re: [PATCH v3 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

2017-09-21 Thread Ingo Molnar
* Eric Biggers wrote: > From: Eric Biggers > > This series fixes the bug found by syzkaller where the ptrace syscall > can be used to set invalid bits in a task's FPU state. I also found > that an equivalent bug was reachable using the sigreturn syscall, so the > first patch fixes the bug in

[PATCH 1/2] kbuild: link-vmlinux.sh: simplify .version increment

2017-09-21 Thread Masahiro Yamada
Since commit 1f2bfbd00e46 ("kbuild: link of vmlinux moved to a script"), it is easy to increment .version without using a temporary file .old_version. I do not see anybody who creates .tmp_version any more. Probably it is a left-over of commit 4e25d8bb9550fb ("[PATCH] kbuild: adjust .version

[PATCH 1/2] kbuild: link-vmlinux.sh: simplify .version increment

2017-09-21 Thread Masahiro Yamada
Since commit 1f2bfbd00e46 ("kbuild: link of vmlinux moved to a script"), it is easy to increment .version without using a temporary file .old_version. I do not see anybody who creates .tmp_version any more. Probably it is a left-over of commit 4e25d8bb9550fb ("[PATCH] kbuild: adjust .version

[PATCH 2/2] kbuild: mkcompile_h: do not create .version

2017-09-21 Thread Masahiro Yamada
This script need not to create .version; it will be created by scripts/link-vmlinux.sh later. Clean-up the code slightly. Signed-off-by: Masahiro Yamada --- scripts/mkcompile_h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[PATCH 2/2] kbuild: mkcompile_h: do not create .version

2017-09-21 Thread Masahiro Yamada
This script need not to create .version; it will be created by scripts/link-vmlinux.sh later. Clean-up the code slightly. Signed-off-by: Masahiro Yamada --- scripts/mkcompile_h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h

Re: [RFC PATCH 0/7] Fix year 2038 issue for sound subsystem

2017-09-21 Thread Baolin Wang
Hi Takashi, On 22 September 2017 at 12:07, Takashi Sakamoto wrote: > Hi, > > > On Sep 21 2017 15:18, Baolin Wang wrote: >> >> Since many structures will use timespec type variables to record time >> stamp >> in uapi/asound.h, which are not year 2038 safe on 32bit system.

Re: [RFC PATCH 0/7] Fix year 2038 issue for sound subsystem

2017-09-21 Thread Baolin Wang
Hi Takashi, On 22 September 2017 at 12:07, Takashi Sakamoto wrote: > Hi, > > > On Sep 21 2017 15:18, Baolin Wang wrote: >> >> Since many structures will use timespec type variables to record time >> stamp >> in uapi/asound.h, which are not year 2038 safe on 32bit system. This >> patchset >>

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-21 Thread Vitaly Mayatskikh
Reproducer (needs SCSI disk): #include #include #include #include #include #include #include #include #include #define NR_IOS 1 #define NR_IOVECS 8 #define SG_IO 0x2285 int main(int argc, char *argv[]) { int fd, i, j; unsigned char *buf, *ptr, cdb[10];

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-21 Thread Vitaly Mayatskikh
Reproducer (needs SCSI disk): #include #include #include #include #include #include #include #include #include #define NR_IOS 1 #define NR_IOVECS 8 #define SG_IO 0x2285 int main(int argc, char *argv[]) { int fd, i, j; unsigned char *buf, *ptr, cdb[10];

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 11:30 PM, Boqun Feng boqun.f...@gmail.com wrote: > On Fri, Sep 22, 2017 at 11:22:06AM +0800, Boqun Feng wrote: >> Hi Mathieu, >> >> On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: >> > Provide a new command allowing processes to register their intent

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Mathieu Desnoyers
- On Sep 21, 2017, at 11:30 PM, Boqun Feng boqun.f...@gmail.com wrote: > On Fri, Sep 22, 2017 at 11:22:06AM +0800, Boqun Feng wrote: >> Hi Mathieu, >> >> On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: >> > Provide a new command allowing processes to register their intent

[PATCH v2] staging: greybus: light: Release memory obtained by kasprintf

2017-09-21 Thread Arvind Yadav
- Free memory region, if gb_lights_channel_config is not successful. - No need to add check for gb_lights_channel_flash_config(). Signed-off-by: Arvind Yadav --- changes in v2: - Subject line changed. - add kfree in

[PATCH v2] staging: greybus: light: Release memory obtained by kasprintf

2017-09-21 Thread Arvind Yadav
- Free memory region, if gb_lights_channel_config is not successful. - No need to add check for gb_lights_channel_flash_config(). Signed-off-by: Arvind Yadav --- changes in v2: - Subject line changed. - add kfree in __gb_lights_led_unregister(). - No need to

[PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-21 Thread Vitaly Mayatskikh
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Signed-off-by: Vitaly Mayatskikh diff --git

[PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-21 Thread Vitaly Mayatskikh
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Signed-off-by: Vitaly Mayatskikh diff --git a/block/bio.c b/block/bio.c index

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-21 Thread Michael Ellerman
Peter Zijlstra writes: > On Wed, Sep 20, 2017 at 06:13:50PM +, Mathieu Desnoyers wrote: > >> > Also, can you elaborate on the PPC issue? PPC appears to track >> > mm_cpumask more or less just like x86. Is the issue just that this >> > tracking has no implied barriers?

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-21 Thread Michael Ellerman
Peter Zijlstra writes: > On Wed, Sep 20, 2017 at 06:13:50PM +, Mathieu Desnoyers wrote: > >> > Also, can you elaborate on the PPC issue? PPC appears to track >> > mm_cpumask more or less just like x86. Is the issue just that this >> > tracking has no implied barriers? If so, how does TLB

Re: [PATCH] ARM: mxs: constify platform_suspend_ops

2017-09-21 Thread Shawn Guo
On Wed, Aug 30, 2017 at 10:17:51PM +0530, Arvind Yadav wrote: > platform_suspend_ops are not supposed to change at runtime. > Functions suspend_set_ops working with const platform_suspend_ops. > So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav

Re: [PATCH] ARM: mxs: constify platform_suspend_ops

2017-09-21 Thread Shawn Guo
On Wed, Aug 30, 2017 at 10:17:51PM +0530, Arvind Yadav wrote: > platform_suspend_ops are not supposed to change at runtime. > Functions suspend_set_ops working with const platform_suspend_ops. > So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav Applied, thanks.

linux-next: Tree for Sep 22

2017-09-21 Thread Stephen Rothwell
Hi all, Changes since 20170921: The mips tree gained a conflict against the pci-current tree. The net-next tree gained a build failure for which I reverted a commit. The drm-misc tree gained conflicts against Linus' tree. Non-merge commits (relative to Linus' tree): 1601 1453 files changed

linux-next: Tree for Sep 22

2017-09-21 Thread Stephen Rothwell
Hi all, Changes since 20170921: The mips tree gained a conflict against the pci-current tree. The net-next tree gained a build failure for which I reverted a commit. The drm-misc tree gained conflicts against Linus' tree. Non-merge commits (relative to Linus' tree): 1601 1453 files changed

[PATCH] staging: ccree: else is not generally useful after a break or return

2017-09-21 Thread sunil . m
From: Suniel Mahesh <suni...@techveda.org> Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Suniel Mahesh <suni...@techveda.org> --- Note: - Patch was tested and built(ARCH=arm) on next-20170921. No build issues reported.

[PATCH] staging: ccree: else is not generally useful after a break or return

2017-09-21 Thread sunil . m
From: Suniel Mahesh Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Suniel Mahesh --- Note: - Patch was tested and built(ARCH=arm) on next-20170921. No build issues reported. --- drivers/staging/ccree/ssi_request_mgr.c | 5 ++--- 1

[PATCH] ktest: take submenu into account

2017-09-21 Thread Satoru Takeuchi
grub-reboot selects the submenu's first menuentry (title is "1>0") rather than ktest's menuentry (title is "2") by mistake. === $ sudo cat /boot/grub/grub.cfg | grep -E "^menuentry|^submenu" ... menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option

[PATCH] ktest: take submenu into account

2017-09-21 Thread Satoru Takeuchi
grub-reboot selects the submenu's first menuentry (title is "1>0") rather than ktest's menuentry (title is "2") by mistake. === $ sudo cat /boot/grub/grub.cfg | grep -E "^menuentry|^submenu" ... menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option

[PATCH v4] dax: introduce CONFIG_DAX_DRIVER

2017-09-21 Thread Dan Williams
In support of allowing device-mapper to compile out idle/dead code when there are no dax providers in the system, introduce the DAX_DRIVER symbol. This is selected by all leaf drivers that device-mapper might be layered on top. This allows device-mapper to conditionally 'select DAX' only when a

[PATCH v4] dax: introduce CONFIG_DAX_DRIVER

2017-09-21 Thread Dan Williams
In support of allowing device-mapper to compile out idle/dead code when there are no dax providers in the system, introduce the DAX_DRIVER symbol. This is selected by all leaf drivers that device-mapper might be layered on top. This allows device-mapper to conditionally 'select DAX' only when a

[PATCH v4 0/2] dax, dm: stop requiring dax for device-mapper

2017-09-21 Thread Dan Williams
Changes since v3 [1]: * rebase on 4.14-rc1 * rewrite the changelog of patch2 to drop broken references to the "built-in portion of device-mapper" (Mike) [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-August/011545.html --- Bart points out that the DAX core is unconditionally enabled if

[PATCH v4 0/2] dax, dm: stop requiring dax for device-mapper

2017-09-21 Thread Dan Williams
Changes since v3 [1]: * rebase on 4.14-rc1 * rewrite the changelog of patch2 to drop broken references to the "built-in portion of device-mapper" (Mike) [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-August/011545.html --- Bart points out that the DAX core is unconditionally enabled if

Re: [PATCH] Input: add support for the Samsung S6SY761 touchscreen

2017-09-21 Thread Andi Shyti
Hi Dmitry, thanks for your review! [...] > > +static void s6sy761_report_coordinates(struct s6sy761_data *sdata, u8 > > *event) > > +{ > > + u8 tid = ((event[0] & S6SY761_MASK_TID) >> 2) - 1; > > Should we make sure that event[0] & S6SY761_MASK_TID is not 0? I check event[0] already in

Re: [PATCH] Input: add support for the Samsung S6SY761 touchscreen

2017-09-21 Thread Andi Shyti
Hi Dmitry, thanks for your review! [...] > > +static void s6sy761_report_coordinates(struct s6sy761_data *sdata, u8 > > *event) > > +{ > > + u8 tid = ((event[0] & S6SY761_MASK_TID) >> 2) - 1; > > Should we make sure that event[0] & S6SY761_MASK_TID is not 0? I check event[0] already in

[PATCH] brd: prevent overflow caused by too large rd_size parameter

2017-09-21 Thread Satoru Takeuchi
The max value of rd_size parameter is ULONG_MAX from the following commit. Commit 366f4aea649a65c3735d91b4409d84c771811290 ("brd: Switch rd_size to unsigned long") However, this parameter * 1024 will be set as inode->i_size corresponding to brd devices and it's a signed value. To prevent

[PATCH] brd: prevent overflow caused by too large rd_size parameter

2017-09-21 Thread Satoru Takeuchi
The max value of rd_size parameter is ULONG_MAX from the following commit. Commit 366f4aea649a65c3735d91b4409d84c771811290 ("brd: Switch rd_size to unsigned long") However, this parameter * 1024 will be set as inode->i_size corresponding to brd devices and it's a signed value. To prevent

Re: [RFC PATCH 0/7] Fix year 2038 issue for sound subsystem

2017-09-21 Thread Takashi Sakamoto
Hi, On Sep 21 2017 15:18, Baolin Wang wrote: Since many structures will use timespec type variables to record time stamp in uapi/asound.h, which are not year 2038 safe on 32bit system. This patchset tries to introduce new structures removing timespec type to compatible native mode and compat

Re: [RFC PATCH 0/7] Fix year 2038 issue for sound subsystem

2017-09-21 Thread Takashi Sakamoto
Hi, On Sep 21 2017 15:18, Baolin Wang wrote: Since many structures will use timespec type variables to record time stamp in uapi/asound.h, which are not year 2038 safe on 32bit system. This patchset tries to introduce new structures removing timespec type to compatible native mode and compat

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-21 Thread Jason Wang
On 2017年09月21日 06:02, John Fastabend wrote: On 09/19/2017 02:42 AM, Jason Wang wrote: This patch tries to add XDP_REDIRECT for virtio-net. The changes are not complex as we could use exist XDP_TX helpers for most of the work. The rest is passing the XDP_TX to NAPI handler for implementing

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-21 Thread Jason Wang
On 2017年09月21日 06:02, John Fastabend wrote: On 09/19/2017 02:42 AM, Jason Wang wrote: This patch tries to add XDP_REDIRECT for virtio-net. The changes are not complex as we could use exist XDP_TX helpers for most of the work. The rest is passing the XDP_TX to NAPI handler for implementing

[PATCH 1/2] vmbus: add per-channel sysfs info

2017-09-21 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary

[PATCH 1/2] vmbus: add per-channel sysfs info

2017-09-21 Thread kys
From: Stephen Hemminger This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it

[PATCH 2/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-09-21 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by:

[PATCH 2/2] Drivers: hv: vmbus: Expose per-channel interrupts and events counters

2017-09-21 Thread kys
From: Stephen Hemminger When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan ---

Re: [PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-21 Thread Sean Wang
Hi, Masahiro On Thu, 2017-09-21 at 11:09 +0900, Masahiro Yamada wrote: > Hi Sean, > > > 2017-09-21 1:32 GMT+09:00 Sean Wang : > > Hi, Masahiro > > > > For maintainability, I felt it's better if we use the same way to > > register nvmem as that most drivers does under

Re: [PATCH 2/5] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it

2017-09-21 Thread Sean Wang
Hi, Masahiro On Thu, 2017-09-21 at 11:09 +0900, Masahiro Yamada wrote: > Hi Sean, > > > 2017-09-21 1:32 GMT+09:00 Sean Wang : > > Hi, Masahiro > > > > For maintainability, I felt it's better if we use the same way to > > register nvmem as that most drivers does under nvmem usually using > >

[PATCH 0/2] Drivers: hv: vmbus: Add additional per-channel sysfs info

2017-09-21 Thread kys
From: "K. Y. Srinivasan" Add additional per-channel sysfs information to help debug performance issues. Greg, please apply this patch-set to 4.15-rc1. Stephen Hemminger (2): vmbus: add per-channel sysfs info Drivers: hv: vmbus: Expose per-channel interrupts and events

[PATCH 0/2] Drivers: hv: vmbus: Add additional per-channel sysfs info

2017-09-21 Thread kys
From: "K. Y. Srinivasan" Add additional per-channel sysfs information to help debug performance issues. Greg, please apply this patch-set to 4.15-rc1. Stephen Hemminger (2): vmbus: add per-channel sysfs info Drivers: hv: vmbus: Expose per-channel interrupts and events counters

[PATCH v2 02/12] mtd: nand: denali: prefix detect_max_banks() with denali_

2017-09-21 Thread Masahiro Yamada
All functions in this driver are prefixed with denali_ except detect_max_banks(). Rename it for consistency. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 02/12] mtd: nand: denali: prefix detect_max_banks() with denali_

2017-09-21 Thread Masahiro Yamada
All functions in this driver are prefixed with denali_ except detect_max_banks(). Rename it for consistency. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/denali.c

[PATCH v2 09/12] mtd: nand: denali: use upper/lower_32_bits() macro for clean-up

2017-09-21 Thread Masahiro Yamada
I used (uint64_t) cast to avoid "right shift count >= width of type" warning. provides nice helpers to cater to it. The code will be cleaner, and easier to understand. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mtd/nand/denali.c

[PATCH v2 09/12] mtd: nand: denali: use upper/lower_32_bits() macro for clean-up

2017-09-21 Thread Masahiro Yamada
I used (uint64_t) cast to avoid "right shift count >= width of type" warning. provides nice helpers to cater to it. The code will be cleaner, and easier to understand. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2

[PATCH v2 07/12] mtd: nand: denali: use more FIELD_PREP / FIELD_GET where appropriate

2017-09-21 Thread Masahiro Yamada
In several places in this driver, the register fields are retrieved as follows: val = reg & FOO_MASK; Then, modified as follows: reg &= ~FOO_MASK; reg |= val; This code relies on its shift is 0, which we will never know until we check the definition of FOO_MASK. Use FIELD_PREP /

[PATCH v2 07/12] mtd: nand: denali: use more FIELD_PREP / FIELD_GET where appropriate

2017-09-21 Thread Masahiro Yamada
In several places in this driver, the register fields are retrieved as follows: val = reg & FOO_MASK; Then, modified as follows: reg &= ~FOO_MASK; reg |= val; This code relies on its shift is 0, which we will never know until we check the definition of FOO_MASK. Use FIELD_PREP /

[PATCH v2 12/12] mtd: nand: denali: change the setup_dma choice into hook

2017-09-21 Thread Masahiro Yamada
The previous commit added some hooks into struct denali_nand_info, so here is one more for clean-up. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mtd/nand/denali.c | 15 +-- drivers/mtd/nand/denali.h | 2 ++ 2 files

[PATCH v2 06/12] mtd: nand: denali: clean up macros with

2017-09-21 Thread Masahiro Yamada
All the register offsets and bitfield masks are defined in denali.h, but the driver code ended up with additional crappy macros such as MAKE_ECC_CORRECTION(), ECC_SECTOR(), etc. The reason is apparent - accessing a register field requires mask and shift pair. The denali.h only provides mask.

[PATCH v2 12/12] mtd: nand: denali: change the setup_dma choice into hook

2017-09-21 Thread Masahiro Yamada
The previous commit added some hooks into struct denali_nand_info, so here is one more for clean-up. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mtd/nand/denali.c | 15 +-- drivers/mtd/nand/denali.h | 2 ++ 2 files changed, 7 insertions(+), 10

[PATCH v2 06/12] mtd: nand: denali: clean up macros with

2017-09-21 Thread Masahiro Yamada
All the register offsets and bitfield masks are defined in denali.h, but the driver code ended up with additional crappy macros such as MAKE_ECC_CORRECTION(), ECC_SECTOR(), etc. The reason is apparent - accessing a register field requires mask and shift pair. The denali.h only provides mask.

[PATCH v2 08/12] mtd: nand: denali: clean up comments

2017-09-21 Thread Masahiro Yamada
This driver explains too much about what is apparent from the code. Comments around basic APIs such as init_completion(), spin_lock_init(), etc. seem unneeded lessons to kernel developers. (With those comments dropped, denali_drv_init() is small enough, so it has been merged into the probe

[PATCH v2 08/12] mtd: nand: denali: clean up comments

2017-09-21 Thread Masahiro Yamada
This driver explains too much about what is apparent from the code. Comments around basic APIs such as init_completion(), spin_lock_init(), etc. seem unneeded lessons to kernel developers. (With those comments dropped, denali_drv_init() is small enough, so it has been merged into the probe

[PATCH v2 11/12] mtd: nand: denali: support direct addressing mode

2017-09-21 Thread Masahiro Yamada
The Denali NAND IP core decodes the lower 28 bits of the slave address to get the control information; bit[27:26]=mode, bit[25:24]=bank, etc. This means 256MB address range must be allocated for this IP. (Direct Addressing) For systems with address space limitation, the Denali IP provides an

[PATCH v2 11/12] mtd: nand: denali: support direct addressing mode

2017-09-21 Thread Masahiro Yamada
The Denali NAND IP core decodes the lower 28 bits of the slave address to get the control information; bit[27:26]=mode, bit[25:24]=bank, etc. This means 256MB address range must be allocated for this IP. (Direct Addressing) For systems with address space limitation, the Denali IP provides an

[PATCH v2 01/12] mtd: nand: denali: squash setup_ecc_for_xfer() helper into caller

2017-09-21 Thread Masahiro Yamada
The setup_ecc_for_xfer() is only called from denali_data_xfer(). This helper is small enough, so squash it into the caller. This looks cleaner to me. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 22 +++--- 1

[PATCH v2 01/12] mtd: nand: denali: squash setup_ecc_for_xfer() helper into caller

2017-09-21 Thread Masahiro Yamada
The setup_ecc_for_xfer() is only called from denali_data_xfer(). This helper is small enough, so squash it into the caller. This looks cleaner to me. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 22 +++--- 1 file changed, 3 insertions(+),

[PATCH v2 03/12] mtd: nand: denali: consolidate include directives

2017-09-21 Thread Masahiro Yamada
Include necessary headers explicitly without relying on indirect header inclusion. Also, sort them alphabetically. , , turned out bogus, so removed. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 12 +++-

[PATCH v2 05/12] mtd: nand: denali: slight clean up of denali_wait_for_irq()

2017-09-21 Thread Masahiro Yamada
This function has a local variable "irq_mask" and its value is the same as denali->irq_mask. Clean up the code a little. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 03/12] mtd: nand: denali: consolidate include directives

2017-09-21 Thread Masahiro Yamada
Include necessary headers explicitly without relying on indirect header inclusion. Also, sort them alphabetically. , , turned out bogus, so removed. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 12 +++- drivers/mtd/nand/denali.h | 3

[PATCH v2 05/12] mtd: nand: denali: slight clean up of denali_wait_for_irq()

2017-09-21 Thread Masahiro Yamada
This function has a local variable "irq_mask" and its value is the same as denali->irq_mask. Clean up the code a little. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 04/12] mtd: nand: denali: squash denali_enable_dma() helper into caller

2017-09-21 Thread Masahiro Yamada
This helper just sets/clears a flag of DMA_ENABLE register (with register read-back, I do not know why it is necessary). Move the register write code to the caller, and remove the helper. It works for me without the register read-back. Signed-off-by: Masahiro Yamada

[PATCH v2 04/12] mtd: nand: denali: squash denali_enable_dma() helper into caller

2017-09-21 Thread Masahiro Yamada
This helper just sets/clears a flag of DMA_ENABLE register (with register read-back, I do not know why it is necessary). Move the register write code to the caller, and remove the helper. It works for me without the register read-back. Signed-off-by: Masahiro Yamada --- Changes in v2: None

[PATCH v2 00/12] mtd: nand: denali: more clean-ups

2017-09-21 Thread Masahiro Yamada
This series make the Denali driver even cleaner and more correct. Masahiro Yamada (12): mtd: nand: denali: squash setup_ecc_for_xfer() helper into caller mtd: nand: denali: prefix detect_max_banks() with denali_ mtd: nand: denali: consolidate include directives mtd: nand: denali: squash

[PATCH v2 10/12] mtd: nand: denali: remove unneeded init of ECC_ENABLE register

2017-09-21 Thread Masahiro Yamada
The ECC correction is properly enabled/disabled before the page read/write. There is no need to set up this at the beginning of the probe. Signed-off-by: Masahiro Yamada --- This patch may cause a conflict unless http://patchwork.ozlabs.org/patch/813125/ is

[PATCH v2 00/12] mtd: nand: denali: more clean-ups

2017-09-21 Thread Masahiro Yamada
This series make the Denali driver even cleaner and more correct. Masahiro Yamada (12): mtd: nand: denali: squash setup_ecc_for_xfer() helper into caller mtd: nand: denali: prefix detect_max_banks() with denali_ mtd: nand: denali: consolidate include directives mtd: nand: denali: squash

[PATCH v2 10/12] mtd: nand: denali: remove unneeded init of ECC_ENABLE register

2017-09-21 Thread Masahiro Yamada
The ECC correction is properly enabled/disabled before the page read/write. There is no need to set up this at the beginning of the probe. Signed-off-by: Masahiro Yamada --- This patch may cause a conflict unless http://patchwork.ozlabs.org/patch/813125/ is applied first. Changes in v2: -

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread David Miller
From: Yunsheng Lin Date: Fri, 22 Sep 2017 09:57:31 +0800 > Hi, David > > On 2017/9/22 9:41, David Miller wrote: >> From: Yunsheng Lin >> Date: Thu, 21 Sep 2017 19:21:44 +0800 >> >>> @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread David Miller
From: Yunsheng Lin Date: Fri, 22 Sep 2017 09:57:31 +0800 > Hi, David > > On 2017/9/22 9:41, David Miller wrote: >> From: Yunsheng Lin >> Date: Thu, 21 Sep 2017 19:21:44 +0800 >> >>> @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct hclge_dev *hdev) >>> return 0; >>> } >>> >>>

Re: [PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread David Miller
From: Geert Uytterhoeven Date: Thu, 21 Sep 2017 13:27:02 +0200 > Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is > not enough to represent interrupt numbers on all architectures. Hence > PHY interrupt numbers may be truncated during printing. > >

Re: [PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread David Miller
From: Geert Uytterhoeven Date: Thu, 21 Sep 2017 13:27:02 +0200 > Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is > not enough to represent interrupt numbers on all architectures. Hence > PHY interrupt numbers may be truncated during printing. > > Increase the buffer size

[PATCH 3/4] rtc: mediatek: enhance the description for MediaTek PMIC based RTC

2017-09-21 Thread sean.wang
From: Sean Wang Give a better description for original MediaTek RTC driver as PMIC based RTC in order to distinguish SoC based RTC. Also turning all words with Mediatek to MediaTek here. Cc: Eddie Huang Signed-off-by: Sean Wang

[PATCH 3/4] rtc: mediatek: enhance the description for MediaTek PMIC based RTC

2017-09-21 Thread sean.wang
From: Sean Wang Give a better description for original MediaTek RTC driver as PMIC based RTC in order to distinguish SoC based RTC. Also turning all words with Mediatek to MediaTek here. Cc: Eddie Huang Signed-off-by: Sean Wang --- drivers/rtc/Kconfig | 8 1 file changed, 4

[PATCH 0/4] rtc: mediatek: add support for SoC based RTC on MT7622

2017-09-21 Thread sean.wang
From: Sean Wang This patchset introduces support for MediaTek SoC based real time clock (RTC) Currently, the driver is already tested successfully with hwclock and wakealarm on MT7622 SoC. And it should also be workable on other similar MediaTek SoCs. And patch 3 is a

[PATCH 2/4] rtc: mediatek: add driver for RTC on MT7622 SoC

2017-09-21 Thread sean.wang
From: Sean Wang This patch introduces the driver for the RTC on MT7622 SoC. Signed-off-by: Sean Wang --- drivers/rtc/Kconfig| 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-mediatek.c | 398

[PATCH 1/4] dt-bindings: rtc: mediatek: add bindings for MediaTek SoC based RTC

2017-09-21 Thread sean.wang
From: Sean Wang Add device-tree binding for MediaTek SoC based RTC Cc: devicet...@vger.kernel.org Signed-off-by: Sean Wang --- .../devicetree/bindings/rtc/rtc-mediatek.txt| 21 + 1 file changed, 21 insertions(+)

[PATCH 0/4] rtc: mediatek: add support for SoC based RTC on MT7622

2017-09-21 Thread sean.wang
From: Sean Wang This patchset introduces support for MediaTek SoC based real time clock (RTC) Currently, the driver is already tested successfully with hwclock and wakealarm on MT7622 SoC. And it should also be workable on other similar MediaTek SoCs. And patch 3 is a distinct patch used to

[PATCH 2/4] rtc: mediatek: add driver for RTC on MT7622 SoC

2017-09-21 Thread sean.wang
From: Sean Wang This patch introduces the driver for the RTC on MT7622 SoC. Signed-off-by: Sean Wang --- drivers/rtc/Kconfig| 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-mediatek.c | 398 + 3 files changed, 409 insertions(+)

[PATCH 1/4] dt-bindings: rtc: mediatek: add bindings for MediaTek SoC based RTC

2017-09-21 Thread sean.wang
From: Sean Wang Add device-tree binding for MediaTek SoC based RTC Cc: devicet...@vger.kernel.org Signed-off-by: Sean Wang --- .../devicetree/bindings/rtc/rtc-mediatek.txt| 21 + 1 file changed, 21 insertions(+) create mode 100644

[PATCH 4/4] rtc: mediatek: update MAINTAINERS entry with MediaTek RTC driver

2017-09-21 Thread sean.wang
From: Sean Wang I work for MediaTek on maintaining the MediaTek SoC based RTC driver for the existing SoCs and keep adding support for the following SoCs in the future. Cc: Eddie Huang Signed-off-by: Sean Wang ---

[PATCH 4/4] rtc: mediatek: update MAINTAINERS entry with MediaTek RTC driver

2017-09-21 Thread sean.wang
From: Sean Wang I work for MediaTek on maintaining the MediaTek SoC based RTC driver for the existing SoCs and keep adding support for the following SoCs in the future. Cc: Eddie Huang Signed-off-by: Sean Wang --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Boqun Feng
On Fri, Sep 22, 2017 at 11:22:06AM +0800, Boqun Feng wrote: > Hi Mathieu, > > On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: > > Provide a new command allowing processes to register their intent to use > > the private expedited command. > > > > This allows PowerPC to skip the

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Boqun Feng
On Fri, Sep 22, 2017 at 11:22:06AM +0800, Boqun Feng wrote: > Hi Mathieu, > > On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: > > Provide a new command allowing processes to register their intent to use > > the private expedited command. > > > > This allows PowerPC to skip the

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Boqun Feng
Hi Mathieu, On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: > Provide a new command allowing processes to register their intent to use > the private expedited command. > > This allows PowerPC to skip the full memory barrier in switch_mm(), and > only issue the barrier when

Re: [RFC PATCH v3 1/2] membarrier: Provide register expedited private command

2017-09-21 Thread Boqun Feng
Hi Mathieu, On Tue, Sep 19, 2017 at 06:13:41PM -0400, Mathieu Desnoyers wrote: > Provide a new command allowing processes to register their intent to use > the private expedited command. > > This allows PowerPC to skip the full memory barrier in switch_mm(), and > only issue the barrier when

  1   2   3   4   5   6   7   8   9   10   >