[PATCH 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string.

2017-09-13 Thread Himanshi Jain
This patchset is to rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string. Himanshi Jain (2): include: linux: sysfs: Add __ATTR_NAMED macro iio: Use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED and change usage to pass string drivers/iio/adc/ad7793.c

[PATCH 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Himanshi Jain
Add __ATTR_NAMED macro similar to __ATTR but taking name as a string instead of implicit conversion of argument to string using the macro _stringify(_name). Signed-off-by: Himanshi Jain --- include/linux/sysfs.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/sysfs.h b/i

[PATCH 2/2] iio: Use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED and change usage to pass string

2017-09-13 Thread Himanshi Jain
Add IIO_ATTR_NAMED macro to use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED. Change current usage of IIO_DEVICE_ATTR_NAMED to pass name as string. Signed-off-by: Himanshi Jain --- drivers/iio/adc/ad7793.c | 2 +- drivers/staging/iio/adc/ad7192.c | 2 +- driver

[PATCH] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882b55..d

Re: [PATCH 2/2] iio: Use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED and change usage to pass string

2017-09-13 Thread Dan Carpenter
On Wed, Sep 13, 2017 at 01:26:27PM +0530, Himanshi Jain wrote: > Add IIO_ATTR_NAMED macro to use __ATTR_NAMED to allow passing name as > string to IIO_DEVICE_ATTR_NAMED. Change current usage of > IIO_DEVICE_ATTR_NAMED to pass name as string. > > Signed-off-by: Himanshi Jain This version looks ni

Re: [PATCH] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Dan Carpenter
You need a changelog. On Wed, Sep 13, 2017 at 01:34:39PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais > --- > drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/atomisp/pci/atomisp2/c

[PATCH v2] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882

Re: [PATCH] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Allen
>> >> -#define array_length(array) (sizeof(array)/sizeof(array[0])) >> +#define array_length(array) (ARRAY_SIZE(array)) > > Just get rid of this array_length macro and use ARRAY_SIZE() directly. > Sure. - Allen ___ devel mailing list de...@linux

[PATCH v2 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string.

2017-09-13 Thread Himanshi Jain
This patchset is to rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string. Himanshi Jain (2): include: linux: sysfs: Add __ATTR_NAMED macro iio: Change to __ATTR_NAMED() drivers/iio/adc/ad7793.c | 2 +- drivers/staging/iio/adc/ad7192.c | 2 +- drivers/staging/iio/adc/ad7280a

[PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Himanshi Jain
Add __ATTR_NAMED macro similar to __ATTR but taking name as a string instead of implicit conversion of argument to string using the macro _stringify(_name). Signed-off-by: Himanshi Jain --- include/linux/sysfs.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/sysfs.h b/i

[PATCH v2 2/2] iio: Change to __ATTR_NAMED()

2017-09-13 Thread Himanshi Jain
Add IIO_ATTR_NAMED macro to use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED. Change current usage of IIO_DEVICE_ATTR_NAMED to pass name as string. Signed-off-by: Himanshi Jain --- drivers/iio/adc/ad7793.c | 2 +- drivers/staging/iio/adc/ad7192.c | 2 +- driver

Re: [PATCH] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Dan Carpenter
Also change the subject prefix to: [media] atomisp: so it's: Subject: [PATCH v2] [media] atomisp: Use ARRAY_SIZE() instead of open coding it regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.

Re: [PATCH v2] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Dan Carpenter
On Wed, Sep 13, 2017 at 02:09:25PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais This is going through linux-media and maybe they won't insist on some kind of commit message, but I know Greg does. regards, dan carpenter ___ devel mailing list d

Re: [PATCH 2/2] iio: Use __ATTR_NAMED to allow passing name as string to IIO_DEVICE_ATTR_NAMED and change usage to pass string

2017-09-13 Thread himanshi
On Wed, Sep 13, 2017 at 11:12:21AM +0300, Dan Carpenter wrote: > On Wed, Sep 13, 2017 at 01:26:27PM +0530, Himanshi Jain wrote: > > Add IIO_ATTR_NAMED macro to use __ATTR_NAMED to allow passing name as > > string to IIO_DEVICE_ATTR_NAMED. Change current usage of > > IIO_DEVICE_ATTR_NAMED to pass na

Re: [Outreachy kernel] [PATCH v2 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string.

2017-09-13 Thread Julia Lawall
On Wed, 13 Sep 2017, Himanshi Jain wrote: > This patchset is to rewrite the IIO_DEVICE_ATTR_NAMED API to pass name > as string. You need to indicate what has changed in the v2, either here or in the individual patches. julia > > Himanshi Jain (2): > include: linux: sysfs: Add __ATTR_NAMED

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Hans de Goede
Hi, On 13-09-17 00:20, Rob Herring wrote: On Tue, Sep 05, 2017 at 06:42:20PM +0200, Hans de Goede wrote: Add mux support to the fusb302 driver, call devm_tcpc_gen_mux_create() to let the generic tcpc_mux_dev code create a tcpc_mux_dev for us. Also document the mux-names used by the generic tcp

[PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of open coding.

2017-09-13 Thread Allen Pais
Signed-off-by: Allen Pais --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882

Re: [PATCH v2] drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array

2017-09-13 Thread Allen
> > This is going through linux-media and maybe they won't insist on some > kind of commit message, but I know Greg does. Okay. I sent out a V3. -- - Allen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.

Re: [PATCH 1/1] x86/hyper-V: Allocate the IDT entry early in boot

2017-09-13 Thread Ingo Molnar
* KY Srinivasan wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Saturday, September 9, 2017 4:04 AM > > To: KY Srinivasan > > Cc: x...@kernel.org; gre...@linuxfoundation.org; linux- > > ker...@vger.kernel.org; de...@linuxdriverproj

Re: [PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of open coding.

2017-09-13 Thread Dan Carpenter
On Wed, Sep 13, 2017 at 02:27:53PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais Sorry, the patch is right, but the commit is still totally messed up. bad: [PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of open coding. good: [PATCH v4] [media] atomisp: use ARRAY_SIZE

[PATCH v4] [media]atomisp:use ARRAY_SIZE() instead of open coding.

2017-09-13 Thread Allen Pais
The array_length() macro just duplicates ARRAY_SIZE(), so we can delete it. v4: Update the commit message. Signed-off-by: Allen Pais --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/at

Re: [PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of open coding.

2017-09-13 Thread Allen
> bad: [PATCH v3] drivers/staging:[media]atomisp:use ARRAY_SIZE() instead of > open coding. > good: [PATCH v4] [media] atomisp: use ARRAY_SIZE() instead of open coding. My bad. Fixed it in V4. Thanks. - Allen ___ devel mailing list de...@linuxdriverpr

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Rob Herring
On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede wrote: > Hi, > > > On 13-09-17 00:20, Rob Herring wrote: >> >> On Tue, Sep 05, 2017 at 06:42:20PM +0200, Hans de Goede wrote: >>> >>> Add mux support to the fusb302 driver, call devm_tcpc_gen_mux_create() >>> to let the generic tcpc_mux_dev code creat

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Hans de Goede
Hi, On 13-09-17 15:38, Rob Herring wrote: On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede wrote: Hi, On 13-09-17 00:20, Rob Herring wrote: On Tue, Sep 05, 2017 at 06:42:20PM +0200, Hans de Goede wrote: Add mux support to the fusb302 driver, call devm_tcpc_gen_mux_create() to let the gener

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Rob Herring
On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede wrote: > Hi, > > > On 13-09-17 15:38, Rob Herring wrote: >> >> On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede >> wrote: >>> >>> Hi, >>> >>> >>> On 13-09-17 00:20, Rob Herring wrote: On Tue, Sep 05, 2017 at 06:42:20PM +0200, Hans de Goe

Re: [PATCH] staging: rtl8712: Fix unbalanced braces around else statement

2017-09-13 Thread Liam Ryan
On Wed, Sep 13, 2017 at 08:47:39AM +0200, Frans Klaver wrote: > On Tue, Sep 12, 2017 at 2:40 AM, Liam Ryan wrote: > > Fix checkpath-reported unbalanced braces in the following areas > > > > 221: FILE: drivers/staging/rtl8712/hal_init.c:221: > > 392: FILE: drivers/staging/rtl8712/os_intfs.c:392: >

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Hans de Goede
Hi, On 13-09-17 17:07, Rob Herring wrote: On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede wrote: Hi, On 13-09-17 15:38, Rob Herring wrote: On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede wrote: Hi, On 13-09-17 00:20, Rob Herring wrote: On Tue, Sep 05, 2017 at 06:42:20PM +0200, Hans d

Re: [PATCH] staging: rtl8712: Fix unbalanced braces around else statement

2017-09-13 Thread Tobin C. Harding
On Wed, Sep 13, 2017 at 04:14:29PM +0100, Liam Ryan wrote: > On Wed, Sep 13, 2017 at 08:47:39AM +0200, Frans Klaver wrote: > > On Tue, Sep 12, 2017 at 2:40 AM, Liam Ryan wrote: > > > Fix checkpath-reported unbalanced braces in the following areas > > > > > > 221: FILE: drivers/staging/rtl8712/hal_

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Guenter Roeck
On Wed, Sep 13, 2017 at 05:48:25PM +0200, Hans de Goede wrote: > Hi, > > On 13-09-17 17:07, Rob Herring wrote: > >On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede wrote: > >>Hi, > >> > >> > >>On 13-09-17 15:38, Rob Herring wrote: > >>> > >>>On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede > >>>wrote

[PATCH] staging: iio: ade7759: fix signed extension bug on shift of a u8

2017-09-13 Thread Colin King
From: Colin Ian King The current shift of st->rx[2] left shifts a u8 24 bits left, promotes the integer to a an int and then to a unsigned u64. If the top bit of st->rx[2] is set then we end up with all the upper bits being set to 1. Fix this by casting st->rx[2] to a u64 before the 24 bit left s

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Jonathan Cameron
On Wed, 13 Sep 2017 14:14:07 +0530 Himanshi Jain wrote: > Add __ATTR_NAMED macro similar to __ATTR but taking name as a > string instead of implicit conversion of argument to string using > the macro _stringify(_name). > > Signed-off-by: Himanshi Jain > --- > include/linux/sysfs.h | 7 +++

Re: [Outreachy kernel] [PATCH v2 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string.

2017-09-13 Thread Jonathan Cameron
On Wed, 13 Sep 2017 10:46:59 +0200 (CEST) Julia Lawall wrote: > On Wed, 13 Sep 2017, Himanshi Jain wrote: > > > This patchset is to rewrite the IIO_DEVICE_ATTR_NAMED API to pass name > > as string. > > You need to indicate what has changed in the v2, either here or in the > individual patches

RE: [PATCH 1/1] x86/hyper-V: Allocate the IDT entry early in boot

2017-09-13 Thread KY Srinivasan
> -Original Message- > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo > Molnar > Sent: Wednesday, September 13, 2017 2:01 AM > To: KY Srinivasan > Cc: Dan Carpenter ; x...@kernel.org; > gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriver

[PATCH] tools: hv: hv_kvp_daemon: fix usage of realloc()

2017-09-13 Thread Martin Kepplinger
realloc() returns NULL in case it fails. Since we don't save the pointer in question elsewhere, we leak memory by assigning NULL to the original memory in the heap. realloc() doesn't free memory in case of failure, so let's do it manually. Signed-off-by: Martin Kepplinger --- tools/hv/hv_kvp_da

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Greg KH
On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: > On Wed, 13 Sep 2017 14:14:07 +0530 > Himanshi Jain wrote: > > > Add __ATTR_NAMED macro similar to __ATTR but taking name as a > > string instead of implicit conversion of argument to string using > > the macro _stringify(_name).

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Lars-Peter Clausen
On 09/13/2017 08:58 PM, Greg KH wrote: > On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: >> On Wed, 13 Sep 2017 14:14:07 +0530 >> Himanshi Jain wrote: >> >>> Add __ATTR_NAMED macro similar to __ATTR but taking name as a >>> string instead of implicit conversion of argument to str

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Greg KH
On Wed, Sep 13, 2017 at 09:23:31PM +0200, Lars-Peter Clausen wrote: > On 09/13/2017 08:58 PM, Greg KH wrote: > > On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: > >> On Wed, 13 Sep 2017 14:14:07 +0530 > >> Himanshi Jain wrote: > >> > >>> Add __ATTR_NAMED macro similar to __ATTR b

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Dan Carpenter
On Wed, Sep 13, 2017 at 02:29:52PM -0700, Greg KH wrote: > On Wed, Sep 13, 2017 at 09:23:31PM +0200, Lars-Peter Clausen wrote: > > On 09/13/2017 08:58 PM, Greg KH wrote: > > > On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: > > >> On Wed, 13 Sep 2017 14:14:07 +0530 > > >> Himanshi

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Jonathan Cameron
On 13 September 2017 12:23:31 GMT-07:00, Lars-Peter Clausen wrote: >On 09/13/2017 08:58 PM, Greg KH wrote: >> On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote: >>> On Wed, 13 Sep 2017 14:14:07 +0530 >>> Himanshi Jain wrote: >>> Add __ATTR_NAMED macro similar to __ATTR but

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Jonathan Cameron
On 13 September 2017 14:58:23 GMT-07:00, Joe Perches wrote: >On Thu, 2017-09-14 at 00:43 +0300, Dan Carpenter wrote: >> He was exagerating a bit to call it a "static checker" warning... > >Not really. > >False positives and false negatives exist in just about >every static >checker. > >> It's ju

Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Joe Perches
On Thu, 2017-09-14 at 00:43 +0300, Dan Carpenter wrote: > He was exagerating a bit to call it a "static checker" warning... Not really. False positives and false negatives exist in just about every static checker. > It's just checkpatch.pl complaining about adding spaces around the - > operator.

[PATCH] staging: irda: Remove typedef struct

2017-09-13 Thread Haneen Mohammed
This patch remove typedef from a structure with all its ocurrences since using typedefs for structures is discouraged. Issue found using Coccinelle: @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t" or T[-2:] == "_T": coccinelle.T2 = T[:-2];

Re: [Outreachy kernel] Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro

2017-09-13 Thread Julia Lawall
On Wed, 13 Sep 2017, Joe Perches wrote: > On Thu, 2017-09-14 at 00:43 +0300, Dan Carpenter wrote: > > He was exagerating a bit to call it a "static checker" warning... > > Not really. > > False positives and false negatives exist in just about > every static > checker. > > > It's just checkpatch

Re: [Outreachy kernel] [PATCH] staging: irda: Remove typedef struct

2017-09-13 Thread Julia Lawall
On Wed, 13 Sep 2017, Haneen Mohammed wrote: > This patch remove typedef from a structure with all its ocurrences > since using typedefs for structures is discouraged. > Issue found using Coccinelle: > > @r1@ > type T; > @@ > > typedef struct { ... } T; > > @script:python c1@ > T2; > T << r1.T; >