Re: [PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-11 Thread Andrew Lunn
On Sat, Mar 11, 2017 at 04:12:58PM -0500, Vivien Didelot wrote: > Introduce a dsa_is_normal_port helper to check if a given port is a > normal user port as opposed to a CPU port or DSA link. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn

Re: [PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-11 Thread Andrew Lunn
On Sat, Mar 11, 2017 at 04:12:58PM -0500, Vivien Didelot wrote: > Introduce a dsa_is_normal_port helper to check if a given port is a > normal user port as opposed to a CPU port or DSA link. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Andrew Lunn
> > I really wished you had moved the code, unmodified, into > > global1_atu.c. Then made lots of easy to review small changes. I > > cannot just look at this patch and know it is correct. What i need to > > compare against is not in this patch. So it is a lot harder to review. > > I've addressed

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Andrew Lunn
> > I really wished you had moved the code, unmodified, into > > global1_atu.c. Then made lots of easy to review small changes. I > > cannot just look at this patch and know it is correct. What i need to > > compare against is not in this patch. So it is a lot harder to review. > > I've addressed

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Russell King - ARM Linux
On Sat, Mar 11, 2017 at 08:25:49AM -0300, Mauro Carvalho Chehab wrote: > This situation is there since 2009. If I remember well, you tried to write > such generic plugin in the past, but never finished it, apparently because > it is too complex. Others tried too over the years. > > The last

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Russell King - ARM Linux
On Sat, Mar 11, 2017 at 08:25:49AM -0300, Mauro Carvalho Chehab wrote: > This situation is there since 2009. If I remember well, you tried to write > such generic plugin in the past, but never finished it, apparently because > it is too complex. Others tried too over the years. > > The last

Re: [PATCH 2/2] phy: rockchip-inno-usb2: add support of u2phy for rk3328

2017-03-11 Thread kbuild test robot
Hi Meng, [auto build test ERROR on robh/for-next] [also build test ERROR on v4.11-rc1 next-20170310] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 2/2] phy: rockchip-inno-usb2: add support of u2phy for rk3328

2017-03-11 Thread kbuild test robot
Hi Meng, [auto build test ERROR on robh/for-next] [also build test ERROR on v4.11-rc1 next-20170310] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

arch/x86/include/asm/pgtable.h:888:2: error: implicit declaration of function 'native_pud_clear'

2017-03-11 Thread kbuild test robot
Hi Matthew, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 84c37c168c0e49a412d7021cda3183a72adac0d0 commit: a00cc7d9dd93d66a3fb83fc52aa57a4bec51c517 mm, x86: add support for PUD-sized transparent hugepages date:

arch/x86/include/asm/pgtable.h:888:2: error: implicit declaration of function 'native_pud_clear'

2017-03-11 Thread kbuild test robot
Hi Matthew, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 84c37c168c0e49a412d7021cda3183a72adac0d0 commit: a00cc7d9dd93d66a3fb83fc52aa57a4bec51c517 mm, x86: add support for PUD-sized transparent hugepages date:

Re: [PATCH v5] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-11 Thread Jens Axboe
On 03/11/2017 03:42 PM, Jens Axboe wrote: >> @@ -185,31 +187,53 @@ static struct blkcg_gq *blkg_create(struct blkcg >> *blkcg, >> goto err_free_blkg; >> } >> >> +if (drop_locks) { >> +spin_unlock_irq(q->queue_lock); >> +rcu_read_unlock(); >> +}

Re: [PATCH v5] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-11 Thread Jens Axboe
On 03/11/2017 03:42 PM, Jens Axboe wrote: >> @@ -185,31 +187,53 @@ static struct blkcg_gq *blkg_create(struct blkcg >> *blkcg, >> goto err_free_blkg; >> } >> >> +if (drop_locks) { >> +spin_unlock_irq(q->queue_lock); >> +rcu_read_unlock(); >> +}

Re: 4.11.0-rc1 boot resulted in WARNING: CPU: 14 PID: 1722 at fs/sysfs/dir.c:31 .sysfs_warn_dup+0x78/0xb0

2017-03-11 Thread Jens Axboe
On 03/09/2017 05:59 AM, Brian Foster wrote: > cc linux-block > > On Thu, Mar 09, 2017 at 04:20:06PM +0530, Abdul Haleem wrote: >> On Wed, 2017-03-08 at 08:17 -0500, Brian Foster wrote: >>> On Tue, Mar 07, 2017 at 10:01:04PM +0530, Abdul Haleem wrote: Hi, Today's mainline

Re: 4.11.0-rc1 boot resulted in WARNING: CPU: 14 PID: 1722 at fs/sysfs/dir.c:31 .sysfs_warn_dup+0x78/0xb0

2017-03-11 Thread Jens Axboe
On 03/09/2017 05:59 AM, Brian Foster wrote: > cc linux-block > > On Thu, Mar 09, 2017 at 04:20:06PM +0530, Abdul Haleem wrote: >> On Wed, 2017-03-08 at 08:17 -0500, Brian Foster wrote: >>> On Tue, Mar 07, 2017 at 10:01:04PM +0530, Abdul Haleem wrote: Hi, Today's mainline

Re: [PATCH v5] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-11 Thread Jens Axboe
> @@ -185,31 +187,53 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, > goto err_free_blkg; > } > > + if (drop_locks) { > + spin_unlock_irq(q->queue_lock); > + rcu_read_unlock(); > + } I have a general dislike for code like that,

Re: [PATCH v5] blkcg: allocate struct blkcg_gq outside request queue spinlock

2017-03-11 Thread Jens Axboe
> @@ -185,31 +187,53 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, > goto err_free_blkg; > } > > + if (drop_locks) { > + spin_unlock_irq(q->queue_lock); > + rcu_read_unlock(); > + } I have a general dislike for code like that,

Re: [PATCH 0/5] Updates following recent generic_make_request improvement

2017-03-11 Thread Jens Axboe
On 03/09/2017 11:00 PM, NeilBrown wrote: > This is a rebase of the series I sent earlier, based on the > very latest from Linus, which included my first patch. > > The first fixes a problem that patch introduced, and so should go to > Linux promptly. > The others are more general improvements and

Re: [PATCH 0/5] Updates following recent generic_make_request improvement

2017-03-11 Thread Jens Axboe
On 03/09/2017 11:00 PM, NeilBrown wrote: > This is a rebase of the series I sent earlier, based on the > very latest from Linus, which included my first patch. > > The first fixes a problem that patch introduced, and so should go to > Linux promptly. > The others are more general improvements and

Re: [PATCH v3] don't forget to call pd_online_fn when activate policy

2017-03-11 Thread Jens Axboe
On 03/10/2017 08:46 PM, Zhou Chengming wrote: > When we activate policy on the request_queue, we will create policy_date > for all the existing blkgs of the request_queue, so we should call > pd_init_fn() and pd_online_fn() on these newly created policy_data. I'm not looking at this until you

Re: [PATCH v3] don't forget to call pd_online_fn when activate policy

2017-03-11 Thread Jens Axboe
On 03/10/2017 08:46 PM, Zhou Chengming wrote: > When we activate policy on the request_queue, we will create policy_date > for all the existing blkgs of the request_queue, so we should call > pd_init_fn() and pd_online_fn() on these newly created policy_data. I'm not looking at this until you

[PATCH v3] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- v3: -Correcting the place of the parenthesis and sign drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2

[PATCH v3] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- v3: -Correcting the place of the parenthesis and sign drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Pavel Machek
Hi! > > > The rationale is that we should support the simplest use cases first. > > > > > > In the case of the first MC-based driver (and several subsequent > > > ones), the simplest use case required MC, as it was meant to suport > > > a custom-made sophisticated application that required fine

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Pavel Machek
Hi! > > > The rationale is that we should support the simplest use cases first. > > > > > > In the case of the first MC-based driver (and several subsequent > > > ones), the simplest use case required MC, as it was meant to suport > > > a custom-made sophisticated application that required fine

[PATCH v2] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
From: Eric Biggers I found that statx() was significantly slower than stat(). As a microbenchmark, I compared 10,000,000 invocations of fstat() on a tmpfs file to the same with statx() passed a NULL path: $ time ./stat_benchmark real0m1.464s

[PATCH v2] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
From: Eric Biggers I found that statx() was significantly slower than stat(). As a microbenchmark, I compared 10,000,000 invocations of fstat() on a tmpfs file to the same with statx() passed a NULL path: $ time ./stat_benchmark real0m1.464s user0m0.275s

Re: [PATCH] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
On Sat, Mar 11, 2017 at 02:15:10AM -0800, Eric Biggers wrote: > stat() instead initializes its struct on the stack and copies it to > userspace with a single call to copy_to_user(). This turns out to be > much faster, and changing statx to do this makes it almost as fast as > stat: Hmm, I missed

Re: [PATCH] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
On Sat, Mar 11, 2017 at 02:15:10AM -0800, Eric Biggers wrote: > stat() instead initializes its struct on the stack and copies it to > userspace with a single call to copy_to_user(). This turns out to be > much faster, and changing statx to do this makes it almost as fast as > stat: Hmm, I missed

Re: [RFC] Add option to mount only a pids subset

2017-03-11 Thread Alexey Gladkov
On Thu, Mar 09, 2017 at 12:26:49PM +0100, Djalal Harouni wrote: > I'm bit lost in the two discussion, however the main concern I was > discussing with Andy was if you have per superblock proc mounts then > each mount will end up with its own device ID st_dev, right now they > share the same ID if

Re: [RFC] Add option to mount only a pids subset

2017-03-11 Thread Alexey Gladkov
On Thu, Mar 09, 2017 at 12:26:49PM +0100, Djalal Harouni wrote: > I'm bit lost in the two discussion, however the main concern I was > discussing with Andy was if you have per superblock proc mounts then > each mount will end up with its own device ID st_dev, right now they > share the same ID if

[PATCH 2/3] soc: samsung: Do not build ARMv7 PMU drivers on ARMv8

2017-03-11 Thread Krzysztof Kozlowski
The Exynos Power Management Unit (PMU) drivers contain quite large static arrays of register values necessary for given Exynos SoC to enter low power mode. All this data is useless for ARMv8 SoC like Exynos5433, because the image will not be shared between ARMv7 and ARMv8. Add additional Kconfig

[PATCH 3/3] arm64: exynos: Enable Exynos PMU and PM domains drivers

2017-03-11 Thread Krzysztof Kozlowski
Enable EXYNOS_PM_DOMAINS because recently Exynos5433 got support for Power Management domains. The Exynos5433 pinctrl driver requires EXYNOS_PMU to get the syscon-regmap for PMU address space. Signed-off-by: Krzysztof Kozlowski --- arch/arm64/Kconfig.platforms | 2 ++ 1 file

[PATCH 1/3] arm64: defconfig: Enable DRM and LPASS drivers for Exynos5433 and Exynos7

2017-03-11 Thread Krzysztof Kozlowski
Enable drivers specific to Exynos5433 and Exynos7: 1. MFD Low Power Audio SubSystem (LPASS), 2. Entire DRM stack (display, outputs, additional sub-blocks), 3. Drivers for video-related sub-blocks (JPEG, Multi Format Codec, GScaler). Signed-off-by: Krzysztof Kozlowski ---

[PATCH 2/3] soc: samsung: Do not build ARMv7 PMU drivers on ARMv8

2017-03-11 Thread Krzysztof Kozlowski
The Exynos Power Management Unit (PMU) drivers contain quite large static arrays of register values necessary for given Exynos SoC to enter low power mode. All this data is useless for ARMv8 SoC like Exynos5433, because the image will not be shared between ARMv7 and ARMv8. Add additional Kconfig

[PATCH 3/3] arm64: exynos: Enable Exynos PMU and PM domains drivers

2017-03-11 Thread Krzysztof Kozlowski
Enable EXYNOS_PM_DOMAINS because recently Exynos5433 got support for Power Management domains. The Exynos5433 pinctrl driver requires EXYNOS_PMU to get the syscon-regmap for PMU address space. Signed-off-by: Krzysztof Kozlowski --- arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2

[PATCH 1/3] arm64: defconfig: Enable DRM and LPASS drivers for Exynos5433 and Exynos7

2017-03-11 Thread Krzysztof Kozlowski
Enable drivers specific to Exynos5433 and Exynos7: 1. MFD Low Power Audio SubSystem (LPASS), 2. Entire DRM stack (display, outputs, additional sub-blocks), 3. Drivers for video-related sub-blocks (JPEG, Multi Format Codec, GScaler). Signed-off-by: Krzysztof Kozlowski ---

[PATCH 0/3] arm64: exynos: Enable drivers for Exynos5433

2017-03-11 Thread Krzysztof Kozlowski
Hi, Patches are independent but I organized them into one patchset as they have common goal - enable more drivers for ARMv8 Exynos chips. If there are no objections, I can take it through samsung-soc. Best regards, Krzysztof Krzysztof Kozlowski (3): arm64: defconfig: Enable DRM and LPASS

[PATCH 0/3] arm64: exynos: Enable drivers for Exynos5433

2017-03-11 Thread Krzysztof Kozlowski
Hi, Patches are independent but I organized them into one patchset as they have common goal - enable more drivers for ARMv8 Exynos chips. If there are no objections, I can take it through samsung-soc. Best regards, Krzysztof Krzysztof Kozlowski (3): arm64: defconfig: Enable DRM and LPASS

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, SIMRAN SINGHAL wrote: > On Sun, Mar 12, 2017 at 2:53 AM, Julia Lawall wrote: > > > > > > On Sun, 12 Mar 2017, simran singhal wrote: > > > >> Replace strcpy with strlcpy as strcpy does not check for buffer > >> overflow. > >> This is found using

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, SIMRAN SINGHAL wrote: > On Sun, Mar 12, 2017 at 2:53 AM, Julia Lawall wrote: > > > > > > On Sun, 12 Mar 2017, simran singhal wrote: > > > >> Replace strcpy with strlcpy as strcpy does not check for buffer > >> overflow. > >> This is found using Flawfinder. > >> > >>

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Pavel Machek
Hi! > > > Ok, perhaps supporting both subdev API and V4L2 API at the same > > > time doesn't make much sense. We could disable one in favor of the > > > other, either at compilation time or at runtime. > > > > Right. If the subdev API is disabled, then you have to inherit the subdev > >

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Pavel Machek
Hi! > > > Ok, perhaps supporting both subdev API and V4L2 API at the same > > > time doesn't make much sense. We could disable one in favor of the > > > other, either at compilation time or at runtime. > > > > Right. If the subdev API is disabled, then you have to inherit the subdev > >

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 2:53 AM, Julia Lawall wrote: > > > On Sun, 12 Mar 2017, simran singhal wrote: > >> Replace strcpy with strlcpy as strcpy does not check for buffer >> overflow. >> This is found using Flawfinder. >> >> Signed-off-by: simran singhal

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 2:53 AM, Julia Lawall wrote: > > > On Sun, 12 Mar 2017, simran singhal wrote: > >> Replace strcpy with strlcpy as strcpy does not check for buffer >> overflow. >> This is found using Flawfinder. >> >> Signed-off-by: simran singhal >> --- >> >> v2: >>-Correcting the

Re: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

2017-03-11 Thread Daniel Lezcano
On Thu, Mar 09, 2017 at 05:58:38PM +0100, Romain Izard wrote: > This reverts commit 7b9f1d16e6d1 ("clocksource/drivers/tcb_clksrc: Use > 32 bit tcb as sched_clock"). In the current state, the kernel warns > against a late registration of the new sched_clock, the printk clock > resets after only a

Re: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

2017-03-11 Thread Daniel Lezcano
On Thu, Mar 09, 2017 at 05:58:38PM +0100, Romain Izard wrote: > This reverts commit 7b9f1d16e6d1 ("clocksource/drivers/tcb_clksrc: Use > 32 bit tcb as sched_clock"). In the current state, the kernel warns > against a late registration of the new sched_clock, the printk clock > resets after only a

[PATCH] z3fold: fix spinlock unlocking in page reclaim

2017-03-11 Thread Vitaly Wool
The patch "z3fold: add kref refcounting" introduced a bug in z3fold_reclaim_page() with function exit that may leave pool->lock spinlock held. Here comes the trivial fix. Reported-by: Alexey Khoroshilov Signed-off-by: Vitaly Wool --- mm/z3fold.c | 1

[PATCH] z3fold: fix spinlock unlocking in page reclaim

2017-03-11 Thread Vitaly Wool
The patch "z3fold: add kref refcounting" introduced a bug in z3fold_reclaim_page() with function exit that may leave pool->lock spinlock held. Here comes the trivial fix. Reported-by: Alexey Khoroshilov Signed-off-by: Vitaly Wool --- mm/z3fold.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, simran singhal wrote: > Replace strcpy with strlcpy as strcpy does not check for buffer > overflow. > This is found using Flawfinder. > > Signed-off-by: simran singhal > --- > > v2: >-Correcting the place of the parenthesis > >

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, simran singhal wrote: > Replace strcpy with strlcpy as strcpy does not check for buffer > overflow. > This is found using Flawfinder. > > Signed-off-by: simran singhal > --- > > v2: >-Correcting the place of the parenthesis > > drivers/staging/android/ashmem.c | 3

[PATCH net-next v2 17/17] etherdevice: remove unused eth_addr_greater

2017-03-11 Thread Vivien Didelot
eth_addr_greater() was introduced for the mv88e6xxx driver, but is not used anymore. There is no other user, thus remove this function. Signed-off-by: Vivien Didelot --- include/linux/etherdevice.h | 15 --- 1 file changed, 15 deletions(-) diff

[PATCH net-next v2 17/17] etherdevice: remove unused eth_addr_greater

2017-03-11 Thread Vivien Didelot
eth_addr_greater() was introduced for the mv88e6xxx driver, but is not used anymore. There is no other user, thus remove this function. Signed-off-by: Vivien Didelot --- include/linux/etherdevice.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/linux/etherdevice.h

[PATCH net-next v2 03/17] net: dsa: mv88e6xxx: add ATU setup helper

2017-03-11 Thread Vivien Didelot
Move the configuration of the default ageing time in a new mv88e6xxx_atu_setup function. That function will be extended later to contain all ATU related configuration bits. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 13

[PATCH net-next v2 02/17] net: dsa: mv88e6xxx: move ATU ageing time setter

2017-03-11 Thread Vivien Didelot
Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/Makefile | 1 +

[PATCH net-next v2 03/17] net: dsa: mv88e6xxx: add ATU setup helper

2017-03-11 Thread Vivien Didelot
Move the configuration of the default ageing time in a new mv88e6xxx_atu_setup function. That function will be extended later to contain all ATU related configuration bits. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH net-next v2 02/17] net: dsa: mv88e6xxx: move ATU ageing time setter

2017-03-11 Thread Vivien Didelot
Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c| 31

[PATCH net-next v2 06/17] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Vivien Didelot
All Marvell switch chips have an ATU accessed using the same Global (1) register layout. Only the handling of the FID differs as more bits were necessary to support more and more databases. Add and use a fresh documented implementation of the ATU Load/Purge. The static

[PATCH net-next v2 06/17] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Vivien Didelot
All Marvell switch chips have an ATU accessed using the same Global (1) register layout. Only the handling of the FID differs as more bits were necessary to support more and more databases. Add and use a fresh documented implementation of the ATU Load/Purge. The static

[PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- v2: -Correcting the place of the parenthesis drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- v2: -Correcting the place of the parenthesis drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH net-next v2 13/17] net: dsa: mv88e6xxx: rework port mode setup

2017-03-11 Thread Vivien Didelot
A switch port mode is defined by the association of its egress mode, its frame mode and if supported or required, the ether type value. Pack all this in a mv88e6xxx_set_port_mode function and provide helpers for the Normal Network mode, the DSA mode, and the Ether Type DSA mode, as well as an

[PATCH net-next v2 13/17] net: dsa: mv88e6xxx: rework port mode setup

2017-03-11 Thread Vivien Didelot
A switch port mode is defined by the association of its egress mode, its frame mode and if supported or required, the ether type value. Pack all this in a mv88e6xxx_set_port_mode function and provide helpers for the Normal Network mode, the DSA mode, and the Ether Type DSA mode, as well as an

[PATCH net-next v2 11/17] net: dsa: mv88e6xxx: rename the port vector member

2017-03-11 Thread Vivien Didelot
Not all Marvell switch chips support port trunking, which is embedded in the port vector data for ATU operations. Rename the portv_trunkid member of the mv88e6xxx_atu_entry structure to portvec to be more concise and consistent with the different chips. Signed-off-by: Vivien Didelot

[PATCH net-next v2 10/17] net: dsa: mv88e6xxx: rename new FID helper

2017-03-11 Thread Vivien Didelot
Rename the _mv88e6xxx_fid_new helper to mv88e6xxx_atu_new to get rid of the old underscore prefix naming convention and be consistent with the rest of the chip-wide ATU API. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn ---

[PATCH net-next v2 10/17] net: dsa: mv88e6xxx: rename new FID helper

2017-03-11 Thread Vivien Didelot
Rename the _mv88e6xxx_fid_new helper to mv88e6xxx_atu_new to get rid of the old underscore prefix naming convention and be consistent with the rest of the chip-wide ATU API. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2

[PATCH net-next v2 11/17] net: dsa: mv88e6xxx: rename the port vector member

2017-03-11 Thread Vivien Didelot
Not all Marvell switch chips support port trunking, which is embedded in the port vector data for ATU operations. Rename the portv_trunkid member of the mv88e6xxx_atu_entry structure to portvec to be more concise and consistent with the different chips. Signed-off-by: Vivien Didelot

[PATCH net-next v2 09/17] net: dsa: mv88e6xxx: rework ATU Remove

2017-03-11 Thread Vivien Didelot
Add a fresh documented implementation of the ATU Move operation, and use it to replace the current ATU Remove operation. Note that not all Marvell switch chip support the ATU Move operation. For those supporting it, the number of bits used to mask the destination port may vary. 6352 and such use

[PATCH net-next v2 16/17] net: dsa: mv88e6xxx: add port priority override op

2017-03-11 Thread Vivien Didelot
Add a new operation to disable the DA, SA and VTU priority override. Setting such limit is not likely to be used soon, so provide a port_disable_pri_override operation directly. This can be changed later for port_set_pri_override when we'll need it. Also remove the now obsolete

[PATCH net-next v2 09/17] net: dsa: mv88e6xxx: rework ATU Remove

2017-03-11 Thread Vivien Didelot
Add a fresh documented implementation of the ATU Move operation, and use it to replace the current ATU Remove operation. Note that not all Marvell switch chip support the ATU Move operation. For those supporting it, the number of bits used to mask the destination port may vary. 6352 and such use

[PATCH net-next v2 16/17] net: dsa: mv88e6xxx: add port priority override op

2017-03-11 Thread Vivien Didelot
Add a new operation to disable the DA, SA and VTU priority override. Setting such limit is not likely to be used soon, so provide a port_disable_pri_override operation directly. This can be changed later for port_set_pri_override when we'll need it. Also remove the now obsolete

[PATCH net-next v2 05/17] net: dsa: mv88e6xxx: enable ATU Learn2All

2017-03-11 Thread Vivien Didelot
The ATU Learn2All feature allows newly learnt addresses to be spanned on ports marked as "Message Port", currently all DSA ports. This commit enables this feature which is necessary and quite convenient for multi-chip switch fabrics. Signed-off-by: Vivien Didelot

[PATCH net-next v2 05/17] net: dsa: mv88e6xxx: enable ATU Learn2All

2017-03-11 Thread Vivien Didelot
The ATU Learn2All feature allows newly learnt addresses to be spanned on ports marked as "Message Port", currently all DSA ports. This commit enables this feature which is necessary and quite convenient for multi-chip switch fabrics. Signed-off-by: Vivien Didelot ---

[PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-11 Thread Vivien Didelot
Introduce a dsa_is_normal_port helper to check if a given port is a normal user port as opposed to a CPU port or DSA link. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/net/dsa.h

[PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support

2017-03-11 Thread Vivien Didelot
The purpose of this patch series is to rework the code related to the Address Translation Unit (ATU), and bring support for it to the 88E6390 family of switch chips. All Global (1) ATU related code have been reworked and moved to its own file. Some port related bits used for ATU configuration

[PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-11 Thread Vivien Didelot
Introduce a dsa_is_normal_port helper to check if a given port is a normal user port as opposed to a CPU port or DSA link. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index

[PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support

2017-03-11 Thread Vivien Didelot
The purpose of this patch series is to rework the code related to the Address Translation Unit (ATU), and bring support for it to the 88E6390 family of switch chips. All Global (1) ATU related code have been reworked and moved to its own file. Some port related bits used for ATU configuration

[PATCH net-next v2 07/17] net: dsa: mv88e6xxx: rework ATU GetNext

2017-03-11 Thread Vivien Didelot
Add and use a fresh documented implementation of the ATU GetNext. Since it is not necessary to write the MAC address to iterate from, only do it once directly in the ATU GetNext operation, if the provided ATU entry structure is not valid. This makes the user code simpler. Also, there is no need

[PATCH net-next v2 01/17] net: dsa: mv88e6xxx: add port mask helper

2017-03-11 Thread Vivien Didelot
Add a mv88e6xxx_port_mask() helper to get the bitmask of ports in a switch chip, that will be used in several features. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +

[PATCH net-next v2 08/17] net: dsa: mv88e6xxx: rework ATU Flush

2017-03-11 Thread Vivien Didelot
Add a fresh documented implementation of the ATU Flush/Move operation. Use it to replace the current ATU Flush operation. _mv88e6xxx_atu_flush_move is still used by the Move operation so keep it until the Move operation is refactored in a next commit. Signed-off-by: Vivien Didelot

[PATCH net-next v2 07/17] net: dsa: mv88e6xxx: rework ATU GetNext

2017-03-11 Thread Vivien Didelot
Add and use a fresh documented implementation of the ATU GetNext. Since it is not necessary to write the MAC address to iterate from, only do it once directly in the ATU GetNext operation, if the provided ATU entry structure is not valid. This makes the user code simpler. Also, there is no need

[PATCH net-next v2 01/17] net: dsa: mv88e6xxx: add port mask helper

2017-03-11 Thread Vivien Didelot
Add a mv88e6xxx_port_mask() helper to get the bitmask of ports in a switch chip, that will be used in several features. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 + drivers/net/dsa/mv88e6xxx/port.c | 2 +- 2 files changed, 6

[PATCH net-next v2 08/17] net: dsa: mv88e6xxx: rework ATU Flush

2017-03-11 Thread Vivien Didelot
Add a fresh documented implementation of the ATU Flush/Move operation. Use it to replace the current ATU Flush operation. _mv88e6xxx_atu_flush_move is still used by the Move operation so keep it until the Move operation is refactored in a next commit. Signed-off-by: Vivien Didelot ---

[PATCH net-next v2 14/17] net: dsa: mv88e6xxx: fix port egress flooding mode

2017-03-11 Thread Vivien Didelot
The Marvell switch ports can be configured to allow or prevent egress of frames with an unknown unicast or multicast destination address. Some switch chips such as 88E6095 and 88E6185 have two disjoint bits in Port Control Register (0x04) bit 2 "Forward Unknown" (for unicast) and Port Control 2

[PATCH net-next v2 04/17] net: dsa: mv88e6xxx: setup message ports

2017-03-11 Thread Vivien Didelot
All interconnectable Marvell switch chips have an ATU Learn2All feature which allows newly learnt addresses to be spanned on ports marked as "Message Port". This commit configures the DSA ports as Message Port. Note that this has no effect until the Learn2All feature is enabled. Signed-off-by:

[PATCH net-next v2 15/17] net: dsa: mv88e6xxx: add port ATU learn limit op

2017-03-11 Thread Vivien Didelot
Add a new operation to disable the limiting of learnt MAC addresses. Setting such limit is not likely to be used soon, so provide a port_disable_learn_limit operation directly. This can be changed later for port_set_learn_limit when we'll need it. Signed-off-by: Vivien Didelot

[PATCH net-next v2 04/17] net: dsa: mv88e6xxx: setup message ports

2017-03-11 Thread Vivien Didelot
All interconnectable Marvell switch chips have an ATU Learn2All feature which allows newly learnt addresses to be spanned on ports marked as "Message Port". This commit configures the DSA ports as Message Port. Note that this has no effect until the Learn2All feature is enabled. Signed-off-by:

[PATCH net-next v2 15/17] net: dsa: mv88e6xxx: add port ATU learn limit op

2017-03-11 Thread Vivien Didelot
Add a new operation to disable the limiting of learnt MAC addresses. Setting such limit is not likely to be used soon, so provide a port_disable_learn_limit operation directly. This can be changed later for port_set_learn_limit when we'll need it. Signed-off-by: Vivien Didelot Reviewed-by:

[PATCH net-next v2 14/17] net: dsa: mv88e6xxx: fix port egress flooding mode

2017-03-11 Thread Vivien Didelot
The Marvell switch ports can be configured to allow or prevent egress of frames with an unknown unicast or multicast destination address. Some switch chips such as 88E6095 and 88E6185 have two disjoint bits in Port Control Register (0x04) bit 2 "Forward Unknown" (for unicast) and Port Control 2

[PATCH v2] net: tun: use new api ethtool_{get|set}_link_ksettings

2017-03-11 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 --- Changelog: v2: - Finaly, I've found the hardware and do basic test ;) thanks Michael S. Tsirkin and Eric Dumazet for the feedback

[PATCH v2] net: tun: use new api ethtool_{get|set}_link_ksettings

2017-03-11 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 --- Changelog: v2: - Finaly, I've found the hardware and do basic test ;) thanks Michael S. Tsirkin and Eric Dumazet for the feedback drivers/net/tun.c |

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Thu, Mar 09, 2017 at 06:33:14PM -0500, Vivien Didelot wrote: >> All Marvell switch chips have an ATU accessed using the same Global (1) >> register layout. Only the handling of the FID differs as more bits were >> necessary to support more and

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Thu, Mar 09, 2017 at 06:33:14PM -0500, Vivien Didelot wrote: >> All Marvell switch chips have an ATU accessed using the same Global (1) >> register layout. Only the handling of the FID differs as more bits were >> necessary to support more and more databases.

[PATCH] staging: wlan-ng: fix checkpatch.pl code style warnings

2017-03-11 Thread Andrii
Fixed code style warnings reported by checkpatch.pl script. Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..d7d2d13 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++

[PATCH] staging: wlan-ng: fix checkpatch.pl code style warnings

2017-03-11 Thread Andrii
Fixed code style warnings reported by checkpatch.pl script. Signed-off-by: Andrii Vladyka diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..d7d2d13 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++

Re: [Outreachy kernel] [PATCH] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, simran singhal wrote: > Replace strcpy with strlcpy as strcpy does not check for buffer > overflow. > This is found using Flawfinder. > > Signed-off-by: simran singhal > --- > drivers/staging/android/ashmem.c | 3 ++- > 1 file changed, 2

Re: [Outreachy kernel] [PATCH] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread Julia Lawall
On Sun, 12 Mar 2017, simran singhal wrote: > Replace strcpy with strlcpy as strcpy does not check for buffer > overflow. > This is found using Flawfinder. > > Signed-off-by: simran singhal > --- > drivers/staging/android/ashmem.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Russell King - ARM Linux
On Sat, Mar 11, 2017 at 11:06:55AM -0800, Steve Longerbeam wrote: > On 03/11/2017 10:59 AM, Russell King - ARM Linux wrote: > >On Sat, Mar 11, 2017 at 10:54:55AM -0800, Steve Longerbeam wrote: > >> > >> > >>On 03/11/2017 10:45 AM, Russell King - ARM Linux wrote: > >>>I really don't think expecting

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Russell King - ARM Linux
On Sat, Mar 11, 2017 at 11:06:55AM -0800, Steve Longerbeam wrote: > On 03/11/2017 10:59 AM, Russell King - ARM Linux wrote: > >On Sat, Mar 11, 2017 at 10:54:55AM -0800, Steve Longerbeam wrote: > >> > >> > >>On 03/11/2017 10:45 AM, Russell King - ARM Linux wrote: > >>>I really don't think expecting

[PATCH] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal --- drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ashmem.c

<    1   2   3   4   5   6   >