Re: [PATCH 1/2] drivers:staging:silicom: Fixed MACRO and Extern Coding style warnings and errors

2014-02-11 Thread Dan Carpenter
On Mon, Feb 10, 2014 at 10:54:00PM -0800, Surendra Patil wrote:
> Fixed MACRO and Extern Coding style warnings and errors - listed only few
> bpctl_mod.c:120: WARNING: externs should be avoided in .c files
> bpctl_mod.c:121: WARNING: externs should be avoided in .c files
> bpctl_mod.c:122: WARNING: externs should be avoided in .c files
> bpctl_mod.c:124: WARNING: externs should be avoided in .c files
> bpctl_mod.c:125: WARNING: externs should be avoided in .c files
> bp_ioctl.h:54: ERROR: Macros with complex values should be enclosed in 
> parenthesis
> bp_ioctl.h:159: ERROR: Macros with complex values should be enclosed in 
> parenthesis
> 

This isn't the right way to do things...

Summary:
1) This patch tries to do too many things at one time.
2) The changelog is not right.
3) It breaks the build and then fixes it in a later patch.

The rule on patches is that it should do only one thing at a time.  But
deciding what "one thing" means is complicated.  You have said that one
thing is "Fix coding style".  That works if the changes are very minor,
but in this case they are complicated.  You have only listed a few of
the things you have done because there are so many.  That means it is
complicated.

The change log is not right.  The explanation of how you fixed the
"externs should be avoided in .c files" needs to be explained like this:

Checkpatch warns about:

WARNING: externs should be avoided in .c files

because we have function declarations in a .c file.  These
functions are not used anywhere else so I have made them static.

Changelogs should tell a story.

Finally, the patch breaks the build and then fixes it in [patch 2/2].
That's not ok.  We need to be able to bisect the patch so it should be
included with the changes to the .c file.

So break it up like this:
[patch 1/2] Staging: silicom: make some functions static
[patch 2/2] Staging: silicom: minor checkpatch.pl fixes

regards,
dan carpenter


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] x86, hyperv: bypass the timer_irq_works() check

2014-02-11 Thread Jason Wang
On 01/26/2014 12:42 PM, Jason Wang wrote:
> On 01/25/2014 05:20 AM, H. Peter Anvin wrote:
>> On 01/23/2014 10:02 PM, Jason Wang wrote:
>>> This patch bypass the timer_irq_works() check for hyperv guest since:
>>>
>>> - It was guaranteed to work.
>>> - timer_irq_works() may fail sometime due to the lpj calibration were 
>>> inaccurate
>>>   in a hyperv guest or a buggy host.
>>>
>>> In the future, we should get the tsc frequency from hypervisor and use 
>>> preset
>>> lpj instead.
>>>
>>> Cc: K. Y. Srinivasan 
>>> Cc: Haiyang Zhang 
>>> Signed-off-by: Jason Wang 
>> This should be in -stable, right?
>>
>>  -hpa
>>
>>
> Oh, right.
>
> Cc: 

Ping, need I resend the patch or it's ok for you to apply?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC PATCH 2/3] staging: imx-drm-core: Use graph to find connection between crtc and encoder

2014-02-11 Thread Dan Carpenter
> Why is this loop soo complicated?  Why do you need to mess around with
> this "last_ep" stuff - you don't actually end up using it.
> 
> The loop reduces down to this without comments:
> 
>   for (i = 0; !ret; i++) {

Philipp, "ret" isn't set anymore in the new loop.

>   uint32_t mask;
> 
>   ep = v4l2_of_get_next_endpoint(np, last_ep);
>   if (!ep)
>   break;
> 
>   /* CSI */
>   mask = imx_drm_find_crtc_mask(imxdrm, ep);
>   of_node_put(ep);
> 
>   if (mask == 0)
>   return -EPROBE_DEFER;
> 
>   crtc_mask |= mask;
>   }

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC PATCH 2/3] staging: imx-drm-core: Use graph to find connection between crtc and encoder

2014-02-11 Thread Philipp Zabel
Hi Dan,

Am Dienstag, den 11.02.2014, 11:38 +0300 schrieb Dan Carpenter:
> > Why is this loop soo complicated?  Why do you need to mess around with
> > this "last_ep" stuff - you don't actually end up using it.
> > 
> > The loop reduces down to this without comments:
> > 
> > for (i = 0; !ret; i++) {
> 
> Philipp, "ret" isn't set anymore in the new loop.

thanks, I'll drop ret in the next version.

regards
Philipp

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver

2014-02-11 Thread Roger

On 02/10/2014 10:58 PM, Ulf Hansson wrote:

On 6 February 2014 15:35,   wrote:

From: Roger Tseng 

Realtek USB SD/MMC host driver provides mmc host support based on the Realtek
USB card reader MFD driver.

Signed-off-by: Roger Tseng 
---
  drivers/mmc/host/Kconfig  |7 +
  drivers/mmc/host/Makefile |1 +
  drivers/mmc/host/rtsx_usb_sdmmc.c | 1500 +
  3 files changed, 1508 insertions(+)
  create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c

[snip]

+#ifdef CONFIG_PM_RUNTIME


There are stubs for pm_runtime* functions, thus the ifdefs can be removed.
Please go though the complete patch and remove all instances.


+   pm_runtime_put(sdmmc_dev(host));


I don't know so much about USB mmc hosts hardware, but I just wanted
to find out if I have understood this correct.

You can't do fine grained power management of the USB parent device,
since it needs to be runtime resumed to be able keep the power the
card? Once it becomes runtime suspended, the power to the card will
thus also be dropped?


Yes, and to keep some internal state of the controller.

[snip]

+#ifdef CONFIG_PM


I suppose this should be CONFIG_PM_SLEEP?


...

+   err = mmc_suspend_host(mmc);


This won't compile. The mmc_suspend_host API has been removed.


...

+   return mmc_resume_host(mmc);


This won't compile. The mmc_resume_host API has been removed.


...

+static struct platform_driver rtsx_usb_sdmmc_driver = {
+   .probe  = rtsx_usb_sdmmc_drv_probe,
+   .remove = rtsx_usb_sdmmc_drv_remove,
+   .id_table   = rtsx_usb_sdmmc_ids,
+   .suspend= rtsx_usb_sdmmc_suspend,
+   .resume = rtsx_usb_sdmmc_resume,


Please use the modern pm_ops instead of the legacy suspend/resume callbacks.
I suggest you then also switch to use the SIMPLE_DEV_PM_OPS macro.


I just missed the removal of mmc_suspend|resume_host.

I'll remove all these unnecessary mmc host pm things as done in commit 
ff71c4bcb0af2730d047989e485303ae4e1ce794 for drivers of our PCIe devices.


Thanks for pointing this out.


Kind regards
Ulf Hansson

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/3] mfd: Add realtek USB card reader driver

2014-02-11 Thread Roger

On 02/10/2014 07:30 PM, Lee Jones wrote:

From: Roger Tseng 

Realtek USB card reader provides a channel to transfer command or data to flash
memory cards. This driver exports host instances for mmc and memstick subsystems
and handles basic works.

Signed-off-by: Roger Tseng 
---
  drivers/mfd/Kconfig  |  10 +
  drivers/mfd/Makefile |   1 +
  drivers/mfd/rtsx_usb.c   | 760 +++
  include/linux/mfd/rtsx_usb.h | 628 +++
  4 files changed, 1399 insertions(+)
  create mode 100644 drivers/mfd/rtsx_usb.c
  create mode 100644 include/linux/mfd/rtsx_usb.h


Applied with Greg's Ack.

Thanks. But I have to modify some places in PATCH 2/3 and 3/3 according 
to Ulf's suggestion. I will resend v4 later but currently I don't plan 
to change the 1/3 part(for mfd) in it.


Would you wait for and re-apply the v4 submission or give any advice?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver

2014-02-11 Thread Ulf Hansson
On 11 February 2014 10:27, Roger  wrote:
> On 02/10/2014 10:58 PM, Ulf Hansson wrote:
>>
>> On 6 February 2014 15:35,   wrote:
>>>
>>> From: Roger Tseng 
>>>
>>> Realtek USB SD/MMC host driver provides mmc host support based on the
>>> Realtek
>>> USB card reader MFD driver.
>>>
>>> Signed-off-by: Roger Tseng 
>>> ---
>>>   drivers/mmc/host/Kconfig  |7 +
>>>   drivers/mmc/host/Makefile |1 +
>>>   drivers/mmc/host/rtsx_usb_sdmmc.c | 1500
>>> +
>>>   3 files changed, 1508 insertions(+)
>>>   create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c
>
> [snip]
>
>>> +#ifdef CONFIG_PM_RUNTIME
>>
>>
>> There are stubs for pm_runtime* functions, thus the ifdefs can be removed.
>> Please go though the complete patch and remove all instances.
>>
>>> +   pm_runtime_put(sdmmc_dev(host));
>>
>>
>> I don't know so much about USB mmc hosts hardware, but I just wanted
>> to find out if I have understood this correct.
>>
>> You can't do fine grained power management of the USB parent device,
>> since it needs to be runtime resumed to be able keep the power the
>> card? Once it becomes runtime suspended, the power to the card will
>> thus also be dropped?
>>
> Yes, and to keep some internal state of the controller.

Okay.

But the internal state of the controller should be possible to restore
at runtime_resume, so that should not be the reason, right?

>
> [snip]
>
>>> +#ifdef CONFIG_PM
>>
>>
>> I suppose this should be CONFIG_PM_SLEEP?
>>
> ...
>
>>> +   err = mmc_suspend_host(mmc);
>>
>>
>> This won't compile. The mmc_suspend_host API has been removed.
>>
> ...
>
>>> +   return mmc_resume_host(mmc);
>>
>>
>> This won't compile. The mmc_resume_host API has been removed.
>>
> ...
>>>
>>> +static struct platform_driver rtsx_usb_sdmmc_driver = {
>>> +   .probe  = rtsx_usb_sdmmc_drv_probe,
>>> +   .remove = rtsx_usb_sdmmc_drv_remove,
>>> +   .id_table   = rtsx_usb_sdmmc_ids,
>>> +   .suspend= rtsx_usb_sdmmc_suspend,
>>> +   .resume = rtsx_usb_sdmmc_resume,
>>
>>
>> Please use the modern pm_ops instead of the legacy suspend/resume
>> callbacks.
>> I suggest you then also switch to use the SIMPLE_DEV_PM_OPS macro.
>
>
> I just missed the removal of mmc_suspend|resume_host.
>
> I'll remove all these unnecessary mmc host pm things as done in commit
> ff71c4bcb0af2730d047989e485303ae4e1ce794 for drivers of our PCIe devices.
>
> Thanks for pointing this out.
>
>> Kind regards
>> Ulf Hansson
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net,v2] hyperv: Fix the carrier status setting

2014-02-11 Thread Jason Wang
On 02/11/2014 02:15 AM, Haiyang Zhang wrote:
> Without this patch, the "cat /sys/class/net/ethN/operstate" shows
> "unknown", and "ethtool ethN" shows "Link detected: yes", when VM
> boots up with or without vNIC connected.
>
> This patch fixed the problem.
>
> Signed-off-by: Haiyang Zhang 
> Reviewed-by: K. Y. Srinivasan 
> ---
>  drivers/net/hyperv/netvsc_drv.c |   24 +++-
>  1 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index 7756118..18916f7 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -88,8 +88,12 @@ static int netvsc_open(struct net_device *net)
>  {
>   struct net_device_context *net_device_ctx = netdev_priv(net);
>   struct hv_device *device_obj = net_device_ctx->device_ctx;
> + struct netvsc_device *nvdev;
> + struct rndis_device *rdev;
>   int ret = 0;
>  
> + netif_carrier_off(net);
> +
>   /* Open up the device */
>   ret = rndis_filter_open(device_obj);
>   if (ret != 0) {
> @@ -99,6 +103,11 @@ static int netvsc_open(struct net_device *net)
>  
>   netif_start_queue(net);
>  
> + nvdev = hv_get_drvdata(device_obj);
> + rdev = nvdev->extension;
> + if (!rdev->link_state)

What if the link status interrupt comes here at this time?
> + netif_carrier_on(net);
> +
>   return ret;
>  }
>  
> @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device 
> *device_obj,
>   struct net_device *net;
>   struct net_device_context *ndev_ctx;
>   struct netvsc_device *net_device;
> + struct rndis_device *rdev;
>  
>   net_device = hv_get_drvdata(device_obj);
> + rdev = net_device->extension;
> +
> + rdev->link_state = status != 1;
> +
>   net = net_device->ndev;
>  
> - if (!net) {
> - netdev_err(net, "got link status but net device "
> - "not initialized yet\n");
> + if (!net || net->reg_state != NETREG_REGISTERED)
>   return;
> - }
>  
>   if (status == 1) {
>   netif_carrier_on(net);
> @@ -414,9 +425,6 @@ static int netvsc_probe(struct hv_device *dev,
>   if (!net)
>   return -ENOMEM;
>  
> - /* Set initial state */
> - netif_carrier_off(net);
> -
>   net_device_ctx = netdev_priv(net);
>   net_device_ctx->device_ctx = dev;
>   hv_set_drvdata(dev, net);
> @@ -443,8 +451,6 @@ static int netvsc_probe(struct hv_device *dev,
>   }
>   memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);
>  
> - netif_carrier_on(net);
> -
>   ret = register_netdev(net);
>   if (ret != 0) {
>   pr_err("Unable to register netdev.\n");

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/3] mfd: Add realtek USB card reader driver

2014-02-11 Thread Ulf Hansson
On 11 February 2014 10:40, Roger  wrote:
> On 02/10/2014 07:30 PM, Lee Jones wrote:
>>>
>>> From: Roger Tseng 
>>>
>>> Realtek USB card reader provides a channel to transfer command or data to
>>> flash
>>> memory cards. This driver exports host instances for mmc and memstick
>>> subsystems
>>> and handles basic works.
>>>
>>> Signed-off-by: Roger Tseng 
>>> ---
>>>   drivers/mfd/Kconfig  |  10 +
>>>   drivers/mfd/Makefile |   1 +
>>>   drivers/mfd/rtsx_usb.c   | 760
>>> +++
>>>   include/linux/mfd/rtsx_usb.h | 628 +++
>>>   4 files changed, 1399 insertions(+)
>>>   create mode 100644 drivers/mfd/rtsx_usb.c
>>>   create mode 100644 include/linux/mfd/rtsx_usb.h
>>
>>
>> Applied with Greg's Ack.
>>
> Thanks. But I have to modify some places in PATCH 2/3 and 3/3 according to
> Ulf's suggestion. I will resend v4 later but currently I don't plan to
> change the 1/3 part(for mfd) in it.
>
> Would you wait for and re-apply the v4 submission or give any advice?

Just send a v4 of PATCH 2/3 and 3/3, that should be fine I think.

Kind regards
Ulf Hansson
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/3] mfd: Add realtek USB card reader driver

2014-02-11 Thread Lee Jones
On Tue, 11 Feb 2014, Roger wrote:

> On 02/10/2014 07:30 PM, Lee Jones wrote:
> >>From: Roger Tseng 
> >>
> >>Realtek USB card reader provides a channel to transfer command or data to 
> >>flash
> >>memory cards. This driver exports host instances for mmc and memstick 
> >>subsystems
> >>and handles basic works.
> >>
> >>Signed-off-by: Roger Tseng 
> >>---
> >>  drivers/mfd/Kconfig  |  10 +
> >>  drivers/mfd/Makefile |   1 +
> >>  drivers/mfd/rtsx_usb.c   | 760 
> >> +++
> >>  include/linux/mfd/rtsx_usb.h | 628 +++
> >>  4 files changed, 1399 insertions(+)
> >>  create mode 100644 drivers/mfd/rtsx_usb.c
> >>  create mode 100644 include/linux/mfd/rtsx_usb.h
> >
> >Applied with Greg's Ack.
> >
> Thanks. But I have to modify some places in PATCH 2/3 and 3/3
> according to Ulf's suggestion. I will resend v4 later but currently
> I don't plan to change the 1/3 part(for mfd) in it.
> 
> Would you wait for and re-apply the v4 submission or give any advice?

Yes, no problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] [media] v4l: omap4iss: Add DEBUG compiler flag

2014-02-11 Thread Paul Bolle
Commit d632dfefd36f ("[media] v4l: omap4iss: Add support for OMAP4
camera interface - Build system") added a Kconfig entry for
VIDEO_OMAP4_DEBUG. But nothing uses that symbol.

This entry was apparently copied from a similar entry for "OMAP 3
Camera debug messages". The OMAP 3 entry is used to set the DEBUG
compiler flag, which enables calls of dev_dbg().

So add a Makefile line to do that for omap4iss too.

Signed-off-by: Paul Bolle 
---
0) v1 was called "[media] v4l: omap4iss: Remove VIDEO_OMAP4_DEBUG". This
versions implements Laurent's alternative (which is much better).

1) Still untested.

 drivers/staging/media/omap4iss/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/media/omap4iss/Makefile 
b/drivers/staging/media/omap4iss/Makefile
index a716ce9..f46c6bd 100644
--- a/drivers/staging/media/omap4iss/Makefile
+++ b/drivers/staging/media/omap4iss/Makefile
@@ -1,5 +1,7 @@
 # Makefile for OMAP4 ISS driver
 
+ccflags-$(CONFIG_VIDEO_OMAP4_DEBUG) += -DDEBUG
+
 omap4-iss-objs += \
iss.o iss_csi2.o iss_csiphy.o iss_ipipeif.o iss_ipipe.o iss_resizer.o 
iss_video.o
 
-- 
1.8.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH v2 3/4] staging: imx-drm-core: associate crtc devices with di port nodes

2014-02-11 Thread Philipp Zabel
To connect the graph in the device tree, each display interface
needs to have an associated port node in the device tree. We can
associate this node with the crtc device and use it to find the
crtc corresponding to a given node instead of using a combination
of parent device node and id.
Explicitly converting the void* cookie to the port device tree node
allows to get rid of the ipu_id and di_id fields. The multiplexer
setting now can be obtained from the port reg property in the
device tree.

Signed-off-by: Philipp Zabel 
---
 drivers/staging/imx-drm/imx-drm-core.c | 63 +++---
 drivers/staging/imx-drm/imx-drm.h  |  5 +--
 drivers/staging/imx-drm/imx-hdmi.c |  2 +-
 drivers/staging/imx-drm/imx-ldb.c  |  4 +--
 drivers/staging/imx-drm/ipuv3-crtc.c   | 39 ++---
 5 files changed, 77 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c 
b/drivers/staging/imx-drm/imx-drm-core.c
index fecc357..63852bb 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -41,9 +41,7 @@ struct imx_drm_crtc {
struct drm_crtc *crtc;
int pipe;
struct imx_drm_crtc_helper_funcsimx_drm_helper_funcs;
-   void*cookie;
-   int id;
-   int mux_id;
+   struct device_node  *port;
 };
 
 static int legacyfb_depth = 16;
@@ -341,14 +339,11 @@ err_kms:
 
 /*
  * imx_drm_add_crtc - add a new crtc
- *
- * The return value if !NULL is a cookie for the caller to pass to
- * imx_drm_remove_crtc later.
  */
 int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
struct imx_drm_crtc **new_crtc,
const struct imx_drm_crtc_helper_funcs *imx_drm_helper_funcs,
-   void *cookie, int id)
+   struct device_node *port)
 {
struct imx_drm_device *imxdrm = drm->dev_private;
struct imx_drm_crtc *imx_drm_crtc;
@@ -370,9 +365,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct 
drm_crtc *crtc,
 
imx_drm_crtc->imx_drm_helper_funcs = *imx_drm_helper_funcs;
imx_drm_crtc->pipe = imxdrm->pipes++;
-   imx_drm_crtc->cookie = cookie;
-   imx_drm_crtc->id = id;
-   imx_drm_crtc->mux_id = imx_drm_crtc->pipe;
+   imx_drm_crtc->port = port;
imx_drm_crtc->crtc = crtc;
 
imxdrm->crtc[imx_drm_crtc->pipe] = imx_drm_crtc;
@@ -416,7 +409,7 @@ int imx_drm_remove_crtc(struct imx_drm_crtc *imx_drm_crtc)
 EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
 
 /*
- * Find the DRM CRTC possible mask for the device node cookie/id.
+ * Find the DRM CRTC possible mask for the connected endpoint.
  *
  * The encoder possible masks are defined by their position in the
  * mode_config crtc_list.  This means that CRTCs must not be added
@@ -425,26 +418,17 @@ EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
 static uint32_t imx_drm_find_crtc_mask(struct imx_drm_device *imxdrm,
struct device_node *endpoint)
 {
-   struct device_node *remote_port;
-   void *cookie;
+   struct device_node *port;
unsigned i;
-   int id = 0;
 
-   remote_port = imx_drm_of_get_remote_port(endpoint);
-   if (remote_port)
-   of_property_read_u32(remote_port, "reg", &id);
-   else
+   port = imx_drm_of_get_remote_port(endpoint);
+   if (!port)
return 0;
-   cookie = remote_port->parent;
-   of_node_put(remote_port);
-
-   /* IPU specific: CSI0/1 at 0/1, DI0/1 at 2/3 */
-   id -= 2;
+   of_node_put(port);
 
for (i = 0; i < MAX_CRTC; i++) {
struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[i];
-   if (imx_drm_crtc && imx_drm_crtc->id == id &&
-   imx_drm_crtc->cookie == cookie)
+   if (imx_drm_crtc && imx_drm_crtc->port == port)
return drm_crtc_mask(imx_drm_crtc->crtc);
}
 
@@ -496,11 +480,36 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
 }
 EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of);
 
-int imx_drm_encoder_get_mux_id(struct drm_encoder *encoder)
+/*
+ * @node: device tree node containing encoder input ports
+ * @encoder: drm_encoder
+ */
+int imx_drm_encoder_get_mux_id(struct device_node *node,
+  struct drm_encoder *encoder)
 {
struct imx_drm_crtc *imx_crtc = imx_drm_find_crtc(encoder->crtc);
+   struct device_node *ep = NULL;
+   struct device_node *port;
+   int id, ret;
+
+   if (!node || !imx_crtc)
+   return -EINVAL;
+
+   do {
+   ep = imx_drm_of_get_next_endpoint(node, ep);
+   if (!ep)
+   break;
+
+   port = imx_drm_of_get_remote_port(ep);
+   of_node_put(port);
+   if (port == imx_crtc->po

[RFC PATCH v2 0/4] imx-drm dt bindings

2014-02-11 Thread Philipp Zabel
Hi,

these patches apply on top of Russell's second preview of the
imx-drm cleanup series. I have added device tree bindings between
IPU and the encoders as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
and used those to determine the possible_crtcs and mux_id.

The crtc cookie is replaced with a the port device tree node,
which is unique and therefore allows to get rid of the di_id
comparison. Storing the multiplexer input numbers in the device
tree removes the need to know the ipu_id. This should also allow
to replace IPU2 with LCDIF on i.MX6 Solo more easily.

In v2 I've added temporary copies of the v4l2_of helpers to imx-drm
and tested it on the SolidRun Hummingboard.

regards
Philipp


Philipp Zabel (4):
  staging: imx-drm: Add temporary copies of v4l2-of parsing functions
  staging: imx-drm-core: Use graph to find connection between crtc and
encoder
  staging: imx-drm-core: associate crtc devices with di port nodes
  ARM: dts: imx6qdl: Add ports and endpoints to IPU DIs

 arch/arm/boot/dts/imx6dl.dtsi  |   9 +--
 arch/arm/boot/dts/imx6q.dtsi   | 115 +--
 arch/arm/boot/dts/imx6qdl.dtsi | 137 -
 drivers/staging/imx-drm/Makefile   |   2 +-
 drivers/staging/imx-drm/imx-drm-core.c |  82 +---
 drivers/staging/imx-drm/imx-drm-of.c   | 106 +
 drivers/staging/imx-drm/imx-drm.h  |   9 ++-
 drivers/staging/imx-drm/imx-hdmi.c |   2 +-
 drivers/staging/imx-drm/imx-ldb.c  |   4 +-
 drivers/staging/imx-drm/ipuv3-crtc.c   |  39 +-
 10 files changed, 453 insertions(+), 52 deletions(-)
 create mode 100644 drivers/staging/imx-drm/imx-drm-of.c

-- 
1.8.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH v2 2/4] staging: imx-drm-core: Use graph to find connection between crtc and encoder

2014-02-11 Thread Philipp Zabel
This patch adds support to find the connections between crtcs and encoder
using the OF graph bindings documented for video interfaces in
Documentation/devicetree/bindings/media/video-interfaces.txt

This patch uses temporary copies of the V4L2 OF graph parsers that can be
removed again once those are moved to a generic place.

Signed-off-by: Philipp Zabel 
---
 drivers/staging/imx-drm/imx-drm-core.c | 43 +++---
 1 file changed, 29 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c 
b/drivers/staging/imx-drm/imx-drm-core.c
index dcba518..fecc357 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -423,9 +423,23 @@ EXPORT_SYMBOL_GPL(imx_drm_remove_crtc);
  * or removed once the DRM device has been fully initialised.
  */
 static uint32_t imx_drm_find_crtc_mask(struct imx_drm_device *imxdrm,
-   void *cookie, int id)
+   struct device_node *endpoint)
 {
+   struct device_node *remote_port;
+   void *cookie;
unsigned i;
+   int id = 0;
+
+   remote_port = imx_drm_of_get_remote_port(endpoint);
+   if (remote_port)
+   of_property_read_u32(remote_port, "reg", &id);
+   else
+   return 0;
+   cookie = remote_port->parent;
+   of_node_put(remote_port);
+
+   /* IPU specific: CSI0/1 at 0/1, DI0/1 at 2/3 */
+   id -= 2;
 
for (i = 0; i < MAX_CRTC; i++) {
struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[i];
@@ -441,24 +455,18 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
struct drm_encoder *encoder, struct device_node *np)
 {
struct imx_drm_device *imxdrm = drm->dev_private;
+   struct device_node *ep = NULL;
uint32_t crtc_mask = 0;
-   int i, ret = 0;
+   int i;
 
-   for (i = 0; !ret; i++) {
-   struct of_phandle_args args;
+   for (i = 0; i < MAX_CRTC; i++) {
uint32_t mask;
-   int id;
 
-   ret = of_parse_phandle_with_args(np, "crtcs", "#crtc-cells", i,
-&args);
-   if (ret == -ENOENT)
+   ep = imx_drm_of_get_next_endpoint(np, ep);
+   if (!ep)
break;
-   if (ret < 0)
-   return ret;
 
-   id = args.args_count > 0 ? args.args[0] : 0;
-   mask = imx_drm_find_crtc_mask(imxdrm, args.np, id);
-   of_node_put(args.np);
+   mask = imx_drm_find_crtc_mask(imxdrm, ep);
 
/*
 * If we failed to find the CRTC(s) which this encoder is
@@ -466,12 +474,19 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
 * not been registered yet.  Defer probing, and hope that
 * the required CRTC is added later.
 */
-   if (mask == 0)
+   if (mask == 0) {
+   of_node_put(ep);
return -EPROBE_DEFER;
+   }
 
crtc_mask |= mask;
}
 
+   if (ep)
+   of_node_put(ep);
+   if (i == 0)
+   return -ENOENT;
+
encoder->possible_crtcs = crtc_mask;
 
/* FIXME: this is the mask of outputs which can clone this output. */
-- 
1.8.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH v2 4/4] ARM: dts: imx6qdl: Add ports and endpoints to IPU DIs

2014-02-11 Thread Philipp Zabel
This connects the IPU and display encoder (HDMI, LVDS, MIPI)
device tree nodes using the bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt

The IPU ports correspond to the two display interfaces. The
order of endpoints in the ports is arbitrary.

Each encoder with an associated input multiplexer has multiple
input ports in the device tree. The order and reg property of
the ports must correspond to the multiplexer input order.

Signed-off-by: Philipp Zabel 
---
 arch/arm/boot/dts/imx6dl.dtsi  |   9 ++-
 arch/arm/boot/dts/imx6q.dtsi   | 115 --
 arch/arm/boot/dts/imx6qdl.dtsi | 137 -
 3 files changed, 248 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 6dc3970..be63e41 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -72,6 +72,10 @@
};
 };
 
+&hdmi {
+   compatible = "fsl,imx6dl-hdmi";
+};
+
 &ldb {
clocks = <&clks 33>, <&clks 34>,
 <&clks 39>, <&clks 40>,
@@ -88,8 +92,3 @@
crtcs = <&ipu1 0>, <&ipu1 1>;
};
 };
-
-&hdmi {
-   compatible = "fsl,imx6dl-hdmi";
-   crtcs = <&ipu1 0>, <&ipu1 1>;
-};
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 187fe33..f36f739 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -132,13 +132,75 @@
};
 
ipu2: ipu@0280 {
-   #crtc-cells = <1>;
+   #address-cells = <1>;
+   #size-cells = <0>;
compatible = "fsl,imx6q-ipu";
reg = <0x0280 0x40>;
interrupts = <0 8 0x4 0 7 0x4>;
clocks = <&clks 133>, <&clks 134>, <&clks 137>;
clock-names = "bus", "di0", "di1";
resets = <&src 4>;
+
+   port@2 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <2>;
+
+   ipu2_di0_disp0: endpoint@0 {
+   };
+
+   ipu2_di0_hdmi: endpoint@1 {
+   remote-endpoint = <&hdmi_mux_2>;
+   };
+
+   ipu2_di0_mipi: endpoint@2 {
+   };
+
+   ipu2_di0_lvds0: endpoint@3 {
+   };
+
+   ipu2_di0_lvds1: endpoint@4 {
+   };
+   };
+
+   port@3 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <3>;
+
+   ipu2_di1_hdmi: endpoint@1 {
+   remote-endpoint = <&hdmi_mux_3>;
+   };
+
+   ipu2_di1_mipi: endpoint@2 {
+   };
+
+   ipu2_di1_lvds0: endpoint@3 {
+   };
+
+   ipu2_di1_lvds1: endpoint@4 {
+   };
+   };
+   };
+   };
+};
+
+&hdmi {
+   compatible = "fsl,imx6q-hdmi";
+
+   port@2 {
+   reg = <2>;
+
+   hdmi_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_hdmi>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   hdmi_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_hdmi>;
};
};
 };
@@ -152,15 +214,56 @@
  "di0", "di1";
 
lvds-channel@0 {
-   crtcs = <&ipu1 0>, <&ipu1 1>, <&ipu2 0>, <&ipu2 1>;
+   port@2 {
+   reg = <2>;
+
+   lvds0_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_lvds0>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   lvds0_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_lvds0>;
+   };
+   };
};
 
lvds-channel@1 {
-   crtcs = <&ipu1 0>, <&ipu1 1>, <&ipu2 0>, <&ipu2 1>;
+   port@2 {
+   reg = <2>;
+
+   lvds1_mux_2: endpoint {
+   remote-endpoint = <&ipu2_di0_lvds1>;
+   };
+   };
+
+   port@3 {
+   reg = <3>;
+
+   lvds1_mux_3: endpoint {
+   remote-endpoint = <&ipu2_di1_lvds1

[RFC PATCH v2 1/4] staging: imx-drm: Add temporary copies of v4l2-of parsing functions

2014-02-11 Thread Philipp Zabel
From: Philipp Zabel 

The video interface bindings described in
Documentation/device-tree/bindings/media/video-interfaces.txt
are useful for DRM drivers, too. To decouple development,
duplicate the v4l2-of parser functions temporarily. Also modify
imx_drm_of_get_next_endpoint to decrement the refcount of prev.

Signed-off-by: Philipp Zabel 
---
 drivers/staging/imx-drm/Makefile |   2 +-
 drivers/staging/imx-drm/imx-drm-of.c | 106 +++
 drivers/staging/imx-drm/imx-drm.h|   4 ++
 3 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/imx-drm/imx-drm-of.c

diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-drm/Makefile
index 129e3a3..743b875 100644
--- a/drivers/staging/imx-drm/Makefile
+++ b/drivers/staging/imx-drm/Makefile
@@ -1,5 +1,5 @@
 
-imxdrm-objs := imx-drm-core.o
+imxdrm-objs := imx-drm-core.o imx-drm-of.o
 
 obj-$(CONFIG_DRM_IMX) += imxdrm.o
 
diff --git a/drivers/staging/imx-drm/imx-drm-of.c 
b/drivers/staging/imx-drm/imx-drm-of.c
new file mode 100644
index 000..12f37eb
--- /dev/null
+++ b/drivers/staging/imx-drm/imx-drm-of.c
@@ -0,0 +1,106 @@
+/*
+ * Video Interface OF binding parsing library
+ *
+ * Copyright (C) 2012 - 2013 Samsung Electronics Co., Ltd.
+ * Author: Sylwester Nawrocki 
+ *
+ * Copyright (C) 2012 Renesas Electronics Corp.
+ * Author: Guennadi Liakhovetski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+
+/**
+ * imx_drm_get_next_endpoint() - get next endpoint node
+ * @parent: pointer to the parent device node
+ * @prev: previous endpoint node, or NULL to get first
+ *
+ * Return: An 'endpoint' node pointer with refcount incremented. Refcount
+ * of the passed @prev node is decremented.
+ */
+struct device_node *imx_drm_of_get_next_endpoint(
+   const struct device_node *parent, struct device_node *prev)
+{
+   struct device_node *endpoint;
+   struct device_node *port = NULL;
+
+   if (!parent)
+   return NULL;
+
+   if (!prev) {
+   struct device_node *node;
+   /*
+* It's the first call, we have to find a port subnode
+* within this node or within an optional 'ports' node.
+*/
+   node = of_get_child_by_name(parent, "ports");
+   if (node)
+   parent = node;
+
+   port = of_get_child_by_name(parent, "port");
+
+   if (port) {
+   /* Found a port, get an endpoint. */
+   endpoint = of_get_next_child(port, NULL);
+   of_node_put(port);
+   } else {
+   endpoint = NULL;
+   }
+
+   if (!endpoint)
+   pr_err("%s(): no endpoint nodes specified for %s\n",
+  __func__, parent->full_name);
+   of_node_put(node);
+   } else {
+   port = of_get_parent(prev);
+   if (!port) {
+   /* Hm, has someone given us the root node ?... */
+   of_node_put(prev);
+   return NULL;
+   }
+
+   endpoint = of_get_next_child(port, prev);
+   if (endpoint) {
+   of_node_put(port);
+   return endpoint;
+   }
+
+   /* No more endpoints under this port, try the next one. */
+   do {
+   port = of_get_next_child(parent, port);
+   if (!port)
+   return NULL;
+   } while (of_node_cmp(port->name, "port"));
+
+   /* Pick up the first endpoint in this port. */
+   endpoint = of_get_next_child(port, NULL);
+   of_node_put(port);
+   }
+
+   return endpoint;
+}
+EXPORT_SYMBOL_GPL(imx_drm_of_get_next_endpoint);
+
+/**
+ * imx_drm_of_get_remote_port() - get remote port node
+ * @node: pointer to a local endpoint device_node
+ *
+ * Return: Remote port node associated with remote endpoint node linked
+ *to @node. Use of_node_put() on it when done.
+ */
+struct device_node *imx_drm_of_get_remote_port(const struct device_node *node)
+{
+   struct device_node *np;
+
+   /* Get remote endpoint node. */
+   np = of_parse_phandle(node, "remote-endpoint", 0);
+   if (!np)
+   return NULL;
+   return of_get_next_parent(np);
+}
+EXPORT_SYMBOL_GPL(imx_drm_of_get_remote_port);
diff --git a/drivers/staging/imx-drm/imx-drm.h 
b/drivers/staging/imx-drm/imx-drm.h
index aa21028..9af4a82 100644
--- a/drivers/staging/imx-drm/imx-drm.h
+++ b/drivers/staging/imx-drm/imx-drm.h
@@ -58,4 +58,8 @@ int imx_drm_connector_mode_valid(struct drm_connector 
*connector,
 void 

[PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Paul Bolle
Two Kconfig entries for this driver default to (uppercase) "Y". But in
Kconfig (lowercase) "y" is a magic symbol. "Y" is an ordinary symbol.
As "Y" is never set these Kconfig symbols will also not be set by
default.

So use "default y" here, as was clearly intended.

Signed-off-by: Paul Bolle 
---
This patch will enable code that used to be disabled. Since this is in
staging, that should be OK. This might also uncover warnings or errors.
I didn't test it, anyhow.

This patch also deserves a
Reported-by: Martin Walch 

line, but that apparently requires Martin's permission.

 drivers/staging/rtl8188eu/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/Kconfig 
b/drivers/staging/rtl8188eu/Kconfig
index c9c548f..9a57d31 100644
--- a/drivers/staging/rtl8188eu/Kconfig
+++ b/drivers/staging/rtl8188eu/Kconfig
@@ -12,7 +12,7 @@ if R8188EU
 
 config 88EU_AP_MODE
bool "Realtek RTL8188EU AP mode"
-   default Y
+   default y
---help---
This option enables Access Point mode. Unless you know that your system
will never be used as an AP, or the target system has limited memory,
@@ -20,7 +20,7 @@ config 88EU_AP_MODE
 
 config 88EU_P2P
bool "Realtek RTL8188EU Peer-to-peer mode"
-   default Y
+   default y
---help---
This option enables peer-to-peer mode for the r8188eu driver. Unless you
know that peer-to-peer (P2P) mode will never be used, or the target 
system has
-- 
1.8.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] [media] v4l: omap4iss: Add DEBUG compiler flag

2014-02-11 Thread Laurent Pinchart
Hi Paul,

Thank you for the patch.

On Tuesday 11 February 2014 12:17:01 Paul Bolle wrote:
> Commit d632dfefd36f ("[media] v4l: omap4iss: Add support for OMAP4
> camera interface - Build system") added a Kconfig entry for
> VIDEO_OMAP4_DEBUG. But nothing uses that symbol.
> 
> This entry was apparently copied from a similar entry for "OMAP 3
> Camera debug messages". The OMAP 3 entry is used to set the DEBUG
> compiler flag, which enables calls of dev_dbg().
> 
> So add a Makefile line to do that for omap4iss too.
> 
> Signed-off-by: Paul Bolle 

Acked-by: Laurent Pinchart 

and applied to my tree.

> ---
> 0) v1 was called "[media] v4l: omap4iss: Remove VIDEO_OMAP4_DEBUG". This
> versions implements Laurent's alternative (which is much better).

Thanks :-)

> 1) Still untested.
> 
>  drivers/staging/media/omap4iss/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/media/omap4iss/Makefile
> b/drivers/staging/media/omap4iss/Makefile index a716ce9..f46c6bd 100644
> --- a/drivers/staging/media/omap4iss/Makefile
> +++ b/drivers/staging/media/omap4iss/Makefile
> @@ -1,5 +1,7 @@
>  # Makefile for OMAP4 ISS driver
> 
> +ccflags-$(CONFIG_VIDEO_OMAP4_DEBUG) += -DDEBUG
> +
>  omap4-iss-objs += \
>   iss.o iss_csi2.o iss_csiphy.o iss_ipipeif.o iss_ipipe.o iss_resizer.o
> iss_video.o

-- 
Regards,

Laurent Pinchart

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [kconfig] update: results of some syntactical checks

2014-02-11 Thread Paul Bolle
Mauro,

On Sat, 2013-11-02 at 17:40 -0200, Mauro Carvalho Chehab wrote:
> Em Sat, 02 Nov 2013 20:20:54 +0100
> Paul Bolle  escreveu:
> > On Sun, 2013-10-20 at 00:03 +0200, Martin Walch wrote:
> > > drivers/media/common/siano/Kconfig:21-26
> > > > config SMS_SIANO_DEBUGFS
> > > > bool "Enable debugfs for smsdvb"
> > > > depends on SMS_SIANO_MDTV
> > > > depends on DEBUG_FS
> > > > depends on SMS_USB_DRV
> > > > depends on CONFIG_SMS_USB_DRV = CONFIG_SMS_SDIO_DRV
> > > 
> > > The last line adds the dependency CONFIG_SMS_USB_DRV = 
> > > CONFIG_SMS_SDIO_DRV.
> > > This expression does not look sound as those two symbols are not declared
> > > anywhere. So, the two strings CONFIG_SMS_USB_DRV and CONFIG_SMS_SDIO_DRV
> > > are compared, yielding always 'n'. As a result, SMS_SIANO_DEBUGFS will 
> > > never
> > > be enabled.
>
> [...] The Kconfig logic here is that it
> should depends on !SMS_SDIO_DRV or SMS_USB_DRV = SMS_SDIO_DRV.
> 
> I remember I made a patch like that while testing some things with this
> driver, but it seems that I forgot to push. I might have it somewhere on
> my test machine.

This line is still present in v3.14-rc2. Did you ever find that patch on
your test machine?


Paul Bolle

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Dan Carpenter
On Tue, Feb 11, 2014 at 01:31:32PM +0100, Paul Bolle wrote:
> Two Kconfig entries for this driver default to (uppercase) "Y". But in
> Kconfig (lowercase) "y" is a magic symbol. "Y" is an ordinary symbol.
> As "Y" is never set these Kconfig symbols will also not be set by
> default.
> 
> So use "default y" here, as was clearly intended.
> 
> Signed-off-by: Paul Bolle 
> ---
> This patch will enable code that used to be disabled. Since this is in
> staging, that should be OK. This might also uncover warnings or errors.
> I didn't test it, anyhow.
> 
> This patch also deserves a
> Reported-by: Martin Walch 
> 
> line, but that apparently requires Martin's permission.
> 

You've pretty much given Martin's secret assistance away already on a
public mailing list.  Next time just add the Reported-by.  :P

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Paul Bolle
On Tue, 2014-02-11 at 15:53 +0300, Dan Carpenter wrote:
> You've pretty much given Martin's secret assistance away already on a
> public mailing list.  Next time just add the Reported-by.  :P

I would have done, if I hadn't bothered to check
Documentation/SubmittingPatches first. It contains:
   Please note that this tag should not be added without the reporter's
   permission, especially if the problem was not reported in a public
   forum.

Perhaps that should read:
   [...], unless the problem was reported in a public forum.


Paul Bolle

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Dan Carpenter
On Tue, Feb 11, 2014 at 02:01:08PM +0100, Paul Bolle wrote:
> On Tue, 2014-02-11 at 15:53 +0300, Dan Carpenter wrote:
> > You've pretty much given Martin's secret assistance away already on a
> > public mailing list.  Next time just add the Reported-by.  :P
> 
> I would have done, if I hadn't bothered to check
> Documentation/SubmittingPatches first. It contains:
>Please note that this tag should not be added without the reporter's
>permission, especially if the problem was not reported in a public
>forum.
> 
> Perhaps that should read:
>[...], unless the problem was reported in a public forum.

Or maybe:

Please note that if the problem was reported in private then you
should ask for permission before adding a Reported-by tag.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH]staging: slicoss: Fix possible reuse of freed memory in timer function

2014-02-11 Thread Chris Harrer
Hi Denis,

I understand your frustration; it¹s not that we don¹t want to help, it¹s
that we¹ve moved onto other products.  As for getting H/W to people, I can
easily ship H/W within the United States; it¹s difficult for us to ship
internationally due to many different customs restrictions.  If there is
somewhere I can ship H/W in the states, I¹ll gladly do so.

Best regards,

Chris

On 2/11/14, 2:37 AM, "Denis Kirjanov"  wrote:

>On 2/10/14, Kirill Tkhai  wrote:
>> Do not call kfree() till timer function is finished.
>>
>> [This was found using grep. Compiled tested only]
>>
>> Signed-off-by: Kirill Tkhai 
>> CC: Joe Perches 
>> CC: Greg Kroah-Hartman 
>
>CC Chris Harrer.
>
>The problem with that driver is that alacritech guys don't seem to
>care. Not sure if anyone has a hardware to test the driver and
>probably the code is completely broken.
>Probably the better option is to drop the code from the staging tree...
>
>> ---
>>  drivers/staging/slicoss/slicoss.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/drivers/staging/slicoss/slicoss.c
>> b/drivers/staging/slicoss/slicoss.c
>> index 1426ca4..e0de497 100644
>> --- a/drivers/staging/slicoss/slicoss.c
>> +++ b/drivers/staging/slicoss/slicoss.c
>> @@ -2970,7 +2970,7 @@ static void slic_card_cleanup(struct sliccard
>>*card)
>>  {
>>  if (card->loadtimerset) {
>>  card->loadtimerset = 0;
>> -del_timer(&card->loadtimer);
>> +del_timer_sync(&card->loadtimer);
>>  }
>>
>>  slic_debug_card_destroy(card);
>> ___
>> devel mailing list
>> de...@linuxdriverproject.org
>> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>>
>
>
>-- 
>Regards,
>Denis


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Digi International dgap driver in staging

2014-02-11 Thread Mark Hounschell

Hi Greg,

As I've never done this before, I've got 17 patches that I don't really 
know what to do with. These 17 patches whittle down the 
drivers/staging/dgap directory to just 4 files (dgap.c, dgap.h, 
Makefile, and Kconfig) and also add the in kernel firmware loading code 
so when the driver loads the various firmware files required are loaded 
and the boards are running and ready to use. I know you are a busy guy 
so I've CC'd the dev list in case anyone there is interested in these 
patches.


001-combine-dgap_fep5-with-dgap_driver.patch
002-combine-dgap_fep5-with-dgap_driver.patch
003-remove-downld.c.patch
004-add-in-kernel-firmware-loading-support.patch
005-remove-dgap_downld.h.patch
006-combine-dgap_parse.c-with-dgap-driver.c.patch
007-combine-dgap_parse.h-with-dgap-driver.h.patch
008-combine-dgap_conf.h-with-dgap-driver.h.patch
009-combine-digi.h-with-dgap_driver.h.patch
010-combine-dgap_pci.h-with-dgap_driver.h.patch
011-combine-dgap_tty.c-with-dgap_driver.c.patch
012-combine-dgap_tty.h-with-dgap_driver.h.patch
013-combine-dgap_sysfs.c-with-dgap_driver.c.patch
014-combine-dgap_sysfs.h-with-dgap_driver.h.patch
015-remove-dgap_trace.patch
016-remove-kcompat_and_types.h.patch
017-rename-driver-to-dgap.patch

Regards
Mark






___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: Digi International dgap driver in staging

2014-02-11 Thread Greg Kroah-Hartman
On Tue, Feb 11, 2014 at 01:02:39PM -0500, Mark Hounschell wrote:
> Hi Greg,
> 
> As I've never done this before, I've got 17 patches that I don't really know
> what to do with. These 17 patches whittle down the drivers/staging/dgap
> directory to just 4 files (dgap.c, dgap.h, Makefile, and Kconfig) and also
> add the in kernel firmware loading code so when the driver loads the various
> firmware files required are loaded and the boards are running and ready to
> use. I know you are a busy guy so I've CC'd the dev list in case anyone
> there is interested in these patches.
> 
> 001-combine-dgap_fep5-with-dgap_driver.patch
> 002-combine-dgap_fep5-with-dgap_driver.patch
> 003-remove-downld.c.patch
> 004-add-in-kernel-firmware-loading-support.patch
> 005-remove-dgap_downld.h.patch
> 006-combine-dgap_parse.c-with-dgap-driver.c.patch
> 007-combine-dgap_parse.h-with-dgap-driver.h.patch
> 008-combine-dgap_conf.h-with-dgap-driver.h.patch
> 009-combine-digi.h-with-dgap_driver.h.patch
> 010-combine-dgap_pci.h-with-dgap_driver.h.patch
> 011-combine-dgap_tty.c-with-dgap_driver.c.patch
> 012-combine-dgap_tty.h-with-dgap_driver.h.patch
> 013-combine-dgap_sysfs.c-with-dgap_driver.c.patch
> 014-combine-dgap_sysfs.h-with-dgap_driver.h.patch
> 015-remove-dgap_trace.patch
> 016-remove-kcompat_and_types.h.patch
> 017-rename-driver-to-dgap.patch

Send them as a patch series, like everyone else does :)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: linux-next: Tree for Feb 11 (staging/rtl8821ae/)

2014-02-11 Thread Randy Dunlap
On 02/10/2014 10:21 PM, Stephen Rothwell wrote:
> Hi all,
> 
> This tree fails (more than usual) the powerpc allyesconfig build.
> 
> Changes since 20140210:
> 

on i386:

ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_unregister_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "rate_control_send_low" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_stop_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_rate_control_register" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "wiphy_to_ieee80211_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_stop_tx_ba_cb_irqsafe" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_tx_status_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_find_sta" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_wake_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_rate_control_unregister" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_register_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_start_tx_ba_session" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_alloc_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_free_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_connection_loss" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_start_tx_ba_cb_irqsafe" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!

when CONFIG_MAC80211 is not enabled.
Looks like it should also depend on MAC80211.



-- 
~Randy
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: linux-next: Tree for Feb 11 (staging/rtl8821ae/)

2014-02-11 Thread Greg Kroah-Hartman
On Tue, Feb 11, 2014 at 10:14:52AM -0800, Randy Dunlap wrote:
> On 02/10/2014 10:21 PM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > This tree fails (more than usual) the powerpc allyesconfig build.
> > 
> > Changes since 20140210:
> > 
> 
> on i386:
> 
> ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_unregister_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "rate_control_send_low" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_stop_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_rate_control_register" 
> [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> ERROR: "wiphy_to_ieee80211_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_stop_tx_ba_cb_irqsafe" 
> [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> ERROR: "ieee80211_tx_status_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_find_sta" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_wake_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_rate_control_unregister" 
> [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> ERROR: "ieee80211_register_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_start_tx_ba_session" 
> [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> ERROR: "ieee80211_alloc_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_free_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> ERROR: "ieee80211_connection_loss" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
> undefined!
> ERROR: "ieee80211_start_tx_ba_cb_irqsafe" 
> [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
> 
> when CONFIG_MAC80211 is not enabled.
> Looks like it should also depend on MAC80211.

Care to send me a patch?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] drivers:staging:rtl8821ae: Fixed few coding style erors and warnings

2014-02-11 Thread Greg KH
On Sun, Feb 09, 2014 at 10:55:25AM -0600, Larry Finger wrote:
> On 02/09/2014 01:30 AM, Surendra Patil wrote:
> >Fixed multiple coding style errors and warnings
> >wifi.h:1077: WARNING: please, no space before tabs
> >wifi.h:762: WARNING: missing space after struct definition
> >wifi.h:972: WARNING: please, no spaces at the start of a line
> >wifi.h:1825: WARNING: Unnecessary space after function pointer name
> >wifi.h:1826: ERROR: "foo * bar" should be "foo *bar"
> >wifi.h:1099: WARNING: missing space after return type
> >wifi.h:1320: ERROR: Macros with complex values should be enclosed in 
> >parenthesis
> >wifi.h:1758: WARNING: Multiple spaces after return type
> >wifi.h:1855: ERROR: code indent should use tabs where possible
> >wifi.h:2303: ERROR: space prohibited after that open parenthesis '('
> >wifi.h:2408: ERROR: spaces required around that '=' (ctx:VxV)
> >
> >Signed-off-by: Surendra Patil 
> 
> You are free to hack on this driver as much as you want, but please be aware
> that this driver is only in staging on a temporary basis. I already have
> cleaned up the checkpatch errors on my version, and merged it with the
> version of rtlwifi that is in the wireless-testing tree. Once I obtain one
> of these devices and can test that the device actually works, it will be
> submitted to the drivers/net/wireless tree of the regular kernel, and it
> should be there by 3.15.

Please let me know when your version goes into the networking tree, so
I'll know to drop this version from linux-next to keep from people doing
unneeded cleanups.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: android: remove unused constant, BINDER_SET_IDLE_PRIORITY

2014-02-11 Thread Greg KH
On Sat, Feb 08, 2014 at 11:59:41AM +0900, SeongJae Park wrote:
> Remove constant BINDER_SET_IDLE_PRIORITY because it is not used from
> anywhere.

> 
> Signed-off-by: SeongJae Park 
> ---
>  drivers/staging/android/binder.h | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/android/binder.h 
> b/drivers/staging/android/binder.h
> index c4c1ed6..6d08e61 100644
> --- a/drivers/staging/android/binder.h
> +++ b/drivers/staging/android/binder.h
> @@ -87,10 +87,9 @@ struct binder_version {
>  #define BINDER_WRITE_READ_IOWR('b', 1, struct binder_write_read)
>  #define BINDER_SET_IDLE_TIMEOUT  _IOW('b', 3, __s64)
>  #define BINDER_SET_MAX_THREADS   _IOW('b', 5, __u32)
> -#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32)
> -#define BINDER_SET_CONTEXT_MGR   _IOW('b', 7, __s32)
> -#define BINDER_THREAD_EXIT   _IOW('b', 8, __s32)
> -#define BINDER_VERSION   _IOWR('b', 9, struct 
> binder_version)
> +#define BINDER_SET_CONTEXT_MGR   _IOW('b', 6, __s32)
> +#define BINDER_THREAD_EXIT   _IOW('b', 7, __s32)
> +#define BINDER_VERSION   _IOWR('b', 8, struct 
> binder_version)

And you just broke all userspace code that uses this interface :(

Please be more careful, and test your patches properly.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] staging: rtl8188eu: remove header file ethernet.h

2014-02-11 Thread Greg KH
On Sun, Feb 09, 2014 at 02:10:46PM +0530, navin patidar wrote:
> "ethernet.h" is included in three files but only "rtw_recv.c" using two macros
> defined in "ethernet.h", so move used macros in "rtw_recv.c" and
> remove "include/ethernet.h" header file and inclusion of this header file.
> 
> Signed-off-by: navin patidar 
> ---
>  drivers/staging/rtl8188eu/core/rtw_recv.c  |4 ++-
>  drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 -
>  drivers/staging/rtl8188eu/include/ethernet.h   |   42 
> 
>  drivers/staging/rtl8188eu/os_dep/recv_linux.c  |1 -
>  4 files changed, 3 insertions(+), 45 deletions(-)
>  delete mode 100644 drivers/staging/rtl8188eu/include/ethernet.h

This patch fails to apply (2/3 had fuzz, but I fixed that up), can you
redo this against linux-next and resend it?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH]staging: slicoss: Fix possible reuse of freed memory in timer function

2014-02-11 Thread Greg Kroah-Hartman
On Tue, Feb 11, 2014 at 08:51:26AM -0500, Chris Harrer wrote:
> Hi Denis,
> 
> I understand your frustration; it¹s not that we don¹t want to help, it¹s
> that we¹ve moved onto other products.

So should I just delete this driver if no one is going to care about
cleaning it up and getting it merged properly?

> As for getting H/W to people, I can
> easily ship H/W within the United States; it¹s difficult for us to ship
> internationally due to many different customs restrictions.  If there is
> somewhere I can ship H/W in the states, I¹ll gladly do so.

I can always use more hardware :)

If you need help with getting this cleaned up, please let me know, I
always have people asking for things to do, and if you get me some
hardware samples, I can get them spread around the world pretty easily
(traveling to different places helps with customs...)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/6] staging: r8188eu: Replace wrapper around _rtw_memcmp()

2014-02-11 Thread Greg KH
On Sun, Feb 09, 2014 at 03:15:54PM -0600, Larry Finger wrote:
> This wrapper is replaced with a simple memcmp(). As the wrapper inverts the
> logic of memcmp(), care needed to be taken.

That's just evil, ugh, nice job...

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 6/6] staging: r8188eu: Remove _func_enter and _func_exit macros

2014-02-11 Thread Greg KH
On Sun, Feb 09, 2014 at 03:15:59PM -0600, Larry Finger wrote:
> These debugging macros are seldom used for debugging once the driver
> is working. If routine tracing is needed, it can be added on an
> individual basis.

No, you can use the in-kernel tracing functionality :)

nice job.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging/rtl8821ae: fix build, depends on MAC80211

2014-02-11 Thread Randy Dunlap
From: Randy Dunlap 

rtl8821ae uses ieee80211 interfaces so it should depend on
MAC80211.  Fixes these build errors:

ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_unregister_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "rate_control_send_low" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_stop_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_rate_control_register" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "wiphy_to_ieee80211_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_stop_tx_ba_cb_irqsafe" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_tx_status_irqsafe" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_find_sta" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_wake_queue" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_rate_control_unregister" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_register_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_start_tx_ba_session" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_alloc_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_free_hw" [drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!
ERROR: "ieee80211_connection_loss" [drivers/staging/rtl8821ae/rtl8821ae.ko] 
undefined!
ERROR: "ieee80211_start_tx_ba_cb_irqsafe" 
[drivers/staging/rtl8821ae/rtl8821ae.ko] undefined!

Signed-off-by: Randy Dunlap 
---
 drivers/staging/rtl8821ae/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20140211.orig/drivers/staging/rtl8821ae/Kconfig
+++ linux-next-20140211/drivers/staging/rtl8821ae/Kconfig
@@ -1,6 +1,6 @@
 config R8821AE
tristate "RealTek RTL8821AE Wireless LAN NIC driver"
-   depends on PCI && WLAN
+   depends on PCI && WLAN && MAC80211
depends on m
select WIRELESS_EXT
select WEXT_PRIV
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Martin Walch
On Tuesday 11 February 2014 13:31:32 Paul Bolle wrote:
> This patch also deserves a
> Reported-by: Martin Walch 
> 
> line, but that apparently requires Martin's permission.

I would be happy. And I am sorry for not sending patches myself. As I expect
to find some more issues in Kconfig files soon, I wanted to gather all of
them before sending any patches. However, I did not expect this to take me
so long. Therefore I am glad you took the initiative and just created
some patches.
-- 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Paul Bolle
On Wed, 2014-02-12 at 01:09 +0100, Martin Walch wrote:
> On Tuesday 11 February 2014 13:31:32 Paul Bolle wrote:
> > This patch also deserves a
> > Reported-by: Martin Walch 
> > 
> > line, but that apparently requires Martin's permission.
> 
> I would be happy.

It seems I interpreted the requirements for Reported-By: tags rather
strictly. We might change the documentation to discourage that
interpretation. (Greg, is it too late to add this tag in your queue?)

> And I am sorry for not sending patches myself. As I expect
> to find some more issues in Kconfig files soon, I wanted to gather all of
> them before sending any patches. However, I did not expect this to take me
> so long. Therefore I am glad you took the initiative and just created
> some patches.

My experience is that one can easily get stuck when trying to fix all
issues of a certain, broad category. Fixing all (say) all unused Kconfig
symbols is a big job. Fixing all that got added in v3.14-rc1 is doable
(depending on the amount of time one wants to spend).

Anyhow, I do hope you find time to send in patches yourself. Perhaps it
would help if we'd coordinate the stuff a bit. Richard seems keen to
help too.


Paul Bolle

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: r8188eu: default to "y" in Kconfig

2014-02-11 Thread Paul Bolle
On Wed, 2014-02-12 at 01:25 +0100, Paul Bolle wrote:
> (Greg, is it too late to add this tag in your queue?)

Greg already did! It was "USB: ELAN: Remove useless "default M" lines"
that lacks a Reported-by: tag.


Paul Bolle

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: android: remove unused constant, BINDER_SET_IDLE_PRIORITY

2014-02-11 Thread SeongJae Park
On Wed, Feb 12, 2014 at 5:22 AM, Greg KH  wrote:
> On Sat, Feb 08, 2014 at 11:59:41AM +0900, SeongJae Park wrote:
>> Remove constant BINDER_SET_IDLE_PRIORITY because it is not used from
>> anywhere.
>
>>
>> Signed-off-by: SeongJae Park 
>> ---
>>  drivers/staging/android/binder.h | 7 +++
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/android/binder.h 
>> b/drivers/staging/android/binder.h
>> index c4c1ed6..6d08e61 100644
>> --- a/drivers/staging/android/binder.h
>> +++ b/drivers/staging/android/binder.h
>> @@ -87,10 +87,9 @@ struct binder_version {
>>  #define BINDER_WRITE_READ_IOWR('b', 1, struct binder_write_read)
>>  #define BINDER_SET_IDLE_TIMEOUT  _IOW('b', 3, __s64)
>>  #define BINDER_SET_MAX_THREADS   _IOW('b', 5, __u32)
>> -#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32)
>> -#define BINDER_SET_CONTEXT_MGR   _IOW('b', 7, __s32)
>> -#define BINDER_THREAD_EXIT   _IOW('b', 8, __s32)
>> -#define BINDER_VERSION   _IOWR('b', 9, struct 
>> binder_version)
>> +#define BINDER_SET_CONTEXT_MGR   _IOW('b', 6, __s32)
>> +#define BINDER_THREAD_EXIT   _IOW('b', 7, __s32)
>> +#define BINDER_VERSION   _IOWR('b', 8, struct 
>> binder_version)
>
> And you just broke all userspace code that uses this interface :(
>
> Please be more careful, and test your patches properly.

Definitely my fault... Sorry.
I will be more careful and will not do such mistake again.

>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver

2014-02-11 Thread Roger

On 02/11/2014 05:50 PM, Ulf Hansson wrote:

On 11 February 2014 10:27, Roger  wrote:

On 02/10/2014 10:58 PM, Ulf Hansson wrote:


On 6 February 2014 15:35,   wrote:


From: Roger Tseng 

Realtek USB SD/MMC host driver provides mmc host support based on the
Realtek
USB card reader MFD driver.

Signed-off-by: Roger Tseng 
---
   drivers/mmc/host/Kconfig  |7 +
   drivers/mmc/host/Makefile |1 +
   drivers/mmc/host/rtsx_usb_sdmmc.c | 1500
+
   3 files changed, 1508 insertions(+)
   create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c


[snip]


+#ifdef CONFIG_PM_RUNTIME



There are stubs for pm_runtime* functions, thus the ifdefs can be removed.
Please go though the complete patch and remove all instances.


+   pm_runtime_put(sdmmc_dev(host));



I don't know so much about USB mmc hosts hardware, but I just wanted
to find out if I have understood this correct.

You can't do fine grained power management of the USB parent device,
since it needs to be runtime resumed to be able keep the power the
card? Once it becomes runtime suspended, the power to the card will
thus also be dropped?


Yes, and to keep some internal state of the controller.


Okay.

But the internal state of the controller should be possible to restore
at runtime_resume, so that should not be the reason, right?



I checked again. Internal registers will hold its state during suspend.
Card power is the exact reason.

Kind regards
Ulf Hansson

.


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] drivers:staging:silicom Fixed extern warnings reported by checkpatch

2014-02-11 Thread Surendra Patil
1) Deleted  bp_proc_create() declaration from bp_mod.h,
because it is declared as static in bpctl_mod.c and not used anywhere.

2) checkpatch warns about
 WARNING: externs should be avoided in .c files

because we have function declarations in bptcl_mod.c,These
functions are not used anywhere else so made them static.

Signed-off-by: Surendra Patil 
---
 drivers/staging/silicom/bp_mod.h|  2 --
 drivers/staging/silicom/bpctl_mod.c | 20 ++--
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/silicom/bp_mod.h b/drivers/staging/silicom/bp_mod.h
index 8154a7b..e6e 100644
--- a/drivers/staging/silicom/bp_mod.h
+++ b/drivers/staging/silicom/bp_mod.h
@@ -698,5 +698,3 @@ static inline unsigned int jiffies_to_msecs(const unsigned 
long j)
readl((void *)((a)->mem_map) + BP10GB_##reg))
 
 #endif
-
-int bp_proc_create(void);
diff --git a/drivers/staging/silicom/bpctl_mod.c 
b/drivers/staging/silicom/bpctl_mod.c
index 00b3c51..f4aea92 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -117,12 +117,12 @@ static int wdt_timer(struct bpctl_dev *pbpctl_dev, int 
*time_left);
 static struct bpctl_dev *get_status_port_fn(struct bpctl_dev *pbpctl_dev);
 static void if_scan_init(void);
 
-int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block);
-int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block);
-int bp_proc_create(void);
+static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block);
+static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block);
+static int bp_proc_create(void);
 
-int is_bypass_fn(struct bpctl_dev *pbpctl_dev);
-int get_dev_idx_bsf(int bus, int slot, int func);
+static int is_bypass_fn(struct bpctl_dev *pbpctl_dev);
+static int get_dev_idx_bsf(int bus, int slot, int func);
 
 static int bp_get_dev_idx_bsf(struct net_device *dev, int *index)
 {
@@ -262,7 +262,7 @@ static struct notifier_block bp_notifier_block = {
.notifier_call = bp_device_event,
 };
 
-int is_bypass_fn(struct bpctl_dev *pbpctl_dev);
+static int is_bypass_fn(struct bpctl_dev *pbpctl_dev);
 int wdt_time_left(struct bpctl_dev *pbpctl_dev);
 
 static void write_pulse(struct bpctl_dev *pbpctl_dev,
@@ -4906,7 +4906,7 @@ static int get_bypass_info_fn(struct bpctl_dev 
*pbpctl_dev, char *dev_name,
return 0;
 }
 
-int get_dev_idx_bsf(int bus, int slot, int func)
+static int get_dev_idx_bsf(int bus, int slot, int func)
 {
int idx_dev = 0;
for (idx_dev = 0;
@@ -6786,7 +6786,7 @@ EXPORT_SYMBOL(bp_if_scan_sd);
 
 static struct proc_dir_entry *bp_procfs_dir;
 
-int bp_proc_create(void)
+static int bp_proc_create(void)
 {
bp_procfs_dir = proc_mkdir(BP_PROC_DIR, init_net.proc_net);
if (bp_procfs_dir == (struct proc_dir_entry *)0) {
@@ -7414,7 +7414,7 @@ static int show_wd_autoreset(struct seq_file *m, void *v)
 }
 RW_FOPS(wd_autoreset)
 
-int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block)
+static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block)
 {
struct bypass_pfs_sd *current_pfs = &(pbp_device_block->bypass_pfs_set);
static struct proc_dir_entry *procfs_dir;
@@ -7484,7 +7484,7 @@ int bypass_proc_create_dev_sd(struct bpctl_dev 
*pbp_device_block)
return ret;
 }
 
-int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block)
+static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block)
 {
 
struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set;
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] drivers:staging:silicom fixed checkpatch coding style error on macros

2014-02-11 Thread Surendra Patil
checkpatch displays below errors for bypasslib/bp_ioctl.h file

 ERROR: Macros with complex values should be enclosed in parenthesis
Hence added parenthesis for macros with complex values.

Signed-off-by: Surendra Patil 
---
 drivers/staging/silicom/bypasslib/bp_ioctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bp_ioctl.h 
b/drivers/staging/silicom/bypasslib/bp_ioctl.h
index 2d1ef53..a0fb79f 100644
--- a/drivers/staging/silicom/bypasslib/bp_ioctl.h
+++ b/drivers/staging/silicom/bypasslib/bp_ioctl.h
@@ -51,7 +51,7 @@
 #define WDT_STEP_TIME  0x10/* BIT_4 */
 
 #define WD_MIN_TIME_GET(desc)   (desc & 0xf)
-#define WD_STEP_COUNT_GET(desc) (desc>>5) & 0xf
+#define WD_STEP_COUNT_GET(desc) ((desc>>5) & 0xf)
 
 typedef enum {
IS_BYPASS = 1,
@@ -156,7 +156,7 @@ typedef enum {
 
 } CMND_TYPE_SD;
 
-#define SIOCGIFBYPASS SIOCDEVPRIVATE+10
+#define SIOCGIFBYPASS (SIOCDEVPRIVATE+10)
 
 struct bp_info {
char prod_name[14];
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel