Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339916
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/9] clk: gpio: Remove impossible check for of_clk_get_parent_count() < 0 |
| Date | 2016-02-22 22:00 +0100 |
| Message-ID | <r55Kj-2Wr-39@gated-at.bofh.it> (permalink) |
| References | <r55Ki-2Wr-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The check for < 0 is impossible now that
of_clk_get_parent_count() returns an unsigned int. Simplify the
code and update the type here.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
drivers/clk/clk-gpio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 522bffdbacc5..08f65acc5d57 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -205,15 +205,13 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
const char **parent_names, *gpio_name;
- int num_parents, gpio;
+ unsigned int num_parents;
+ int gpio;
enum of_gpio_flags of_flags;
struct clk *clk;
bool active_low, is_mux;
num_parents = of_clk_get_parent_count(node);
- if (num_parents < 0)
- num_parents = 0;
-
if (num_parents) {
parent_names = devm_kcalloc(&pdev->dev, num_parents,
sizeof(char *), GFP_KERNEL);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/9] Change return type of of_clk_get_parent_count() to unsigned Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 9/9] simplefb: Remove impossible check for of_clk_get_parent_count() < 0 Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
Re: [PATCH 9/9] simplefb: Remove impossible check for of_clk_get_parent_count() < 0 Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-02-26 12:40 +0100
[PATCH 5/9] clk: st: Remove impossible check for of_clk_get_parent_count() < 0 Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 8/9] usb: dwc3: Remove impossible check for of_clk_get_parent_count() < 0 Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
Re: [PATCH 8/9] usb: dwc3: Remove impossible check for of_clk_get_parent_count() < 0 Felipe Balbi <balbi@kernel.org> - 2016-02-23 07:50 +0100
[PATCH 4/9] clk: h8300: Remove impossible check for of_clk_get_parent_count() Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 7/9] clk: ti: Update for of_clk_get_parent_count() returning unsigned int Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 6/9] clk: sunxi: Use proper type for of_clk_get_parent_count() return value Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 2/9] clk: at91: Remove impossible checks for of_clk_get_parent_count() Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 1/9] clk: Make of_clk_get_parent_count() return unsigned ints Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
[PATCH 3/9] clk: gpio: Remove impossible check for of_clk_get_parent_count() < 0 Stephen Boyd <sboyd@codeaurora.org> - 2016-02-22 22:00 +0100
csiph-web