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] [day] [month] [year] [list]
Message-ID: <20190926055715.GI14159@localhost>
Date:   Thu, 26 Sep 2019 07:57:15 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Denis Efremov <efremov@...ux.com>
Cc:     Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        greybus-dev@...ts.linaro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] greybus: remove excessive check in
 gb_connection_hd_cport_quiesce()

On Thu, Sep 26, 2019 at 12:36:56AM +0300, Denis Efremov wrote:
> Function pointer "hd->driver->cport_quiesce" is already checked
> at the beginning of gb_connection_hd_cport_quiesce(). Thus, the
> second check can be removed.
> 
> Signed-off-by: Denis Efremov <efremov@...ux.com>
> ---
>  drivers/greybus/connection.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/greybus/connection.c b/drivers/greybus/connection.c
> index fc8f57f97ce6..e3799a53a193 100644
> --- a/drivers/greybus/connection.c
> +++ b/drivers/greybus/connection.c
> @@ -361,9 +361,6 @@ static int gb_connection_hd_cport_quiesce(struct gb_connection *connection)
>  	if (connection->mode_switch)
>  		peer_space += sizeof(struct gb_operation_msg_hdr);
>  
> -	if (!hd->driver->cport_quiesce)
> -		return 0;
> -
>  	ret = hd->driver->cport_quiesce(hd, connection->hd_cport_id,
>  					peer_space,
>  					GB_CONNECTION_CPORT_QUIESCE_TIMEOUT);

Nice catch, thanks.

Acked-by: Johan Hovold <johan@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ