All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: of: display_timing: remove two unsafe error messages
@ 2014-05-13 12:58 Lucas Stach
  2014-05-15 10:47 ` Tomi Valkeinen
  2018-02-19 21:47   ` Vladimir Zapolskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Lucas Stach @ 2014-05-13 12:58 UTC (permalink / raw)
  To: linux-fbdev

The error message would try to dereference the pointer that
just has been tested to be NULL. As those messages don't
really add any value without the info that the np could
provide, just remove them.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/video/of_display_timing.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index ba5b40f581f6..3dc93cfacd47 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -115,10 +115,8 @@ int of_get_display_timing(struct device_node *np, const char *name,
 {
 	struct device_node *timing_np;
 
-	if (!np) {
-		pr_err("%s: no devicenode given\n", of_node_full_name(np));
+	if (!np)
 		return -EINVAL;
-	}
 
 	timing_np = of_get_child_by_name(np, name);
 	if (!timing_np) {
@@ -142,10 +140,8 @@ struct display_timings *of_get_display_timings(struct device_node *np)
 	struct device_node *native_mode;
 	struct display_timings *disp;
 
-	if (!np) {
-		pr_err("%s: no device node given\n", of_node_full_name(np));
+	if (!np)
 		return NULL;
-	}
 
 	timings_np = of_get_child_by_name(np, "display-timings");
 	if (!timings_np) {
-- 
2.0.0.rc0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] video: of: display_timing: remove two unsafe error messages
  2014-05-13 12:58 [PATCH] video: of: display_timing: remove two unsafe error messages Lucas Stach
@ 2014-05-15 10:47 ` Tomi Valkeinen
  2018-02-19 21:47   ` Vladimir Zapolskiy
  1 sibling, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-05-15 10:47 UTC (permalink / raw)
  To: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On 13/05/14 15:58, Lucas Stach wrote:
> The error message would try to dereference the pointer that
> just has been tested to be NULL. As those messages don't
> really add any value without the info that the np could
> provide, just remove them.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/video/of_display_timing.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Thanks, queued for 3.16.

 Tomi




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] video: of: display_timing: Remove of_display_timings_exist() function
@ 2018-02-19 21:47   ` Vladimir Zapolskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Zapolskiy @ 2018-02-19 21:47 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-fbdev, dri-devel

Since introduction of of_display_timings_exist() function in commit
cc3f414cf2e40 ("video: add of helper for display timings/videomode") it
didn't attract any users, and the function has no potential, because
of_get_display_timings() covers its functionality and does more.

Drop the unused exported function from the kernel.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/of_display_timing.c | 20 --------------------
 include/video/of_display_timing.h |  5 -----
 2 files changed, 25 deletions(-)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 8ce0a99..83b8963 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -244,23 +244,3 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 	return NULL;
 }
 EXPORT_SYMBOL_GPL(of_get_display_timings);
-
-/**
- * of_display_timings_exist - check if a display-timings node is provided
- * @np: device_node with the timing
- **/
-int of_display_timings_exist(const struct device_node *np)
-{
-	struct device_node *timings_np;
-
-	if (!np)
-		return -EINVAL;
-
-	timings_np = of_parse_phandle(np, "display-timings", 0);
-	if (!timings_np)
-		return -EINVAL;
-
-	of_node_put(timings_np);
-	return 1;
-}
-EXPORT_SYMBOL_GPL(of_display_timings_exist);
diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h
index 956455f..bb29e59 100644
--- a/include/video/of_display_timing.h
+++ b/include/video/of_display_timing.h
@@ -19,7 +19,6 @@ struct display_timings;
 int of_get_display_timing(const struct device_node *np, const char *name,
 		struct display_timing *dt);
 struct display_timings *of_get_display_timings(const struct device_node *np);
-int of_display_timings_exist(const struct device_node *np);
 #else
 static inline int of_get_display_timing(const struct device_node *np,
 		const char *name, struct display_timing *dt)
@@ -31,10 +30,6 @@ of_get_display_timings(const struct device_node *np)
 {
 	return NULL;
 }
-static inline int of_display_timings_exist(const struct device_node *np)
-{
-	return -ENOSYS;
-}
 #endif
 
 #endif
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] video: of: display_timing: Remove of_display_timings_exist() function
@ 2018-02-19 21:47   ` Vladimir Zapolskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Zapolskiy @ 2018-02-19 21:47 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-fbdev, dri-devel

Since introduction of of_display_timings_exist() function in commit
cc3f414cf2e40 ("video: add of helper for display timings/videomode") it
didn't attract any users, and the function has no potential, because
of_get_display_timings() covers its functionality and does more.

Drop the unused exported function from the kernel.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/of_display_timing.c | 20 --------------------
 include/video/of_display_timing.h |  5 -----
 2 files changed, 25 deletions(-)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 8ce0a99..83b8963 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -244,23 +244,3 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
 	return NULL;
 }
 EXPORT_SYMBOL_GPL(of_get_display_timings);
-
-/**
- * of_display_timings_exist - check if a display-timings node is provided
- * @np: device_node with the timing
- **/
-int of_display_timings_exist(const struct device_node *np)
-{
-	struct device_node *timings_np;
-
-	if (!np)
-		return -EINVAL;
-
-	timings_np = of_parse_phandle(np, "display-timings", 0);
-	if (!timings_np)
-		return -EINVAL;
-
-	of_node_put(timings_np);
-	return 1;
-}
-EXPORT_SYMBOL_GPL(of_display_timings_exist);
diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h
index 956455f..bb29e59 100644
--- a/include/video/of_display_timing.h
+++ b/include/video/of_display_timing.h
@@ -19,7 +19,6 @@ struct display_timings;
 int of_get_display_timing(const struct device_node *np, const char *name,
 		struct display_timing *dt);
 struct display_timings *of_get_display_timings(const struct device_node *np);
-int of_display_timings_exist(const struct device_node *np);
 #else
 static inline int of_get_display_timing(const struct device_node *np,
 		const char *name, struct display_timing *dt)
@@ -31,10 +30,6 @@ of_get_display_timings(const struct device_node *np)
 {
 	return NULL;
 }
-static inline int of_display_timings_exist(const struct device_node *np)
-{
-	return -ENOSYS;
-}
 #endif
 
 #endif
-- 
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] video: of: display_timing: Remove of_display_timings_exist() function
  2018-02-19 21:47   ` Vladimir Zapolskiy
@ 2018-03-12 15:48     ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-03-12 15:48 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-fbdev, dri-devel

On Monday, February 19, 2018 11:47:36 PM Vladimir Zapolskiy wrote:
> Since introduction of of_display_timings_exist() function in commit
> cc3f414cf2e40 ("video: add of helper for display timings/videomode") it
> didn't attract any users, and the function has no potential, because
> of_get_display_timings() covers its functionality and does more.
> 
> Drop the unused exported function from the kernel.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

Patch queued for 4.17, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] video: of: display_timing: Remove of_display_timings_exist() function
@ 2018-03-12 15:48     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-03-12 15:48 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-fbdev, dri-devel

On Monday, February 19, 2018 11:47:36 PM Vladimir Zapolskiy wrote:
> Since introduction of of_display_timings_exist() function in commit
> cc3f414cf2e40 ("video: add of helper for display timings/videomode") it
> didn't attract any users, and the function has no potential, because
> of_get_display_timings() covers its functionality and does more.
> 
> Drop the unused exported function from the kernel.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

Patch queued for 4.17, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-12 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 12:58 [PATCH] video: of: display_timing: remove two unsafe error messages Lucas Stach
2014-05-15 10:47 ` Tomi Valkeinen
2018-02-19 21:47 ` [PATCH] video: of: display_timing: Remove of_display_timings_exist() function Vladimir Zapolskiy
2018-02-19 21:47   ` Vladimir Zapolskiy
2018-03-12 15:48   ` Bartlomiej Zolnierkiewicz
2018-03-12 15:48     ` Bartlomiej Zolnierkiewicz

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.