linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga manager: remove label
@ 2015-10-29 19:39 atull
  2015-10-29 21:17 ` Moritz Fischer
  2015-10-29 22:18 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: atull @ 2015-10-29 19:39 UTC (permalink / raw)
  To: gregkh
  Cc: Josh Cartwright, Moritz Fischer, linux-kernel, delicious.quinoa,
	dinguyen, Alan Tull

From: Alan Tull <atull@opensource.altera.com>

Remove implementation of 'label' DT binding.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
 drivers/fpga/fpga-mgr.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index 45c41cb..f747311 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -257,7 +257,6 @@ int fpga_mgr_register(struct device *dev, const char *name,
 		      void *priv)
 {
 	struct fpga_manager *mgr;
-	const char *dt_label;
 	int id, ret;
 
 	if (!mops || !mops->write_init || !mops->write ||
@@ -305,11 +304,9 @@ int fpga_mgr_register(struct device *dev, const char *name,
 	mgr->dev.id = id;
 	dev_set_drvdata(dev, mgr);
 
-	dt_label = of_get_property(mgr->dev.of_node, "label", NULL);
-	if (dt_label)
-		ret = dev_set_name(&mgr->dev, "%s", dt_label);
-	else
-		ret = dev_set_name(&mgr->dev, "fpga%d", id);
+	ret = dev_set_name(&mgr->dev, "fpga%d", id);
+	if (ret)
+		goto error_device;
 
 	ret = device_add(&mgr->dev);
 	if (ret)
-- 
1.7.9.5


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

* Re: [PATCH] fpga manager: remove label
  2015-10-29 19:39 [PATCH] fpga manager: remove label atull
@ 2015-10-29 21:17 ` Moritz Fischer
  2015-10-29 22:18 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Moritz Fischer @ 2015-10-29 21:17 UTC (permalink / raw)
  To: Alan Tull; +Cc: Greg KH, Josh Cartwright, linux-kernel, Alan Tull, dinguyen

On Thu, Oct 29, 2015 at 12:39 PM,  <atull@opensource.altera.com> wrote:
> From: Alan Tull <atull@opensource.altera.com>
>
> Remove implementation of 'label' DT binding.
>
> Signed-off-by: Alan Tull <atull@opensource.altera.com>
> ---
>  drivers/fpga/fpga-mgr.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
> index 45c41cb..f747311 100644
> --- a/drivers/fpga/fpga-mgr.c
> +++ b/drivers/fpga/fpga-mgr.c
> @@ -257,7 +257,6 @@ int fpga_mgr_register(struct device *dev, const char *name,
>                       void *priv)
>  {
>         struct fpga_manager *mgr;
> -       const char *dt_label;
>         int id, ret;
>
>         if (!mops || !mops->write_init || !mops->write ||
> @@ -305,11 +304,9 @@ int fpga_mgr_register(struct device *dev, const char *name,
>         mgr->dev.id = id;
>         dev_set_drvdata(dev, mgr);
>
> -       dt_label = of_get_property(mgr->dev.of_node, "label", NULL);
> -       if (dt_label)
> -               ret = dev_set_name(&mgr->dev, "%s", dt_label);
> -       else
> -               ret = dev_set_name(&mgr->dev, "fpga%d", id);
> +       ret = dev_set_name(&mgr->dev, "fpga%d", id);
> +       if (ret)
> +               goto error_device;
>
>         ret = device_add(&mgr->dev);
>         if (ret)
> --
> 1.7.9.5
>
I had never used the if (dt_label) path, so the else path is pretty
well tested ;-)

Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>

Cheers,

Moritz

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

* Re: [PATCH] fpga manager: remove label
  2015-10-29 19:39 [PATCH] fpga manager: remove label atull
  2015-10-29 21:17 ` Moritz Fischer
@ 2015-10-29 22:18 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-10-29 22:18 UTC (permalink / raw)
  To: atull
  Cc: Josh Cartwright, Moritz Fischer, linux-kernel, delicious.quinoa,
	dinguyen

On Thu, Oct 29, 2015 at 02:39:56PM -0500, atull@opensource.altera.com wrote:
> From: Alan Tull <atull@opensource.altera.com>
> 
> Remove implementation of 'label' DT binding.

Why?  Please be descriptive of why you are doing something in the
changelog, not just what you are doing (hint, we can read that from the
code usually...)

thanks,

greg k-h

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

end of thread, other threads:[~2015-10-29 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 19:39 [PATCH] fpga manager: remove label atull
2015-10-29 21:17 ` Moritz Fischer
2015-10-29 22:18 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).