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]
Message-Id: <201203262212.36741.rjw@sisk.pl>
Date:	Mon, 26 Mar 2012 22:12:36 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Saravana Kannan <skannan@...eaurora.org>,
	Kay Sievers <kay.sievers@...y.org>,
	Greg KH <gregkh@...uxfoundation.org>,
	Christian Lamparter <chunkeey@...glemail.com>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	alan@...rguk.ukuu.org.uk,
	Linux PM mailing list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 2/6] firmware_class: Split _request_firmware() into three functions

On Monday, March 26, 2012, Stephen Boyd wrote:
> On 03/26/12 11:15, Stephen Boyd wrote:
> > On 03/25/12 15:01, Rafael J. Wysocki wrote:
> >>  drivers/base/firmware_class.c |   57 +++++++++++++++++++++++++++++-------------
> >>  1 file changed, 40 insertions(+), 17 deletions(-)
> >>
> >> Index: linux/drivers/base/firmware_class.c
> >> ===================================================================
> >> --- linux.orig/drivers/base/firmware_class.c
> >> +++ linux/drivers/base/firmware_class.c
> >> @@ -435,7 +435,7 @@ static void firmware_class_timeout(u_lon
> >>  }
> >>  
> >>  static struct firmware_priv *
> >> -fw_create_instance(struct firmware *firmware, const char *fw_name,
> >> +fw_create_instance(const struct firmware *firmware, const char *fw_name,
> >>  		   struct device *device, bool uevent, bool nowait)
> >>  {
> >>  	struct firmware_priv *fw_priv;
> >> @@ -449,7 +449,7 @@ fw_create_instance(struct firmware *firm
> >>  		goto err_out;
> >>  	}
> >>  
> >> -	fw_priv->fw = firmware;
> >> +	fw_priv->fw = (struct firmware *)firmware;
> >>  	fw_priv->nowait = nowait;
> >>  	strcpy(fw_priv->fw_id, fw_name);
> >>  	init_completion(&fw_priv->completion);
> > Can we avoid this cast? If we do some parts of fw_create_instance()
> > during the setup phase I think we can avoid it.
> >
> 
> Oops. With the other patch you can squash this in to do what I
> originally talked about.
> 
> -----8<-----
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index fbe98a8..113d37d 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -435,7 +435,7 @@ static void firmware_class_timeout(u_long data)
>  }
>  
>  static struct firmware_priv *
> -fw_create_instance(const struct firmware *firmware, const char *fw_name,
> +fw_create_instance(struct firmware *firmware, const char *fw_name,
>                    struct device *device, bool uevent, bool nowait)
>  {
>         struct firmware_priv *fw_priv;
> @@ -447,7 +447,7 @@ fw_create_instance(const struct firmware *firmware, const char *fw_name,
>                 return ERR_PTR(-ENOMEM);
>         }
>  
> -       fw_priv->fw = (struct firmware *)firmware;
> +       fw_priv->fw = firmware;
>         fw_priv->nowait = nowait;
>         strcpy(fw_priv->fw_id, fw_name);
>         init_completion(&fw_priv->completion);

Hmm, what other patch?  The one you send previously?

Rafael
--
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