lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Oct 2015 14:17:23 -0700
From:	Moritz Fischer <moritz.fischer@...us.com>
To:	Alan Tull <atull@...nsource.altera.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	Josh Cartwright <joshc@...com>, linux-kernel@...r.kernel.org,
	Alan Tull <delicious.quinoa@...il.com>,
	"dinguyen@...nsource.altera.com" <dinguyen@...nsource.altera.com>
Subject: Re: [PATCH] fpga manager: remove label

On Thu, Oct 29, 2015 at 12:39 PM,  <atull@...nsource.altera.com> wrote:
> From: Alan Tull <atull@...nsource.altera.com>
>
> Remove implementation of 'label' DT binding.
>
> Signed-off-by: Alan Tull <atull@...nsource.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@...us.com>

Cheers,

Moritz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ