public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Denis Efremov <efremov@linux.com>,
	greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: [PATCH] greybus: remove excessive check in gb_connection_hd_cport_quiesce()
Date: Thu, 26 Sep 2019 00:36:56 +0300	[thread overview]
Message-ID: <20190925213656.8950-1-efremov@linux.com> (raw)

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@linux.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);
-- 
2.21.0


             reply	other threads:[~2019-09-25 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 21:36 Denis Efremov [this message]
2019-09-26  5:57 ` [PATCH] greybus: remove excessive check in gb_connection_hd_cport_quiesce() Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190925213656.8950-1-efremov@linux.com \
    --to=efremov@linux.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox