Re: [PATCH 01/27] drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct braces

2018-05-15 Thread Greg KH
On Mon, May 14, 2018 at 10:24:08PM +0100, John Whitmore wrote: > Coding style edit to clear the checkpatch.pl errors of the type: > ERROR: that open brace { should be on the previous line > > Signed-off-by: John Whitmore > --- Any reason why your subject line has the full path and not the shorte

Re: [PATCH 3/5] dt-bindings: add compatible string for 'mtk' MediaTek

2018-05-15 Thread Greg KH
On Mon, May 14, 2018 at 04:02:32PM +0200, Sergio Paracuellos wrote: > There is a complain of checkpatch script about the not documented > DT compatible string for vendor "mtk". Add it to vendor-prefixes.txt > file. > > Signed-off-by: Sergio Paracuellos > --- > Documentation/devicetree/bindings/v

Re: [PATCH 4/5] dt-bindings: gpio: add documentation for mt7621-gpio

2018-05-15 Thread Greg KH
On Mon, May 14, 2018 at 04:02:33PM +0200, Sergio Paracuellos wrote: > This commit add missing dt bindings documentation for mt7621-gpio > driver. After this checkpatch script complain about this > issue dissapears. > > Signed-off-by: Sergio Paracuellos > --- > .../devicetree/bindings/gpio/mtk,mt

Re: [PATCH v2 3/5] dt-bindings: add compatible string for 'mtk' MediaTek

2018-05-15 Thread Greg KH
On Tue, May 15, 2018 at 06:49:55AM +0200, Sergio Paracuellos wrote: > There is a complain of checkpatch script about the not documented > DT compatible string for vendor "mtk". Add it to vendor-prefixes.txt > file. > > Signed-off-by: Sergio Paracuellos > --- > Documentation/devicetree/bindings/v

Re: [PATCH v2 0/5] staging: mt7621-gpio: some driver cleanups

2018-05-15 Thread Greg KH
On Tue, May 15, 2018 at 04:18:56PM +1000, NeilBrown wrote: > On Tue, May 15 2018, Sergio Paracuellos wrote: > > > The following patch series fix some checkpatch complains > > about this driver. There is still some complains about dt-bindings > > not being added to its correct Documentation place i

Re: [PATCH v2 5/5] staging: mt7621-gpio: update TODO file

2018-05-15 Thread Greg KH
On Tue, May 15, 2018 at 06:49:57AM +0200, Sergio Paracuellos wrote: > This commit updates TODO file with missing things to > get this driver ready to be mainlined. > > Signed-off-by: Sergio Paracuellos > Reviewed-by: NeilBrown > --- > drivers/staging/mt7621-gpio/TODO | 3 ++- > 1 file changed,

Re: [PATCH v2 1/5] staging: lustre: llite: add support set_acl method in inode operations

2018-05-15 Thread Greg Kroah-Hartman
On Tue, May 15, 2018 at 01:53:02PM +1000, NeilBrown wrote: > On Mon, May 14 2018, James Simmons wrote: > > > From: Dmitry Eremin > > > > Linux kernel v3.14 adds set_acl method to inode operations. > > This patch adds support to Lustre for proper acl management. > > > > Signed-off-by: Dmitry Eremi

Re: [PATCH] Drivers: hv: vmbus: Removed an unnecessary cast from void *

2018-05-15 Thread 'gre...@linuxfoundation.org'
On Tue, May 15, 2018 at 12:25:01AM +, Dexuan Cui wrote: > > In C, we don't need such a cast. > > Fixes: ae20b254306a ("Drivers: hv: vmbus: enable VMBus protocol version 5.0") > Signed-off-by: Dexuan Cui > Cc: Stephen Hemminger Should be "Reported-by:", I'll go edit this by hand :( ___

Re: [PATCH] Drivers: hv: vmbus: Removed an unnecessary cast from void *

2018-05-15 Thread 'gre...@linuxfoundation.org'
On Tue, May 15, 2018 at 12:25:01AM +, Dexuan Cui wrote: > > In C, we don't need such a cast. > > Fixes: ae20b254306a ("Drivers: hv: vmbus: enable VMBus protocol version 5.0") > Reported-by: Stephen Hemminger > Signed-off-by: Dexuan Cui > Cc: K. Y. Srinivasan > --- > > Thanks Stephen Hemmi

Re: [PATCH 03/14] staging: clocking-wizard: Split probe function

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 05:30:15AM +1000, James Kelly wrote: > Dan, > > > On 14 May 2018, at 11:47 pm, Dan Carpenter wrote: > > > > On Mon, May 07, 2018 at 11:20:29AM +1000, James Kelly wrote: > >> +static int clk_wzrd_probe(struct platform_device *pdev) > >> +{ > >> + int ret; > >> + struct d

[PATCH] staging: wlan-ng: fix coding style issues in p80211netdev.h

2018-05-15 Thread Tim Collier
Fix two issues with parameters not aligned to opening parenthesis, as reported by checkpatch. File is now clean for checkpatch. Signed-off-by: Tim Collier --- drivers/staging/wlan-ng/p80211netdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/

Re: [PATCH 10/14] staging: clocking-wizard: Support clk_round_rate

2018-05-15 Thread Dan Carpenter
On Mon, May 07, 2018 at 11:20:36AM +1000, James Kelly wrote: > @@ -463,6 +549,16 @@ static int clk_wzrd_debug_init(struct clk_hw *hw, struct > dentry *dentry) > struct dentry *d; > struct clk_wzrd_clk_data *cwc = to_clk_wzrd_clk_data(hw); > > + d = debugfs_create_u16("clk_ratio_m

Re: [PATCH 10/14] staging: clocking-wizard: Support clk_round_rate

2018-05-15 Thread Greg Kroah-Hartman
On Tue, May 15, 2018 at 10:52:58AM +0300, Dan Carpenter wrote: > On Mon, May 07, 2018 at 11:20:36AM +1000, James Kelly wrote: > > @@ -463,6 +549,16 @@ static int clk_wzrd_debug_init(struct clk_hw *hw, > > struct dentry *dentry) > > struct dentry *d; > > struct clk_wzrd_clk_data *cwc = to_c

Re: [PATCH 3/5] dt-bindings: add compatible string for 'mtk' MediaTek

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 09:24:30AM +0200, Greg KH wrote: > On Mon, May 14, 2018 at 04:02:32PM +0200, Sergio Paracuellos wrote: > > There is a complain of checkpatch script about the not documented > > DT compatible string for vendor "mtk". Add it to vendor-prefixes.txt > > file. > > > > Signed-off

Re: [PATCH 03/30] staging: wilc1000: fix line over 80 chars in handle_key()

2018-05-15 Thread Dan Carpenter
On Thu, May 10, 2018 at 08:21:52AM +0300, Claudiu Beznea wrote: > >>> + wid.val = (s8 *)key_buf; > >> > >> Is this cast really needed? > >> > > > > This patch is only to address line over 80 chars checkpatch issue. > > It is not good to club these change with type cast related > > modification.

Re: [PATCH 4/5] dt-bindings: gpio: add documentation for mt7621-gpio

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 09:25:06AM +0200, Greg KH wrote: > On Mon, May 14, 2018 at 04:02:33PM +0200, Sergio Paracuellos wrote: > > This commit add missing dt bindings documentation for mt7621-gpio > > driver. After this checkpatch script complain about this > > issue dissapears. > > > > Signed-off

Re: [PATCH v2 5/5] staging: mt7621-gpio: update TODO file

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 09:29:04AM +0200, Greg KH wrote: > On Tue, May 15, 2018 at 06:49:57AM +0200, Sergio Paracuellos wrote: > > This commit updates TODO file with missing things to > > get this driver ready to be mainlined. > > > > Signed-off-by: Sergio Paracuellos > > Reviewed-by: NeilBrown

[PATCH 2/4] staging: mt7621-gpio: update TODO file

2018-05-15 Thread Sergio Paracuellos
This commit updates TODO file with missing things to get this driver ready to be mainlined. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/TODO | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/TODO b/drivers/staging/mt7621-gpio

[PATCH 3/4] staging: mt7621-dts: update gpios related entries to use 'mediatek'

2018-05-15 Thread Sergio Paracuellos
Gpio driver for mt7621 is using 'mtk' as binding but in the kernel is already defined one for this maker which is 'mediatek'. Update device tree to use the correct one. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 8 1 file changed, 4 insertions(+), 4 d

[PATCH 0/4] staging: mt7621-gpio: use mediatek as binding instead of custom mtk

2018-05-15 Thread Sergio Paracuellos
The following series updated mt7621-gpio driver to use 'mediatek' which is already defined in kernel bindings documentation instead of add a new custom one 'mtk' for this company. mt7621-gpio device-tree documentation has been added also but there some missing stuff about gpio interrupts which i

[PATCH 1/4] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio

2018-05-15 Thread Sergio Paracuellos
This commit add missing dt bindings documentation for mt7621-gpio driver. There is some missing stuff here about interrupts with is not also being used in the mt7621.dtsi file. So just include in staging a incomplete version before moving this to kernel's dt-bindings place. Signed-off-by: Sergio P

[PATCH 4/4] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek'

2018-05-15 Thread Sergio Paracuellos
Gpio driver is using mtk and there is already 'mediatek' binding defined for this maker. Update driver to use it instead the custom one 'mtk'. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

Re: [PATCH 24/30] staging: wilc1000: refactor del_station() to avoid parenthesis misalignment

2018-05-15 Thread Dan Carpenter
I feel sort of bad complaining about this patchset when your co-workers already nit picked it to death... :P On Mon, May 07, 2018 at 02:13:28PM +0530, Ajay Singh wrote: > Refactor the code to fix open parenthesis alignment issue reported by > checkpatch.pl script in del_station(). I no idea what

Re: [PATCH 13/15] staging: bcm2835-camera: Fix warnings about string ops on v4l2 uapi.

2018-05-15 Thread Dan Carpenter
Not related to the patch, but that's weird. I get that it's part of the user API now, but why it u8 and can't it be changed? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/list

Re: [PATCH] Staging:Comedi:comedi_compat32.c: Lindent changes

2018-05-15 Thread Ian Abbott
On 15/05/18 06:20, Pratik Jain wrote: Recommended indentation by Lindent on file comedi_compat32.c Signed-off-by: Pratik Jain --- drivers/staging/comedi/comedi_compat32.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/comedi_compat32.c

Re: [PATCH v2 11/11] docs: fix broken references with multiple hints

2018-05-15 Thread Bartlomiej Zolnierkiewicz
On Wednesday, May 09, 2018 10:18:54 AM Mauro Carvalho Chehab wrote: > The script: > ./scripts/documentation-file-ref-check --fix-rst > > Gives multiple hints for broken references on some files. > Manually use the one that applies for some files. > > Signed-off-by: Mauro Carvalho Chehab A

Re: [PATCH v2 1/5] staging: lustre: llite: add support set_acl method in inode operations

2018-05-15 Thread Dan Carpenter
On Mon, May 14, 2018 at 10:16:59PM -0400, James Simmons wrote: > +#ifdef CONFIG_FS_POSIX_ACL > struct posix_acl *ll_get_acl(struct inode *inode, int type) > { > struct ll_inode_info *lli = ll_i2info(inode); > @@ -3043,6 +3044,64 @@ struct posix_acl *ll_get_acl(struct inode *inode, int > ty

Re: [PATCH 24/30] staging: wilc1000: refactor del_station() to avoid parenthesis misalignment

2018-05-15 Thread Ajay Singh
Hi Dan, On Tue, 15 May 2018 12:01:12 +0300 Dan Carpenter wrote: > I feel sort of bad complaining about this patchset when your > co-workers already nit picked it to death... :P > > On Mon, May 07, 2018 at 02:13:28PM +0530, Ajay Singh wrote: > > Refactor the code to fix open parenthesis alignme

Re: [PATCH] staging: speakup: use true/false instead of 1/0

2018-05-15 Thread Dan Carpenter
On Mon, May 14, 2018 at 10:57:25PM +0200, Samuel Thibault wrote: > Signed-off-by: Samuel Thibault Greg doesn't accept patches without a commit message. Just say which tool warned for example. regards, dan carpenter ___ devel mailing list de...@linuxd

Re: [PATCH] staging: bcm2835-camera: Replace open-coded idr with a struct idr.

2018-05-15 Thread Dan Carpenter
On Thu, May 10, 2018 at 04:31:07PM -0700, Eric Anholt wrote: > @@ -258,32 +181,40 @@ get_msg_context(struct vchiq_mmal_instance *instance) > if (!msg_context) > return ERR_PTR(-ENOMEM); > > - msg_context->instance = instance; > - msg_context->handle = > - m

[PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Sergio Paracuellos
Gpio driver have a some globals which can be avoided just using platform_data in a proper form. This commit adds a new struct mtk_data which includes all of those globals setting them using platform_set_drvdata and devm_gpiochip_add_data functions. With this properly set we are able to retrieve dri

Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0

2018-05-15 Thread Dan Carpenter
On Mon, May 14, 2018 at 11:17:55AM -0700, Stephen Hemminger wrote: > On Mon, 14 May 2018 18:14:15 + > Dexuan Cui wrote: > > > > From: devel On Behalf Of > > > Stephen Hemminger > > > Sent: Sunday, May 13, 2018 10:24 > > > > ... > > > > @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer,

Re: [PATCH 04/23] staging: ks7010: change cast from uint16_t to u16

2018-05-15 Thread Dan Carpenter
On Sun, May 13, 2018 at 08:35:39PM +0200, Sergio Paracuellos wrote: > Header size and event fields of header are declared > as __le16 and being casted using uint16_t in cpu_to_le16. > Change cast to use preferred u16. > > Signed-off-by: Sergio Paracuellos > --- > drivers/staging/ks7010/ks7010_sd

Re: [PATCH] staging: bcm2835-camera: Replace open-coded idr with a struct idr.

2018-05-15 Thread Eric Anholt
Dan Carpenter writes: > On Thu, May 10, 2018 at 04:31:07PM -0700, Eric Anholt wrote: >> @@ -258,32 +181,40 @@ get_msg_context(struct vchiq_mmal_instance *instance) >> if (!msg_context) >> return ERR_PTR(-ENOMEM); >> >> -msg_context->instance = instance; >> -msg_context

Re: [PATCH 06/23] staging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate

2018-05-15 Thread Dan Carpenter
None of these casts are required. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 06/40] proc: introduce proc_create_single{,_data}

2018-05-15 Thread Christoph Hellwig
On Thu, Apr 26, 2018 at 11:45:50AM +1000, Finn Thain wrote: > > > > -/* > > - * /proc/nubus stuff > > - */ > > - > > I don't think that the introduction of proc_create_single{,_data} alters > the value of that comment. That comment and similar comments in the same > file do have a purpose, whi

Re: simplify procfs code for seq_file instances V2

2018-05-15 Thread Christoph Hellwig
On Sun, May 06, 2018 at 08:19:49PM +0300, Alexey Dobriyan wrote: > On Wed, Apr 25, 2018 at 05:47:47PM +0200, Christoph Hellwig wrote: > > Changes since V1: > > - open code proc_create_data to avoid setting not fully initialized > >entries live > > - use unsigned int for state_size > > Need t

Re: [PATCH 11/23] staging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request

2018-05-15 Thread Dan Carpenter
We should remove a whole ball of casting really. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 22/23] staging: ks7010: use 'u16' for casts in assignments in hostif_sme_set_rsn

2018-05-15 Thread Dan Carpenter
On Sun, May 13, 2018 at 08:35:57PM +0200, Sergio Paracuellos wrote: > @@ -1619,7 +1619,7 @@ static void hostif_sme_set_rsn(struct ks_wlan_private > *priv, int type) > > switch (type) { > case SME_RSN_UCAST_REQUEST: > - wpa_suite.size = cpu_to_le16((uint16_t)1); > +

Re: [PATCH 34/40] atm: simplify procfs code

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:51:18AM -0500, Eric W. Biederman wrote: > Christoph Hellwig writes: > > > Use remove_proc_subtree to remove the whole subtree on cleanup, and > > unwind the registration loop into individual calls. Switch to use > > proc_create_seq where applicable. > > Can you please

Re: [PATCH 23/23] staging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa

2018-05-15 Thread Dan Carpenter
cpu_to_le16() already has a cast to u16 built in, so the cast is never required. Generally, the reason that you would cast something to a type smaller than int is when you want to truncate away the high bits. But if you're dealing with sizes and you truncate away bits, that's pretty dangerous. Re

Re: [PATCH 04/40] proc: introduce proc_create_seq{,_data}

2018-05-15 Thread Christoph Hellwig
On Mon, Apr 30, 2018 at 02:19:25PM +0100, David Howells wrote: > Christoph Hellwig wrote: > > > + > > +struct proc_dir_entry *proc_create_seq_data(const char *name, umode_t mode, > > + struct proc_dir_entry *parent, const struct seq_operations *ops, > > + void *data) > > +{ >

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Dan Carpenter
Not related to your patch... On Tue, May 15, 2018 at 02:14:02PM +0200, Sergio Paracuellos wrote: > static int > mediatek_gpio_bank_probe(struct platform_device *pdev, struct device_node > *bank) > { > + struct mtk_data *gpio_data = dev_get_drvdata(&pdev->dev); > const __be32 *id = of

Re: [PATCH 11/40] ipv6/flowlabel: simplify pid namespace lookup

2018-05-15 Thread Christoph Hellwig
On Sat, May 05, 2018 at 07:37:33AM -0500, Eric W. Biederman wrote: > Christoph Hellwig writes: > > > The shole seq_file sequence already operates under a single RCU lock pair, > > so move the pid namespace lookup into it, and stop grabbing a reference > > and remove all kinds of boilerplate code.

Re: [PATCH v2 11/11] docs: fix broken references with multiple hints

2018-05-15 Thread Steven Rostedt
On Wed, 9 May 2018 10:18:54 -0300 Mauro Carvalho Chehab wrote: > diff --git a/Documentation/trace/events.rst b/Documentation/trace/events.rst > index 7b6b1236ec2e..c292117b83a9 100644 > --- a/Documentation/trace/events.rst > +++ b/Documentation/trace/events.rst > @@ -8,7 +8,7 @@ Event Tracing >

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 05:45:03PM +0300, Dan Carpenter wrote: > Normally I would say just change > to >= but > we're not using the first element of the gc_map[] array so perhaps we > intended to subtract one? Oh. We do use the first element. My bad. I got confused between "id" and "*id". My b

Re: [PATCH v2 1/5] staging: lustre: llite: add support set_acl method in inode operations

2018-05-15 Thread James Simmons
> On Mon, May 14, 2018 at 10:16:59PM -0400, James Simmons wrote: > > +#ifdef CONFIG_FS_POSIX_ACL > > struct posix_acl *ll_get_acl(struct inode *inode, int type) > > { > > struct ll_inode_info *lli = ll_i2info(inode); > > @@ -3043,6 +3044,64 @@ struct posix_acl *ll_get_acl(struct inode *inode

Re: [PATCH v2 1/5] staging: lustre: llite: add support set_acl method in inode operations

2018-05-15 Thread James Simmons
> On Mon, May 14 2018, James Simmons wrote: > > > From: Dmitry Eremin > > > > Linux kernel v3.14 adds set_acl method to inode operations. > > This patch adds support to Lustre for proper acl management. > > > > Signed-off-by: Dmitry Eremin > > Signed-off-by: John L. Hammond > > Signed-off-by:

Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-15 Thread James Simmons
> > /* > > * Allocate new object. This may result in rather complicated > > * operations, including fld queries, inode loading, etc. > > */ > > o = lu_object_alloc(env, dev, f, conf); > > - if (IS_ERR(o)) > > + if (unlikely(IS_ERR(o))) > > return o; > > >

Re: [PATCH 04/23] staging: ks7010: change cast from uint16_t to u16

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 3:41 PM, Dan Carpenter wrote: > On Sun, May 13, 2018 at 08:35:39PM +0200, Sergio Paracuellos wrote: >> Header size and event fields of header are declared >> as __le16 and being casted using uint16_t in cpu_to_le16. >> Change cast to use preferred u16. >> >> Signed-off-by:

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 4:45 PM, Dan Carpenter wrote: > Not related to your patch... > > On Tue, May 15, 2018 at 02:14:02PM +0200, Sergio Paracuellos wrote: >> static int >> mediatek_gpio_bank_probe(struct platform_device *pdev, struct device_node >> *bank) >> { >> + struct mtk_data *gpio_

Re: [PATCH 11/23] staging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request

2018-05-15 Thread Sergio Paracuellos
On Tue, May 15, 2018 at 3:59 PM, Dan Carpenter wrote: > We should remove a whole ball of casting really. I will. > > regards, > dan carpenter > Best regards, Sergio Paracuellos ___ devel mailing list de...@linuxdriverproject.org http://driverdev.l

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread NeilBrown
On Tue, May 15 2018, Sergio Paracuellos wrote: > Gpio driver have a some globals which can be avoided just > using platform_data in a proper form. This commit adds a new > struct mtk_data which includes all of those globals setting them > using platform_set_drvdata and devm_gpiochip_add_data funct

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Sergio Paracuellos
On Wed, May 16, 2018 at 09:59:09AM +1000, NeilBrown wrote: > On Tue, May 15 2018, Sergio Paracuellos wrote: > > > Gpio driver have a some globals which can be avoided just > > using platform_data in a proper form. This commit adds a new > > struct mtk_data which includes all of those globals setti

[PATCH v2 08/11] staging: mt7621-gpio: avoid devm_kzalloc() hidden inside declarations

2018-05-15 Thread Sergio Paracuellos
Driver probe function includes a allocation using devm_kzalloc which is "hidden" a bit inside the declarations. Extract this to a better place to increase readability. Also because we are allocating zeroed memory 'memset' statement is not needed at all. Signed-off-by: Sergio Paracuellos --- driv

[PATCH v2 06/11] staging: mt7621-dts: add interrupt device tree nodes for the gpio controller

2018-05-15 Thread Sergio Paracuellos
The GPIO controller of mt7621 can receive interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU using GIC INT12. Update device tree accordly. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --g

[PATCH v2 05/11] staging: mt7621-gpio: avoid use of globals and use platform_data instead

2018-05-15 Thread Sergio Paracuellos
Gpio driver have a some globals which can be avoided just using platform_data in a proper form. This commit adds a new struct mtk_data which includes all of those globals setting them using platform_set_drvdata and devm_gpiochip_add_data functions. With this properly set we are able to retrieve dri

[PATCH v2 10/11] staging: mt7621-gpio: use MTK_BANK_WIDTH instead of magic number

2018-05-15 Thread Sergio Paracuellos
There are some places where magic number '32' is being used to get the gpio bank. There already exist a definition MTK_BANK_WIDTH with this value, so just use it instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v2 00/11] staging: mt7621-gpio: use mediatek as binding instead of custom mtk

2018-05-15 Thread Sergio Paracuellos
The following series updated mt7621-gpio driver to use 'mediatek' which is already defined in kernel bindings documentation instead of add a new custom one 'mtk' for this company. mt7621-gpio device-tree documentation has been added also to the staging driver directory. v2: - Join some patch ("st

[PATCH v2 01/11] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio

2018-05-15 Thread Sergio Paracuellos
This commit add missing dt bindings documentation for mt7621-gpio driver. There is some missing stuff here about interrupts with is not also being used in the mt7621.dtsi file. So just include in staging a incomplete version before moving this to kernel's dt-bindings place. Signed-off-by: Sergio P

[PATCH v2 09/11] staging: mt7621-gpio: use ternary operator in return in mediatek_gpio_get_direction

2018-05-15 Thread Sergio Paracuellos
This commits replaces if statement and two returns in favour of a only one return using a ternary operator. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7

[PATCH v2 04/11] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek'

2018-05-15 Thread Sergio Paracuellos
Gpio driver is using mtk and there is already 'mediatek' binding defined for this maker. Update driver to use it instead the custom one 'mtk'. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH v2 07/11] staging: mt7621-gpio: dt-bindings: add interrupt nodes to bindings doc

2018-05-15 Thread Sergio Paracuellos
Interrupt related stuff for gpio controller in mt7621 was missing in device tree documentation. Add it to complete documentation for this driver. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(

[PATCH v2 02/11] staging: mt7621-gpio: update TODO file

2018-05-15 Thread Sergio Paracuellos
This commit updates TODO file with missing things to get this driver ready to be mainlined. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/TODO | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/TODO b/drivers/staging/mt7621-gpio

[PATCH v2 03/11] staging: mt7621-dts: update gpios related entries to use 'mediatek'

2018-05-15 Thread Sergio Paracuellos
Gpio driver for mt7621 is using 'mtk' as binding but in the kernel is already defined one for this maker which is 'mediatek'. Update device tree to use the correct one. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 8 1 file changed, 4 insertions(+), 4 d

[PATCH v2 11/11] staging: mt7621-gpio: update TODO list

2018-05-15 Thread Sergio Paracuellos
Some of the remaining stuff included in TODO list have been complete. So update this file accordly. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/TODO | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/mt7621-gpio/TODO b/drivers/staging/mt7621-gpio/TODO ind

Re: [PATCH] staging: mt7621-gpio: avoid use of globals and use a drvdata allocated structure

2018-05-15 Thread Sergio Paracuellos
On Wed, May 16, 2018 at 09:59:09AM +1000, NeilBrown wrote: > On Tue, May 15 2018, Sergio Paracuellos wrote: > > > Gpio driver have a some globals which can be avoided just > > using platform_data in a proper form. This commit adds a new > > struct mtk_data which includes all of those globals setti