On 13/08/2019 10:55, Nishka Dasgupta wrote:
> Change return type of function sysc_check_children() from int to void as
> it always returns 0. Remove its return statement as well.
> At call site, remove the variable that was used to store the return
> value, as well as the check on the return value.
> 

You don't need to describe each and everything as it is obvious
from code. How about?
"Change return type of sysc_check_children() to "void"
as it never returns error"

Should both patches can be squashed into one patch?

> Signed-off-by: Nishka Dasgupta <[email protected]>
> ---
> - This is a new patch; labelled v3 only because it is in the same series
>   as the previous patch.
> 
>  drivers/bus/ti-sysc.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> index 9c6d3e121d37..a2eae8f36ef8 100644
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -628,14 +628,12 @@ static void sysc_check_one_child(struct sysc *ddata,
>       sysc_parse_dts_quirks(ddata, np, true);
>  }
>  
> -static int sysc_check_children(struct sysc *ddata)
> +static void sysc_check_children(struct sysc *ddata)
>  {
>       struct device_node *child;
>  
>       for_each_child_of_node(ddata->dev->of_node, child)
>               sysc_check_one_child(ddata, child);
> -
> -     return 0;
>  }
>  
>  /*
> @@ -788,9 +786,7 @@ static int sysc_map_and_check_registers(struct sysc 
> *ddata)
>       if (error)
>               return error;
>  
> -     error = sysc_check_children(ddata);
> -     if (error)
> -             return error;
> +     sysc_check_children(ddata);
>  
>       error = sysc_parse_registers(ddata);
>       if (error)
> 

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Reply via email to