All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nicolas Saenz Julienne <nsaenz@kernel.org>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>,
	linux-staging@lists.linux.dev,
	Stefan Wahren <stefan.wahren@i2se.com>
Subject: [PATCH V2 06/11] staging: vchiq_arm: drop return value of vchiq_arm_init_state
Date: Sun, 25 Apr 2021 12:50:58 +0200	[thread overview]
Message-ID: <1619347863-16080-7-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1619347863-16080-1-git-send-email-stefan.wahren@i2se.com>

The function vchiq_arm_init_state() cannot fail. So drop the return
value and the unnecessary code.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c    | 8 ++------
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c     | 3 +--
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h     | 2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index 8782ebe..7c336d0 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -172,7 +172,6 @@ int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
 enum vchiq_status
 vchiq_platform_init_state(struct vchiq_state *state)
 {
-	enum vchiq_status status = VCHIQ_SUCCESS;
 	struct vchiq_2835_state *platform_state;
 
 	state->platform_state = kzalloc(sizeof(*platform_state), GFP_KERNEL);
@@ -182,12 +181,9 @@ vchiq_platform_init_state(struct vchiq_state *state)
 	platform_state = (struct vchiq_2835_state *)state->platform_state;
 
 	platform_state->inited = 1;
-	status = vchiq_arm_init_state(state, &platform_state->arm_state);
+	vchiq_arm_init_state(state, &platform_state->arm_state);
 
-	if (status != VCHIQ_SUCCESS)
-		platform_state->inited = 0;
-
-	return status;
+	return VCHIQ_SUCCESS;
 }
 
 struct vchiq_arm_state*
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index c51840a..db10d83 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2312,7 +2312,7 @@ vchiq_keepalive_thread_func(void *v)
 	return 0;
 }
 
-enum vchiq_status
+void
 vchiq_arm_init_state(struct vchiq_state *state,
 		     struct vchiq_arm_state *arm_state)
 {
@@ -2328,7 +2328,6 @@ vchiq_arm_init_state(struct vchiq_state *state,
 		arm_state->first_connect = 0;
 
 	}
-	return VCHIQ_SUCCESS;
 }
 
 enum vchiq_status
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
index 24c331c..c7d2cf1 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h
@@ -67,7 +67,7 @@ int vchiq_platform_init(struct platform_device *pdev,
 extern struct vchiq_state *
 vchiq_get_state(void);
 
-extern enum vchiq_status
+extern void
 vchiq_arm_init_state(struct vchiq_state *state,
 		     struct vchiq_arm_state *arm_state);
 
-- 
2.7.4


  parent reply	other threads:[~2021-04-25 10:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 10:50 [PATCH V2 00/11] staging: vchiq_arm: address TODO list Stefan Wahren
2021-04-25 10:50 ` [PATCH V2 01/11] staging: vchiq_arm: avoid crashing the kernel Stefan Wahren
2021-04-25 10:50 ` [PATCH V2 02/11] staging: vchiq_core: break early in vchiq_close_service_internal Stefan Wahren
2021-04-25 10:50 ` [PATCH V2 03/11] staging: vchiq_core: return early in do_abort_bulks Stefan Wahren
2021-04-26  8:37   ` nicolas saenz julienne
2021-04-25 10:50 ` [PATCH V2 04/11] staging: vchiq_core: introduce get_bulk_reason Stefan Wahren
2021-04-26  8:38   ` nicolas saenz julienne
2021-04-25 10:50 ` [PATCH V2 05/11] staging: vchiq_core: Drop unnecessary check in notify_bulks Stefan Wahren
2021-04-25 10:50 ` Stefan Wahren [this message]
2021-04-25 10:50 ` [PATCH V2 07/11] staging: vchiq_2835_arm: drop enum vchiq_status Stefan Wahren
2021-04-25 10:51 ` [PATCH V2 08/11] staging: vchiq_arm: drop enum vchiq_status from vchiq_*_internal Stefan Wahren
2021-04-25 10:51 ` [PATCH V2 09/11] staging: vchiq_core: drop vchiq_status from vchiq_set_service_option Stefan Wahren
2021-04-26  8:39   ` nicolas saenz julienne
2021-06-03  8:03   ` nicolas saenz julienne
2021-04-25 10:51 ` [PATCH V2 10/11] staging: vchiq_core: drop vchiq_status from vchiq_initialise Stefan Wahren
2021-04-25 10:51 ` [PATCH V2 11/11] staging: vchiq_core: drop vchiq_status from vchiq_init_state Stefan Wahren

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=1619347863-16080-7-git-send-email-stefan.wahren@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=fabioaiuto83@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=nsaenz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.