Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432747
| Path | csiph.com!news.freedyn.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 64/92] clocksource/drivers/zevio: Convert init function to return error |
| Date | Tue, 28 Jun 2016 12:40:01 +0200 |
| Message-ID | <rOYAV-5IE-9@gated-at.bofh.it> (permalink) |
| References | <rOYAV-5IE-3@gated-at.bofh.it> <rOYAV-5IE-5@gated-at.bofh.it> |
| X-Original-To | daniel.lezcano@linaro.org, tglx@linutronix.de |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DGH/MCS5ppC8xHM0SOzQqLWfgMmiT0One/n7c2w8P/Y=; b=RJMmYfVqhpiyHOZp2c7OA7SPjH2wvpQapCk3OIKKgrzkR7Xu5FhAb9sbfE28y+ttsB 0ct0gN1dmE+nPRQMRfKll5qclq5f370uv0H+EFHh13HLgqL2rhSAizvsm7B6y4YJotmj KjdGA/1bmy4CS2euFjKcATIrFBf22Eu7DPi78= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DGH/MCS5ppC8xHM0SOzQqLWfgMmiT0One/n7c2w8P/Y=; b=Dv37Dj6zB91zTvRKxRK94cupgegaBImTvJ8fGsR5OoYOEKMBkfBrG7stGmobpdz3mU dxi56fXMwmdvSoud8sDPJQk/5xcrWTS3hNF3ZYegPgyHO0Cei4u10xjP8yYAahG4x95Y p9cGWjN1pul+BC0RyHzk8hdxRX/Ufydy35o3q+V2v/r3KQTYFkIllRNNF+ApvbbCTrgK LUW3WaMPwV376jLbnuuJNPPhZP1ccU4+gWrg7E+7z9B94rF8duu1TGwYTt/zM5dQHZpu gcSWOQa3fo2hVY4JVXEDIFRWTiQNXkcuZFOljQhnQMnx2MnPQKAlbwT0HiUPGqk7xozm Bb5Q== |
| X-Gm-Message-State | ALyK8tJUuxof50AXjSH/N9K23IapzVGRLDtd8tO80zVBmKUuIGXmqqQZmS7ZYPE0bBGYmPYI |
| X-Received | by 10.194.192.97 with SMTP id hf1mr2619654wjc.175.1467110064277; Tue, 28 Jun 2016 03:34:24 -0700 (PDT) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 40 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 28 Jun 2016 12:31:23 +0200 |
| X-Original-Message-ID | <1467109911-11060-64-git-send-email-daniel.lezcano@linaro.org> |
| X-Original-References | <577251A4.7030508@linaro.org> <1467109911-11060-1-git-send-email-daniel.lezcano@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1432747 |
Show key headers only | View raw
The init functions do not return any error. They behave as the following:
- panic, thus leading to a kernel crash while another timer may work and
make the system boot up correctly
or
- print an error and let the caller unaware if the state of the system
Change that by converting the init functions to return an error conforming
to the CLOCKSOURCE_OF_RET prototype.
Proper error handling (rollback, errno value) will be changed later case
by case, thus this change just return back an error or success in the init
function.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/zevio-timer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/zevio-timer.c b/drivers/clocksource/zevio-timer.c
index ceaa613..cb4cf056 100644
--- a/drivers/clocksource/zevio-timer.c
+++ b/drivers/clocksource/zevio-timer.c
@@ -210,9 +210,9 @@ error_free:
return ret;
}
-static void __init zevio_timer_init(struct device_node *node)
+static int __init zevio_timer_init(struct device_node *node)
{
- BUG_ON(zevio_timer_add(node));
+ return zevio_timer_add(node);
}
-CLOCKSOURCE_OF_DECLARE(zevio_timer, "lsi,zevio-timer", zevio_timer_init);
+CLOCKSOURCE_OF_DECLARE_RET(zevio_timer, "lsi,zevio-timer", zevio_timer_init);
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 64/92] clocksource/drivers/zevio: Convert init function to return error Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-28 12:40 +0200
csiph-web