Re: [PATCH v2] net: dsa: b53: constify b53_io_ops structures

2016-08-09 Thread David Miller
From: Julia Lawall Date: Tue, 9 Aug 2016 19:09:45 +0200 > The b53_io_ops structures are never modified, so declare them as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > > --- > v2: Refer to the right structure in

Re: [PATCH v2] net: dsa: b53: constify b53_io_ops structures

2016-08-09 Thread David Miller
From: Julia Lawall Date: Tue, 9 Aug 2016 19:09:45 +0200 > The b53_io_ops structures are never modified, so declare them as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > > --- > v2: Refer to the right structure in the commit message Applied to net-next,

Re: [tpmdd-devel] [PATCH] tpm: fix cacheline alignment for DMA-able buffers

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 08:18:00AM -0700, Dmitry Torokhov wrote: >Well, the main reason was simplicity and invasiveness of the >change. Well, it isn't simple, because the proposed patches have had subtle problems with DMA. Simple is to use a guaranteed dma-able allocation for DMA memory

Re: [PATCH] dm9000: Fix irq trigger type setup on non-dt platforms

2016-08-09 Thread David Miller
From: Robert Jarzmik Date: Tue, 09 Aug 2016 19:20:44 +0200 > Sylwester Nawrocki writes: > >> Commit b5a099c67a1c36b "net: ethernet: davicom: fix devicetree irq >> resource" causes an interrupt storm after the ethernet interface >> is activated on

Re: [tpmdd-devel] [PATCH] tpm: fix cacheline alignment for DMA-able buffers

2016-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2016 at 08:18:00AM -0700, Dmitry Torokhov wrote: >Well, the main reason was simplicity and invasiveness of the >change. Well, it isn't simple, because the proposed patches have had subtle problems with DMA. Simple is to use a guaranteed dma-able allocation for DMA memory

Re: [PATCH] dm9000: Fix irq trigger type setup on non-dt platforms

2016-08-09 Thread David Miller
From: Robert Jarzmik Date: Tue, 09 Aug 2016 19:20:44 +0200 > Sylwester Nawrocki writes: > >> Commit b5a099c67a1c36b "net: ethernet: davicom: fix devicetree irq >> resource" causes an interrupt storm after the ethernet interface >> is activated on S3C24XX platform (ARM non-dt), due to the

[PATCH 1/2] net: ethernet: renesas: sh_eth: use phydev from struct net_device

2016-08-09 Thread Philippe Reynes
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes ---

[PATCH 1/2] net: ethernet: renesas: sh_eth: use phydev from struct net_device

2016-08-09 Thread Philippe Reynes
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy_dev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes ---

[PATCH 2/2] net: ethernet: renesas: sh_eth: use new api ethtool_{get|set}_link_ksettings

2016-08-09 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/renesas/sh_eth.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 2/2] net: ethernet: renesas: sh_eth: use new api ethtool_{get|set}_link_ksettings

2016-08-09 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/renesas/sh_eth.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 1/4] befs: dump inode_size superblock information

2016-08-09 Thread Luis de Bethencourt
befs_dump_super_block() wasn't giving the inode_size information when dumping all elements of the superblock. Add this element to have complete information of the superblock. Signed-off-by: Luis de Bethencourt --- Hi, This is a series of superblock information related

[PATCH 1/4] befs: dump inode_size superblock information

2016-08-09 Thread Luis de Bethencourt
befs_dump_super_block() wasn't giving the inode_size information when dumping all elements of the superblock. Add this element to have complete information of the superblock. Signed-off-by: Luis de Bethencourt --- Hi, This is a series of superblock information related changes. Thanks, Luis

[PATCH 4/4] befs: fix style issues in super.c

2016-08-09 Thread Luis de Bethencourt
Fixing the following checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" +befs_load_sb(struct super_block *sb, befs_super_block * disk_sb) And the following warnings: WARNING: suspect code indent for conditional statements (8, 12) + if (disk_sb->fs_byte_order ==

[PATCH 3/4] befs: fix comment style

2016-08-09 Thread Luis de Bethencourt
The description of befs_load_sb was confusing the kernel-doc system since, because it starts with /**, it thinks it will document the function with kernel-doc formatting. Which it isn't. Fix other comment style issues in the file while we are at it. Signed-off-by: Luis de Bethencourt

[PATCH 3/4] befs: fix comment style

2016-08-09 Thread Luis de Bethencourt
The description of befs_load_sb was confusing the kernel-doc system since, because it starts with /**, it thinks it will document the function with kernel-doc formatting. Which it isn't. Fix other comment style issues in the file while we are at it. Signed-off-by: Luis de Bethencourt ---

[PATCH 4/4] befs: fix style issues in super.c

2016-08-09 Thread Luis de Bethencourt
Fixing the following checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" +befs_load_sb(struct super_block *sb, befs_super_block * disk_sb) And the following warnings: WARNING: suspect code indent for conditional statements (8, 12) + if (disk_sb->fs_byte_order ==

[PATCH 2/4] befs: add check for ag_shift in superblock

2016-08-09 Thread Luis de Bethencourt
ag_shift and blocks_per_ag contain the same information in different ways, same as block_shift and block_size do. It is worth checking this two are consistent, but since blocks_per_ag isn't documented as mandatory to use some implementations of befs don't enforce this, so making it non-fatal if

[PATCH 2/4] befs: add check for ag_shift in superblock

2016-08-09 Thread Luis de Bethencourt
ag_shift and blocks_per_ag contain the same information in different ways, same as block_shift and block_size do. It is worth checking this two are consistent, but since blocks_per_ag isn't documented as mandatory to use some implementations of befs don't enforce this, so making it non-fatal if

[Patch v4 9/9] arm64: Update device tree for Layerscape SoCs

2016-08-09 Thread York Sun
Add DDR memory controller nodes to enable EDAC driver. Signed-off-by: York Sun --- Change log v4: no change v3: no change v2: no change arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 7 +++ arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 14 ++ 2

[Patch v4 9/9] arm64: Update device tree for Layerscape SoCs

2016-08-09 Thread York Sun
Add DDR memory controller nodes to enable EDAC driver. Signed-off-by: York Sun --- Change log v4: no change v3: no change v2: no change arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 7 +++ arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 14 ++ 2 files changed, 21

[Patch v4 8/9] driver/edac/layerscape_edac: Add Layerscape EDAC support

2016-08-09 Thread York Sun
Add DDR EDAC for ARM-based compatible controllers. Both big-endian and little-endian are supported, as specified in device tree. Signed-off-by: York Sun --- Change log v4: Drop adding atomic_scrub() for arm64 Drop NO_IRQ v3: no change v2: Create new driver using

[Patch v4 8/9] driver/edac/layerscape_edac: Add Layerscape EDAC support

2016-08-09 Thread York Sun
Add DDR EDAC for ARM-based compatible controllers. Both big-endian and little-endian are supported, as specified in device tree. Signed-off-by: York Sun --- Change log v4: Drop adding atomic_scrub() for arm64 Drop NO_IRQ v3: no change v2: Create new driver using shared DDR object

Re: [PATCH v2] console: Don't prefer first registered if DT specifies stdout-path

2016-08-09 Thread Andrew Morton
On Tue, 9 Aug 2016 16:19:37 +0100 Paul Burton wrote: > If a device tree specifies a preferred device for kernel console output > via the stdout-path or linux,stdout-path chosen node properties or the > stdout alias then the kernel ought to honor it & output the kernel >

[PATCH] pwm: Unexport children before chip removal

2016-08-09 Thread David Hsu
Exported pwm channels aren't removed before the pwmchip and are leaked. This results in invalid sysfs files. This fix removes all exported pwm channels before chip removal. Signed-off-by: David Hsu --- drivers/pwm/core.c | 2 ++ drivers/pwm/sysfs.c | 18 ++

Re: [PATCH v2] console: Don't prefer first registered if DT specifies stdout-path

2016-08-09 Thread Andrew Morton
On Tue, 9 Aug 2016 16:19:37 +0100 Paul Burton wrote: > If a device tree specifies a preferred device for kernel console output > via the stdout-path or linux,stdout-path chosen node properties or the > stdout alias then the kernel ought to honor it & output the kernel > console to that device.

[PATCH] pwm: Unexport children before chip removal

2016-08-09 Thread David Hsu
Exported pwm channels aren't removed before the pwmchip and are leaked. This results in invalid sysfs files. This fix removes all exported pwm channels before chip removal. Signed-off-by: David Hsu --- drivers/pwm/core.c | 2 ++ drivers/pwm/sysfs.c | 18 ++ include/linux/pwm.h

[Patch v4 3/9] driver/edac/fsl-ddr: Separate FSL DDR EDAC driver from MPC85xx

2016-08-09 Thread York Sun
The mpc85xx compatible DDR controllers are used on ARM-based SoCs. Separate the DDR part from mpc85xx EDAC driver and prepare to support both architecture. Signed-off-by: York Sun --- Change log v4: Change comment in file header Use lower case "fsl_ddr_edac" for

[Patch v4 3/9] driver/edac/fsl-ddr: Separate FSL DDR EDAC driver from MPC85xx

2016-08-09 Thread York Sun
The mpc85xx compatible DDR controllers are used on ARM-based SoCs. Separate the DDR part from mpc85xx EDAC driver and prepare to support both architecture. Signed-off-by: York Sun --- Change log v4: Change comment in file header Use lower case "fsl_ddr_edac" for EDAC_MOD_STR Drop

[Patch v4 5/9] driver/edac/fsl_ddr: Add DDR types

2016-08-09 Thread York Sun
The compatible DDR controllers may support DDR, DDR2, DDR3, DDR4. An individual controller doesn't support all of them. EDAC driver reads the controller to determine which mode is running. Signed-off-by: York Sun --- Change log v4: Drop DSC_SDTYPE_DDR* macros, use naked

[Patch v4 1/9] driver/edac/mpc85xx_edac: Drop setting/clearing RFXE bit in HID1

2016-08-09 Thread York Sun
On e500v1, read fault exception enable (RFXE) controls whether assertion of core_fault_in causes a machine check interrupt. Assertion of core_fault_in can result from uncorrectable data error, such as an L2 multi-bit ECC error. It can also occur from a system error if logic on the integrated

[Patch v4 4/9] driver/edac/fsl_ddr: Rename macros and names

2016-08-09 Thread York Sun
Use generic names for macros, variables and functions. Signed-off-by: York Sun --- Change log v4: Replace MPC85XX_MC_* with FSL_MC_* v3: Absort changes from reording patches v2: Separated from "House cleaning" patch of v1 drivers/edac/fsl_ddr_edac.c | 166

[Patch v4 2/9] driver/edac/mpc85xx_edac: Replace printk with proper pr_* format

2016-08-09 Thread York Sun
Replace printk with more preferred pr_err/pr_warn/pr_info format. Signed-off-by: York Sun --- Change log v4: no change v3: no change v2: Reordered patch. Change more printk statement than v1 patch. drivers/edac/mpc85xx_edac.c | 72

[Patch v4 5/9] driver/edac/fsl_ddr: Add DDR types

2016-08-09 Thread York Sun
The compatible DDR controllers may support DDR, DDR2, DDR3, DDR4. An individual controller doesn't support all of them. EDAC driver reads the controller to determine which mode is running. Signed-off-by: York Sun --- Change log v4: Drop DSC_SDTYPE_DDR* macros, use naked numbers as suggested

[Patch v4 1/9] driver/edac/mpc85xx_edac: Drop setting/clearing RFXE bit in HID1

2016-08-09 Thread York Sun
On e500v1, read fault exception enable (RFXE) controls whether assertion of core_fault_in causes a machine check interrupt. Assertion of core_fault_in can result from uncorrectable data error, such as an L2 multi-bit ECC error. It can also occur from a system error if logic on the integrated

[Patch v4 4/9] driver/edac/fsl_ddr: Rename macros and names

2016-08-09 Thread York Sun
Use generic names for macros, variables and functions. Signed-off-by: York Sun --- Change log v4: Replace MPC85XX_MC_* with FSL_MC_* v3: Absort changes from reording patches v2: Separated from "House cleaning" patch of v1 drivers/edac/fsl_ddr_edac.c | 166

[Patch v4 2/9] driver/edac/mpc85xx_edac: Replace printk with proper pr_* format

2016-08-09 Thread York Sun
Replace printk with more preferred pr_err/pr_warn/pr_info format. Signed-off-by: York Sun --- Change log v4: no change v3: no change v2: Reordered patch. Change more printk statement than v1 patch. drivers/edac/mpc85xx_edac.c | 72 ++--- 1 file

Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2016-08-09 Thread Richard Fontana
On Tue, Aug 09, 2016 at 09:04:35PM +0100, Alan Cox wrote: > Outside of the "derivative work" GPL clause they don't quite look > compatible to me as a non-lawyer (eg the definition of "source code" > looks to differ on scripts etc).  The clause that permits derived works to be licensed under the

Re: Kernel modules under new copyleft licence : (was Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible)

2016-08-09 Thread Richard Fontana
On Tue, Aug 09, 2016 at 09:04:35PM +0100, Alan Cox wrote: > Outside of the "derivative work" GPL clause they don't quite look > compatible to me as a non-lawyer (eg the definition of "source code" > looks to differ on scripts etc).  The clause that permits derived works to be licensed under the

Re: [RFCv2][PATCH 2/5] arm: Implement ARCH_HAS_FORCE_CACHE

2016-08-09 Thread Florian Fainelli
On 08/08/2016 10:49 AM, Laura Abbott wrote: > arm may need the kernel_force_cache APIs to guarantee data consistency. > Implement versions of these APIs based on the DMA APIs. > > Signed-off-by: Laura Abbott > --- > arch/arm/include/asm/cacheflush.h | 4 ++ >

Re: [RFCv2][PATCH 2/5] arm: Implement ARCH_HAS_FORCE_CACHE

2016-08-09 Thread Florian Fainelli
On 08/08/2016 10:49 AM, Laura Abbott wrote: > arm may need the kernel_force_cache APIs to guarantee data consistency. > Implement versions of these APIs based on the DMA APIs. > > Signed-off-by: Laura Abbott > --- > arch/arm/include/asm/cacheflush.h | 4 ++ > arch/arm/mm/dma-mapping.c

Re: [RFC PATCH v5 2/3] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > Device-tree binding documentation for xilinx gmiitorgmii converter. > > Signed-off-by: Kedareswara rao Appana > --- > Changes for v5: > ---> Fixed Indentation in the example as suggested by Michal. > Changes for v4: >

Re: [RFC PATCH v5 2/3] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > Device-tree binding documentation for xilinx gmiitorgmii converter. > > Signed-off-by: Kedareswara rao Appana > --- > Changes for v5: > ---> Fixed Indentation in the example as suggested by Michal. > Changes for v4: > --> Modified

[PATCH 10/12] [media] dvb_frontend: move kref to struct dvb_frontend

2016-08-09 Thread Max Kellermann
This commit amends my old commit fe35637b0a9f ("[media] dvb_frontend: eliminate blocking wait in dvb_unregister_frontend()"), which added kref to struct dvb_frontend_private. It turned out that there are several use-after-free bugs left, which affect the struct dvb_frontend. Protecting it with

[PATCH 10/12] [media] dvb_frontend: move kref to struct dvb_frontend

2016-08-09 Thread Max Kellermann
This commit amends my old commit fe35637b0a9f ("[media] dvb_frontend: eliminate blocking wait in dvb_unregister_frontend()"), which added kref to struct dvb_frontend_private. It turned out that there are several use-after-free bugs left, which affect the struct dvb_frontend. Protecting it with

[PATCH 09/12] [media] stb0899: move code to "detach" callback

2016-08-09 Thread Max Kellermann
Ensure that STB0899_POSTPROC_GPIO_POWER is set synchronously. Signed-off-by: Max Kellermann --- drivers/media/dvb-frontends/stb0899_drv.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/stb0899_drv.c

[PATCH 09/12] [media] stb0899: move code to "detach" callback

2016-08-09 Thread Max Kellermann
Ensure that STB0899_POSTPROC_GPIO_POWER is set synchronously. Signed-off-by: Max Kellermann --- drivers/media/dvb-frontends/stb0899_drv.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/stb0899_drv.c

[PATCH 11/12] [media] media-entity: clear media_gobj.mdev in _destroy()

2016-08-09 Thread Max Kellermann
media_gobj_destroy() may be called twice on one instance - once by media_device_unregister() and again by dvb_media_device_free(). The function media_remove_intf_links() establishes and documents the convention that mdev==NULL means that the object is not registered, but nobody ever NULLs this

[PATCH 05/12] [media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations

2016-08-09 Thread Max Kellermann
Most release callback functions are identical: free the "tuner_priv" and clear it. Let's eliminate some bloat by providing this simple implementation in the dvb_frontend library. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |9

[PATCH 04/12] [media] dvb: make DVB frontend *_ops instances "const"

2016-08-09 Thread Max Kellermann
These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! Signed-off-by: Max Kellermann ---

[PATCH 08/12] [media] dvb_frontend: add "detach" callback

2016-08-09 Thread Max Kellermann
Prepare for making "release" asynchronous (via kref). Some operations may need to be run synchronously in dvb_frontend_detach(), and that's why we need a "detach" callback. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |1 +

[PATCH 01/12] [media] rc-main: clear rc_map.name in ir_free_table()

2016-08-09 Thread Max Kellermann
rc_unregister_device() will first call ir_free_table(), and later device_del(); however, the latter causes a call to rc_dev_uevent(), which prints rc_map.name, which at this point has already bee freed. This fixes a use-after-free bug found with KASAN. Signed-off-by: Max Kellermann

[PATCH 11/12] [media] media-entity: clear media_gobj.mdev in _destroy()

2016-08-09 Thread Max Kellermann
media_gobj_destroy() may be called twice on one instance - once by media_device_unregister() and again by dvb_media_device_free(). The function media_remove_intf_links() establishes and documents the convention that mdev==NULL means that the object is not registered, but nobody ever NULLs this

[PATCH 05/12] [media] dvb_frontend: merge duplicate dvb_tuner_ops.release implementations

2016-08-09 Thread Max Kellermann
Most release callback functions are identical: free the "tuner_priv" and clear it. Let's eliminate some bloat by providing this simple implementation in the dvb_frontend library. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |9 +

[PATCH 04/12] [media] dvb: make DVB frontend *_ops instances "const"

2016-08-09 Thread Max Kellermann
These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! Signed-off-by: Max Kellermann --- drivers/media/common/siano/smsdvb-main.c |2 +-

[PATCH 08/12] [media] dvb_frontend: add "detach" callback

2016-08-09 Thread Max Kellermann
Prepare for making "release" asynchronous (via kref). Some operations may need to be run synchronously in dvb_frontend_detach(), and that's why we need a "detach" callback. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |1 + drivers/media/dvb-core/dvb_frontend.h |

[PATCH 01/12] [media] rc-main: clear rc_map.name in ir_free_table()

2016-08-09 Thread Max Kellermann
rc_unregister_device() will first call ir_free_table(), and later device_del(); however, the latter causes a call to rc_dev_uevent(), which prints rc_map.name, which at this point has already bee freed. This fixes a use-after-free bug found with KASAN. Signed-off-by: Max Kellermann ---

[PATCH 03/12] [media] dvb-core/en50221: use dvb_remove_device()

2016-08-09 Thread Max Kellermann
Commit da677fe14364 ("[media] dvb-core/en50221: use kref to manage struct dvb_ca_private") moved the dvb_unregister_device() call to the kref callback, but that left lots of stale device state visible to userspace (e.g. in sysfs). By using dvb_remove_device() and dvb_free_device() instead of

[PATCH 02/12] [media] dvbdev: split dvb_unregister_device()

2016-08-09 Thread Max Kellermann
dvb_unregister_device() has a major problem: it combines unregistering with memory disposal. Sometimes, it is necessary to unregister a device, but no memory can be freed yet, because a process still has a (stale) file handle. Therefore, we need to split dvb_unregister_device(). This will allow

[PATCH 06/12] [media] dvb_frontend: tuner_ops.release returns void

2016-08-09 Thread Max Kellermann
It is not clear what this return value means. All implemenations return 0, and the one caller ignores the value. Let's remove this useless return value completely. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |3 +--

[PATCH 03/12] [media] dvb-core/en50221: use dvb_remove_device()

2016-08-09 Thread Max Kellermann
Commit da677fe14364 ("[media] dvb-core/en50221: use kref to manage struct dvb_ca_private") moved the dvb_unregister_device() call to the kref callback, but that left lots of stale device state visible to userspace (e.g. in sysfs). By using dvb_remove_device() and dvb_free_device() instead of

[PATCH 02/12] [media] dvbdev: split dvb_unregister_device()

2016-08-09 Thread Max Kellermann
dvb_unregister_device() has a major problem: it combines unregistering with memory disposal. Sometimes, it is necessary to unregister a device, but no memory can be freed yet, because a process still has a (stale) file handle. Therefore, we need to split dvb_unregister_device(). This will allow

[PATCH 06/12] [media] dvb_frontend: tuner_ops.release returns void

2016-08-09 Thread Max Kellermann
It is not clear what this return value means. All implemenations return 0, and the one caller ignores the value. Let's remove this useless return value completely. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c |3 +-- drivers/media/dvb-core/dvb_frontend.h

[PATCH 12/12] drivers/media/media-device: fix double free bug in _unregister()

2016-08-09 Thread Max Kellermann
While removing all interfaces in media_device_unregister(), all media_interface pointers are freed. This is illegal and results in double kfree() if any media_interface is still linked at this point; maybe because a userspace process still has a file handle. Once the process closes the file

[PATCH 07/12] [media] dvb_frontend: merge the two dvb_frontend_detach() versions

2016-08-09 Thread Max Kellermann
This code duplication is confusing and error prone. Let's merge them by moving the release/dvb_detach call into one function with one #ifdef. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c | 42 + 1 file

[PATCH 12/12] drivers/media/media-device: fix double free bug in _unregister()

2016-08-09 Thread Max Kellermann
While removing all interfaces in media_device_unregister(), all media_interface pointers are freed. This is illegal and results in double kfree() if any media_interface is still linked at this point; maybe because a userspace process still has a file handle. Once the process closes the file

[PATCH 07/12] [media] dvb_frontend: merge the two dvb_frontend_detach() versions

2016-08-09 Thread Max Kellermann
This code duplication is confusing and error prone. Let's merge them by moving the release/dvb_detach call into one function with one #ifdef. Signed-off-by: Max Kellermann --- drivers/media/dvb-core/dvb_frontend.c | 42 + 1 file changed, 12 insertions(+), 30

Re: [RFC PATCH v5 1/3] net: Add mask for Control register 10Mbps speed

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > This patch adds mask for the Control register > 10Mbps speed. > > Signed-off-by: Kedareswara rao Appana Reviewed-by: Florian Fainelli -- Florian

Re: [RFC PATCH v5 1/3] net: Add mask for Control register 10Mbps speed

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > This patch adds mask for the Control register > 10Mbps speed. > > Signed-off-by: Kedareswara rao Appana Reviewed-by: Florian Fainelli -- Florian

Re: [RFC PATCH v7 1/7] Restartable sequences system call

2016-08-09 Thread Peter Zijlstra
On Tue, Aug 09, 2016 at 08:06:40PM +, Mathieu Desnoyers wrote: > >> +static int rseq_increment_event_counter(struct task_struct *t) > >> +{ > >> + if (__put_user(++t->rseq_event_counter, > >> + >rseq->u.e.event_counter)) > >> + return -1; > >> + return 0; > >> +} >

Re: [RFC PATCH v7 1/7] Restartable sequences system call

2016-08-09 Thread Peter Zijlstra
On Tue, Aug 09, 2016 at 08:06:40PM +, Mathieu Desnoyers wrote: > >> +static int rseq_increment_event_counter(struct task_struct *t) > >> +{ > >> + if (__put_user(++t->rseq_event_counter, > >> + >rseq->u.e.event_counter)) > >> + return -1; > >> + return 0; > >> +} >

Re: [RFC PATCH v5 3/3] net: phy: Add gmiitorgmii converter support

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > This patch adds support for gmiitorgmii converter. > > The GMII to RGMII IP core provides the Reduced Gigabit Media > Independent Interface (RGMII) between Ethernet physical media > Devices and the Gigabit Ethernet controller. This core can

Re: [RFC PATCH v5 3/3] net: phy: Add gmiitorgmii converter support

2016-08-09 Thread Florian Fainelli
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote: > This patch adds support for gmiitorgmii converter. > > The GMII to RGMII IP core provides the Reduced Gigabit Media > Independent Interface (RGMII) between Ethernet physical media > Devices and the Gigabit Ethernet controller. This core can

Re: [PATCH] mm/vmalloc: fix align value calculation error

2016-08-09 Thread Andrew Morton
On Fri, 5 Aug 2016 23:48:21 +0800 zijun_hu wrote: > From: zijun_hu > Date: Fri, 5 Aug 2016 22:10:07 +0800 > Subject: [PATCH 1/1] mm/vmalloc: fix align value calculation error > > it causes double align requirement for __get_vm_area_node() if parameter >

Re: [PATCH] mm/vmalloc: fix align value calculation error

2016-08-09 Thread Andrew Morton
On Fri, 5 Aug 2016 23:48:21 +0800 zijun_hu wrote: > From: zijun_hu > Date: Fri, 5 Aug 2016 22:10:07 +0800 > Subject: [PATCH 1/1] mm/vmalloc: fix align value calculation error > > it causes double align requirement for __get_vm_area_node() if parameter > size is power of 2 and VM_IOREMAP is set

Re: [RFC][PATCH 5/3] tracing: Add smi counting to HWLAT

2016-08-09 Thread Peter Zijlstra
On Tue, Aug 09, 2016 at 02:05:43PM -0400, Steven Rostedt wrote: > +int arch_smi_count(void) > +{ > + unsigned long long count; > + int err; > + > + err = rdmsrl_safe(MSR_SMI_COUNT, ); > + if (err) > + return 0; That's really yucky, relying on _safe() to detect

Re: [RFC][PATCH 5/3] tracing: Add smi counting to HWLAT

2016-08-09 Thread Peter Zijlstra
On Tue, Aug 09, 2016 at 02:05:43PM -0400, Steven Rostedt wrote: > +int arch_smi_count(void) > +{ > + unsigned long long count; > + int err; > + > + err = rdmsrl_safe(MSR_SMI_COUNT, ); > + if (err) > + return 0; That's really yucky, relying on _safe() to detect

Re: [Resend][PATCH] x86/power/64: Always create temporary identity mapping correctly

2016-08-09 Thread Rafael J. Wysocki
On Tue, Aug 9, 2016 at 10:02 PM, Jiri Kosina wrote: > On Tue, 9 Aug 2016, Rafael J. Wysocki wrote: > >> I have a murky suspicion, but it is really weird. Namely, what if >> restore_jump_address in set_up_temporary_text_mapping() happens to be >> covered by the restore kernel's

Re: [Resend][PATCH] x86/power/64: Always create temporary identity mapping correctly

2016-08-09 Thread Rafael J. Wysocki
On Tue, Aug 9, 2016 at 10:02 PM, Jiri Kosina wrote: > On Tue, 9 Aug 2016, Rafael J. Wysocki wrote: > >> I have a murky suspicion, but it is really weird. Namely, what if >> restore_jump_address in set_up_temporary_text_mapping() happens to be >> covered by the restore kernel's identity mapping?

Re: [PACTH v1] mm, proc: Implement /proc//totmaps

2016-08-09 Thread Robert Foss
On 2016-08-09 03:24 PM, Jann Horn wrote: On Tue, Aug 09, 2016 at 12:05:43PM -0400, robert.f...@collabora.com wrote: From: Sonny Rao This is based on earlier work by Thiago Goncales. It implements a new per process proc file which summarizes the contents of the smaps

Re: [PACTH v1] mm, proc: Implement /proc//totmaps

2016-08-09 Thread Robert Foss
On 2016-08-09 03:24 PM, Jann Horn wrote: On Tue, Aug 09, 2016 at 12:05:43PM -0400, robert.f...@collabora.com wrote: From: Sonny Rao This is based on earlier work by Thiago Goncales. It implements a new per process proc file which summarizes the contents of the smaps file but doesn't display

[PATCH 6/6] mtd: spi-nor: Enable QPP for winbond parts

2016-08-09 Thread Jagan Teki
Enable QPP support for winbond flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c

[PATCH 6/6] mtd: spi-nor: Enable QPP for winbond parts

2016-08-09 Thread Jagan Teki
Enable QPP support for winbond flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 66d6e0b..838f6ea

Re: [PATCH] device probe: add self triggered delayed work request

2016-08-09 Thread Qing Huang
On 08/09/2016 03:11 AM, Shamir Rabinovitch wrote: On Mon, Aug 08, 2016 at 05:10:05PM -0700, Qing Huang wrote: Not sure if I understood your scenario. Why there is a deadlock here? CPU0 | CPU1

Re: [PATCH] device probe: add self triggered delayed work request

2016-08-09 Thread Qing Huang
On 08/09/2016 03:11 AM, Shamir Rabinovitch wrote: On Mon, Aug 08, 2016 at 05:10:05PM -0700, Qing Huang wrote: Not sure if I understood your scenario. Why there is a deadlock here? CPU0 | CPU1

Re: [Resend][PATCH] x86/power/64: Always create temporary identity mapping correctly

2016-08-09 Thread Rafael J. Wysocki
On Tue, Aug 9, 2016 at 6:27 PM, Thomas Garnier wrote: > On Tue, Aug 9, 2016 at 9:18 AM, Rafael J. Wysocki wrote: >> On Tue, Aug 9, 2016 at 5:05 PM, Jiri Kosina wrote: >>> On Tue, 9 Aug 2016, Thomas Garnier wrote: >>> >> Okay, I did

Re: [Resend][PATCH] x86/power/64: Always create temporary identity mapping correctly

2016-08-09 Thread Rafael J. Wysocki
On Tue, Aug 9, 2016 at 6:27 PM, Thomas Garnier wrote: > On Tue, Aug 9, 2016 at 9:18 AM, Rafael J. Wysocki wrote: >> On Tue, Aug 9, 2016 at 5:05 PM, Jiri Kosina wrote: >>> On Tue, 9 Aug 2016, Thomas Garnier wrote: >>> >> Okay, I did one-by-one reverts, and the one above, i.e. >>

Re: [PATCH v4 2/4] mfd: Add Samsung Exynos Low Power Audio Subsystem driver

2016-08-09 Thread Lee Jones
On Tue, 09 Aug 2016, Sylwester Nawrocki wrote: > On 08/09/2016 05:05 PM, Lee Jones wrote: > >> +static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, > >> > +exynos_lpass_resume); > > Put this up by the PM functions. > > Sorry, I don't understand

Re: [PATCH v4 2/4] mfd: Add Samsung Exynos Low Power Audio Subsystem driver

2016-08-09 Thread Lee Jones
On Tue, 09 Aug 2016, Sylwester Nawrocki wrote: > On 08/09/2016 05:05 PM, Lee Jones wrote: > >> +static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, > >> > +exynos_lpass_resume); > > Put this up by the PM functions. > > Sorry, I don't understand

[PATCH 0/6] mtd: spi-nor: Add QPP support

2016-08-09 Thread Jagan Teki
This series adding support for 4-wire quad page program(32h) for supported flash chips. Jagan Teki (6): mtd: spi-nor: Add quad page program support mtd: m25p80: Use spi-nor quad page program mtd: spi-nor: Enable QPP for macronix parts mtd: spi-nor: Enable QPP for micron parts mtd:

[PATCH 0/6] mtd: spi-nor: Add QPP support

2016-08-09 Thread Jagan Teki
This series adding support for 4-wire quad page program(32h) for supported flash chips. Jagan Teki (6): mtd: spi-nor: Add quad page program support mtd: m25p80: Use spi-nor quad page program mtd: spi-nor: Enable QPP for macronix parts mtd: spi-nor: Enable QPP for micron parts mtd:

[PATCH 4/6] mtd: spi-nor: Enable QPP for micron parts

2016-08-09 Thread Jagan Teki
Enable QPP support for micron flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c

[PATCH 4/6] mtd: spi-nor: Enable QPP for micron parts

2016-08-09 Thread Jagan Teki
Enable QPP support for micron flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index

[PATCH 1/6] mtd: spi-nor: Add quad page program support

2016-08-09 Thread Jagan Teki
Add quad page program support with the use of nor->flags and then controller will use 4 lines for data transmission which is quite faster than page program(02h) Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 13

[PATCH 1/6] mtd: spi-nor: Add quad page program support

2016-08-09 Thread Jagan Teki
Add quad page program support with the use of nor->flags and then controller will use 4 lines for data transmission which is quite faster than page program(02h) Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 13 + include/linux/mtd/spi-nor.h | 2

[PATCH 5/6] mtd: spi-nor: Enable QPP for spansion parts

2016-08-09 Thread Jagan Teki
Enable QPP support for spansion flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c

[PATCH 5/6] mtd: spi-nor: Enable QPP for spansion parts

2016-08-09 Thread Jagan Teki
Enable QPP support for spansion flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index

[PATCH 2/6] mtd: m25p80: Use spi-nor quad page program

2016-08-09 Thread Jagan Teki
Identify the 4-wire tx transfer from spi controller mode value and then assign QPP support to nor->flags to make use of that. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/devices/m25p80.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 3/6] mtd: spi-nor: Enable QPP for macronix parts

2016-08-09 Thread Jagan Teki
Enable QPP support for micronix flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c

[PATCH 2/6] mtd: m25p80: Use spi-nor quad page program

2016-08-09 Thread Jagan Teki
Identify the 4-wire tx transfer from spi controller mode value and then assign QPP support to nor->flags to make use of that. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/devices/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c

[PATCH 3/6] mtd: spi-nor: Enable QPP for macronix parts

2016-08-09 Thread Jagan Teki
Enable QPP support for micronix flash parts. Cc: Brian Norris Signed-off-by: Jagan Teki --- drivers/mtd/spi-nor/spi-nor.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index f88bd7e..24a077d 100644

<    1   2   3   4   5   6   7   8   9   10   >