lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd6f47c8-13bc-f20e-90ce-208bd10c3bc0@ti.com>
Date:   Tue, 13 Aug 2019 14:13:32 +0300
From:   Roger Quadros <rogerq@...com>
To:     Nishka Dasgupta <nishkadg.linux@...il.com>, <tony@...mide.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] bus: ti-sysc: sysc_check_children(): Change return
 type to void


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 <nishkadg.linux@...il.com>
> ---
> - 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ