Re: [PATCH] staging: vc04_services: Fix wrong early return in next_service_by_instance()

2020-02-17 Thread Dan Carpenter
On Thu, Feb 13, 2020 at 02:40:01PM -0500, Marcelo Diop-Gonzalez wrote:
> If kref_get_unless_zero() fails, we should keep looking for the
> next service, since the callers of this function expect that a NULL
> return value means there are no more.
> 
> Signed-off-by: Marcelo Diop-Gonzalez 
> ---

Please use a Fixes tag.

Fixes: a2203cfe0d84 ("staging: vc04_services: don't increment service refcount 
when it's not needed")

That way we know it doesn't need to be backported.

regards,
dan carpenter

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


Re: [PATCH] staging: vc04_services: Fix wrong early return in next_service_by_instance()

2020-02-17 Thread Nicolas Saenz Julienne
On Thu Feb 13, 2020 at 2:40 PM, Marcelo Diop-Gonzalez wrote:
> If kref_get_unless_zero() fails, we should keep looking for the
> next service, since the callers of this function expect that a NULL
> return value means there are no more.
>
> Signed-off-by: Marcelo Diop-Gonzalez 

Reviewed-by: Nicolas Saenz Julienne 
Tested-by: Nicolas Saenz Julienne 

Note that, as Dan says, picking up the Fixes tag would be nice.

> ---
> .../vc04_services/interface/vchiq_arm/vchiq_core.c | 14 +-
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git
> a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> index d7d7f4d9d57f..edcd97373809 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> @@ -252,11 +252,15 @@ next_service_by_instance(struct vchiq_state
> *state,
> struct vchiq_service *service;
>  
> rcu_read_lock();
> - service = __next_service_by_instance(state, instance, pidx);
> - if (service && kref_get_unless_zero(&service->ref_count))
> - service = rcu_pointer_handoff(service);
> - else
> - service = NULL;
> + while (1) {
> + service = __next_service_by_instance(state, instance, pidx);
> + if (!service)
> + break;
> + if (kref_get_unless_zero(&service->ref_count)) {
> + service = rcu_pointer_handoff(service);
> + break;
> + }
> + }
> rcu_read_unlock();
> return service;
> }
> --
> 2.25.0.225.g125e21ebc7-goog

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


Re: [PATCH] Staging: comedi: drivers: fixed errors warning coding style issue

2020-02-17 Thread Greg KH
On Sun, Feb 16, 2020 at 06:16:56PM +0530, Sunny Pranay wrote:
> > Before the patch were created there were few warnings indicating the
> statements were bigger than 80 characters and some of them were not
> properly commented like having extra space. So I created a patch for that
> reducing comments to below 80 characters and maintained proper spacing.
> That was I meant by fixed coding style issue.
> 
> > My original name is M Pranay

Ok, then please fix this by properly saying all of this in the changelog
text when you resubmit the patch.

thanks,

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


Re: staging: board: disabled driver

2020-02-17 Thread Dan Carpenter
On Fri, Feb 14, 2020 at 12:22:05AM +0530, Kaaira Gupta wrote:
> I made some changes in board.h and other files under board to remove the 
> MACRO using conditions. I did git log --oneline "file path" to get the logs, 
> but turned out the driver was disabled. Hence on seeing it's KConfig file I 
> found STAGING_BOARd and searched it in device drivers in menuconfig. I found 
> that OF_ADDRESS-> OF-> X86_INTEL_CE were disabled as well. But I couldn't 
> find X86_INTEL_CE under the device drivers.What should I do about it? Is 
> there a way around or should I look at other drivers than board?
> Thanks for your time!

Use "make nconfig" and then press F8 and search for X86_INTEL_CE.

regards,
dan carpenter

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