Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1275151 > unrolled thread
| Started by | Saurabh Sengar <saurabh.truth@gmail.com> |
|---|---|
| First post | 2015-11-23 10:30 +0100 |
| Last post | 2015-11-25 17:50 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] leds/powernv : removing NULL check Saurabh Sengar <saurabh.truth@gmail.com> - 2015-11-23 10:30 +0100
Re: [PATCH] leds/powernv : removing NULL check Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-11-23 13:40 +0100
Re: [PATCH] leds/powernv : removing NULL check Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2015-11-25 15:50 +0100
Re: [PATCH] leds/powernv : removing NULL check Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-11-25 16:20 +0100
Re: [PATCH] leds/powernv : removing NULL check Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 2015-11-25 17:50 +0100
| From | Saurabh Sengar <saurabh.truth@gmail.com> |
|---|---|
| Date | 2015-11-23 10:30 +0100 |
| Subject | [PATCH] leds/powernv : removing NULL check |
| Message-ID | <qxVBE-8jJ-3@gated-at.bofh.it> |
no need to explicitly check for pointer to be null,
of_prop_next_string anyways return NULL, if passed pointer is NULL
and hence loop will continue
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
drivers/leds/leds-powernv.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/leds/leds-powernv.c b/drivers/leds/leds-powernv.c
index 1e75e1f..bc2d76e 100644
--- a/drivers/leds/leds-powernv.c
+++ b/drivers/leds/leds-powernv.c
@@ -256,8 +256,6 @@ static int powernv_led_classdev(struct platform_device *pdev,
for_each_child_of_node(led_node, np) {
p = of_find_property(np, "led-types", NULL);
- if (!p)
- continue;
while ((cur = of_prop_next_string(p, cur)) != NULL) {
powernv_led = devm_kzalloc(dev, sizeof(*powernv_led),
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jacek Anaszewski <j.anaszewski@samsung.com> |
|---|---|
| Date | 2015-11-23 13:40 +0100 |
| Message-ID | <qxYzw-1JL-13@gated-at.bofh.it> |
| In reply to | #1275151 |
On 11/23/2015 10:28 AM, Saurabh Sengar wrote:
> no need to explicitly check for pointer to be null,
> of_prop_next_string anyways return NULL, if passed pointer is NULL
> and hence loop will continue
>
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
> ---
> drivers/leds/leds-powernv.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/leds/leds-powernv.c b/drivers/leds/leds-powernv.c
> index 1e75e1f..bc2d76e 100644
> --- a/drivers/leds/leds-powernv.c
> +++ b/drivers/leds/leds-powernv.c
> @@ -256,8 +256,6 @@ static int powernv_led_classdev(struct platform_device *pdev,
>
> for_each_child_of_node(led_node, np) {
> p = of_find_property(np, "led-types", NULL);
> - if (!p)
> - continue;
>
> while ((cur = of_prop_next_string(p, cur)) != NULL) {
> powernv_led = devm_kzalloc(dev, sizeof(*powernv_led),
>
Applied, thanks.
--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-11-25 15:50 +0100 |
| Message-ID | <qyJyp-7yQ-15@gated-at.bofh.it> |
| In reply to | #1275151 |
On 11/23/2015 02:58 PM, Saurabh Sengar wrote: > no need to explicitly check for pointer to be null, > of_prop_next_string anyways return NULL, if passed pointer is NULL > and hence loop will continue Thanks! Patch looks good. -Vasant -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jacek Anaszewski <j.anaszewski@samsung.com> |
|---|---|
| Date | 2015-11-25 16:20 +0100 |
| Message-ID | <qyK1s-7ZU-17@gated-at.bofh.it> |
| In reply to | #1277439 |
On 11/25/2015 03:44 PM, Vasant Hegde wrote: > On 11/23/2015 02:58 PM, Saurabh Sengar wrote: >> no need to explicitly check for pointer to be null, >> of_prop_next_string anyways return NULL, if passed pointer is NULL >> and hence loop will continue > > Thanks! Patch looks good. > > -Vasant > > I infer that you offer your: Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Can I add it? :) -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-11-25 17:50 +0100 |
| Message-ID | <qyLqx-nr-1@gated-at.bofh.it> |
| In reply to | #1277464 |
On 11/25/2015 08:47 PM, Jacek Anaszewski wrote: > On 11/25/2015 03:44 PM, Vasant Hegde wrote: >> On 11/23/2015 02:58 PM, Saurabh Sengar wrote: >>> no need to explicitly check for pointer to be null, >>> of_prop_next_string anyways return NULL, if passed pointer is NULL >>> and hence loop will continue >> >> Thanks! Patch looks good. >> >> -Vasant >> >> > > I infer that you offer your: Yes.. Forgot to add Ack-by tag. > > Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> > > Can I add it? :) Sure. Thanks! -Vasant -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web