[PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Sudip Mukherjee
parport starts using device-model and we now have parport under /sys/bus. As the ports are discovered they are added as device under /sys/bus/parport. As and when other drivers register new device, they will be registered as a subdevice under the relevant parport. Signed-off-by: Sudip Mukherjee -

[PATCH 0/4] convert parport to device-model

2015-04-15 Thread Sudip Mukherjee
As suggested by Greg, new functions were introduced in the parport subsystem which will use the device-model and we convert the drivers one by one. So accordingly we now have parport_register_drv(), parport_register_dev() and attach_ret() which are using the device-model. And we have a flag to ind

[PATCH 3/4] i2c-parport: use device-model parport

2015-04-15 Thread Sudip Mukherjee
modified the functions to use the new device-model of parport. Signed-off-by: Sudip Mukherjee --- drivers/i2c/busses/i2c-parport.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index a1

[PATCH 2/4] parport: update TODO and documentation

2015-04-15 Thread Sudip Mukherjee
as parport starts using the device-model, update the documentation to show the newly added functions and update TODO with some other planned modifications. Signed-off-by: Sudip Mukherjee --- Documentation/parport-lowlevel.txt | 49 ++ drivers/parport/TODO-parp

[PATCH 4/4] staging: panel: use parport in device-model

2015-04-15 Thread Sudip Mukherjee
modified the required functions to start using the new parport device-model Signed-off-by: Sudip Mukherjee --- drivers/staging/panel/panel.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c ind

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
Sorry, I still haven't done a proper review. On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > +struct pardevice * > +parport_register_dev(struct parport *port, const char *name, > + int (*pf)(void *), void (*kf)(void *), > + void (*irq_func)(void

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > @@ -575,6 +647,7 @@ parport_register_device(struct parport *port, const char > *name, > tmp->irq_func = irq_func; > tmp->waiting = 0; > tmp->timeout = 5 * HZ; > + tmp->devmodel = false; > > /* Chain th

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Sudip Mukherjee
On Wed, Apr 15, 2015 at 11:27:46AM +0300, Dan Carpenter wrote: > Sorry, I still haven't done a proper review. for almost all your points: it came as i copied the parport_register_dev from parport_register_device and just added some part leaving everything else same. I will fix these points in v2 o

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Sudip Mukherjee
On Wed, Apr 15, 2015 at 11:33:59AM +0300, Dan Carpenter wrote: > On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > > > The difference between parport_register_device() and > parport_register_dev() isn't clear from the name. i kept the name similar deliberately as I thought that a

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
On Wed, Apr 15, 2015 at 02:50:55PM +0530, Sudip Mukherjee wrote: > this PARPORT_DEVPROC_REGISTERED flag is cleared in parport_unregister_device() > and is set in parport_register_dev[ice], so when we call > parport_register_device() or parport_register_dev() it will be not set > and the condition w

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Dan Carpenter
On Wed, Apr 15, 2015 at 02:50:55PM +0530, Sudip Mukherjee wrote: > > > > + tmp->name = name; > > > > I wonder who frees this name variable. My concern is that it gets > > freed before we are done using it or something. (I have not looked at > > the details). > it will be done in free_port() the

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Sudip Mukherjee
On Wed, Apr 15, 2015 at 12:45:00PM +0300, Dan Carpenter wrote: > On Wed, Apr 15, 2015 at 02:50:55PM +0530, Sudip Mukherjee wrote: > > > > > > + tmp->name = name; > > > > > > I wonder who frees this name variable. My concern is that it gets > > > freed before we are done using it or somethi

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Greg Kroah-Hartman
On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > parport starts using device-model and we now have parport under > /sys/bus. As the ports are discovered they are added as device under > /sys/bus/parport. As and when other drivers register new device, > they will be registered as a

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Greg Kroah-Hartman
On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > --- a/drivers/parport/share.c > +++ b/drivers/parport/share.c > @@ -10,6 +10,8 @@ > * based on work by Grant Guenther > * and Philip Blundell > * > + * Added Device-Model - Sudip Mukherjee Changelog handles this, n

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Greg Kroah-Hartman
On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > @@ -29,6 +31,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -100,6 +103,11 @@ static struct parport_operations dead_ops = { > .owner = NULL, > }; > > +struct bus_type pa

Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel

2015-04-15 Thread Sudip Mukherjee
On Wed, Apr 15, 2015 at 03:31:15PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 15, 2015 at 01:18:41PM +0530, Sudip Mukherjee wrote: > > @@ -29,6 +31,7 @@ > > +struct bus_type parport_bus_type = { > > + .name = "parport", > > +}; > > +EXPORT_SYMBOL(parport_bus_type); > > They bus ty

Re: [PATCH v2 10/21] staging: rtl8192e: replace memcpy() -> ether_addr_copy_unaligned()

2015-04-15 Thread Mateusz Kulikowski
On 14.04.2015 10:00, Dan Carpenter wrote: > BAReq->addr1 is part of struct rtllib_hdr_2addr. It's 4 bytes into > the struct so it's fine. You're right - should I explicitly add __aligned() in such places or just leave comment in that case (for future commiters)? > I sort of like the ether_addr_c

Re: [PATCH v2 13/21] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings

2015-04-15 Thread Mateusz Kulikowski
On 14.04.2015 10:07, Dan Carpenter wrote: > On Mon, Apr 13, 2015 at 11:47:36PM +0200, Mateusz Kulikowski wrote: >> Fix most of remaining PREFER_PR_LEVEL warnings in rtllib. >> Replace printk() with pr_* where possible. (...) >> #define RTLLIB_DEBUG_DATA(level, data, datalen) \ >> do {

Re: [PATCH v2 10/21] staging: rtl8192e: replace memcpy() -> ether_addr_copy_unaligned()

2015-04-15 Thread Joe Perches
On Wed, 2015-04-15 at 23:08 +0200, Mateusz Kulikowski wrote: > - Discuss and try to submit ether_addr_copy_unaligned on netdev list I've no issue with a patch that does that. https://lkml.org/lkml/2014/1/20/338 ___ devel mailing list de...@linuxdriver

Re: [PATCH v2 15/21] staging: rtl8192e: Fix LONG_LINE warnings - modify variables

2015-04-15 Thread Mateusz Kulikowski
On 14.04.2015 10:40, Dan Carpenter wrote: > On Mon, Apr 13, 2015 at 11:47:38PM +0200, Mateusz Kulikowski wrote: >> +if (*rfa_pti_r > 4) { >> +(*rfa_pti_r)--; > > > Honestly, I thought that patch 14 was too hard to review and did too > many things, b