All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] firmware_classs: change val uevent's type to bool
  2011-01-26 10:00 [PATCH] firmware_classs: change val uevent's type to bool Bob Liu
@ 2011-01-26  9:56 ` Berg, Johannes
  2011-01-26 10:03   ` Bob Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Berg, Johannes @ 2011-01-26  9:56 UTC (permalink / raw)
  To: Bob Liu, linux-kernel; +Cc: chrisw, Winkler, Tomas, dmitry.torokhov, gregkh

@@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
        f_dev->parent = device;
        f_dev->class = &firmware_class;

-       dev_set_uevent_suppress(f_dev, true);
+       if (uevent)
+               dev_set_uevent_suppress(f_dev, true);

Everything but this is a no-op basically, but you didn't even describe this change?

johannes
--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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

* [PATCH] firmware_classs: change val uevent's type to bool
@ 2011-01-26 10:00 Bob Liu
  2011-01-26  9:56 ` Berg, Johannes
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Liu @ 2011-01-26 10:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: chrisw, tomas.winkler, johannes.berg, dmitry.torokhov, gregkh, Bob Liu

Some place in firmware_class.c using "int uevent" define, but others use "bool
uevent".
This patch replace all int uevent define to bool and fix a place missing
uevent check.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
 drivers/base/firmware_class.c |   10 +++++-----
 include/linux/firmware.h      |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 40af43e..9ef8941 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
 	f_dev->parent = device;
 	f_dev->class = &firmware_class;
 
-	dev_set_uevent_suppress(f_dev, true);
+	if (uevent)
+		dev_set_uevent_suppress(f_dev, true);
 
 	/* Need to pin this module until class device is destroyed */
 	__module_get(THIS_MODULE);
@@ -593,8 +594,7 @@ int
 request_firmware(const struct firmware **firmware_p, const char *name,
                  struct device *device)
 {
-        int uevent = 1;
-        return _request_firmware(firmware_p, name, device, uevent, false);
+        return _request_firmware(firmware_p, name, device, true, false);
 }
 
 /**
@@ -618,7 +618,7 @@ struct firmware_work {
 	struct device *device;
 	void *context;
 	void (*cont)(const struct firmware *fw, void *context);
-	int uevent;
+	bool uevent;
 };
 
 static int request_firmware_work_func(void *arg)
@@ -661,7 +661,7 @@ static int request_firmware_work_func(void *arg)
  **/
 int
 request_firmware_nowait(
-	struct module *module, int uevent,
+	struct module *module, bool uevent,
 	const char *name, struct device *device, gfp_t gfp, void *context,
 	void (*cont)(const struct firmware *fw, void *context))
 {
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 53d1e6c..21b3e75 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -39,7 +39,7 @@ struct builtin_fw {
 int request_firmware(const struct firmware **fw, const char *name,
 		     struct device *device);
 int request_firmware_nowait(
-	struct module *module, int uevent,
+	struct module *module, bool uevent,
 	const char *name, struct device *device, gfp_t gfp, void *context,
 	void (*cont)(const struct firmware *fw, void *context));
 
@@ -52,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw,
 	return -EINVAL;
 }
 static inline int request_firmware_nowait(
-	struct module *module, int uevent,
+	struct module *module, bool uevent,
 	const char *name, struct device *device, gfp_t gfp, void *context,
 	void (*cont)(const struct firmware *fw, void *context))
 {
-- 
1.6.3.3


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

* Re: [PATCH] firmware_classs: change val uevent's type to bool
  2011-01-26  9:56 ` Berg, Johannes
@ 2011-01-26 10:03   ` Bob Liu
  2011-01-26 10:15     ` Greg KH
  2011-01-26 10:23     ` Berg, Johannes
  0 siblings, 2 replies; 5+ messages in thread
From: Bob Liu @ 2011-01-26 10:03 UTC (permalink / raw)
  To: Berg, Johannes
  Cc: linux-kernel, chrisw, Winkler, Tomas, dmitry.torokhov, gregkh

On Wed, Jan 26, 2011 at 5:56 PM, Berg, Johannes <johannes.berg@intel.com> wrote:
> @@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
>        f_dev->parent = device;
>        f_dev->class = &firmware_class;
>
> -       dev_set_uevent_suppress(f_dev, true);
> +       if (uevent)
> +               dev_set_uevent_suppress(f_dev, true);
>
> Everything but this is a no-op basically, but you didn't even describe this change?
>


Hmm.. Sorry for that, but I mentioned that by "fix a place missing
uevent check".
I added this check because I think it should be paired with following
dev_set_uevent_suppress(f_dev, false).

-- 
Regards,
--Bob

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

* Re: [PATCH] firmware_classs: change val uevent's type to bool
  2011-01-26 10:03   ` Bob Liu
@ 2011-01-26 10:15     ` Greg KH
  2011-01-26 10:23     ` Berg, Johannes
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2011-01-26 10:15 UTC (permalink / raw)
  To: Bob Liu
  Cc: Berg, Johannes, linux-kernel, chrisw, Winkler, Tomas, dmitry.torokhov

On Wed, Jan 26, 2011 at 06:03:32PM +0800, Bob Liu wrote:
> On Wed, Jan 26, 2011 at 5:56 PM, Berg, Johannes <johannes.berg@intel.com> wrote:
> > @@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
> >        f_dev->parent = device;
> >        f_dev->class = &firmware_class;
> >
> > -       dev_set_uevent_suppress(f_dev, true);
> > +       if (uevent)
> > +               dev_set_uevent_suppress(f_dev, true);
> >
> > Everything but this is a no-op basically, but you didn't even describe this change?
> >
> 
> 
> Hmm.. Sorry for that, but I mentioned that by "fix a place missing
> uevent check".
> I added this check because I think it should be paired with following
> dev_set_uevent_suppress(f_dev, false).

That's fine, but please, split that out into a separate patch.

Remember, a patch should only do one thing.

Please resend this as two patches and I will be glad to queue it up.

thanks,

greg k-h

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

* RE: [PATCH] firmware_classs: change val uevent's type to bool
  2011-01-26 10:03   ` Bob Liu
  2011-01-26 10:15     ` Greg KH
@ 2011-01-26 10:23     ` Berg, Johannes
  1 sibling, 0 replies; 5+ messages in thread
From: Berg, Johannes @ 2011-01-26 10:23 UTC (permalink / raw)
  To: Bob Liu; +Cc: linux-kernel, chrisw, Winkler, Tomas, dmitry.torokhov, gregkh


________________________________________
From: Bob Liu [lliubbo@gmail.com]
Sent: Wednesday, January 26, 2011 11:03
To: Berg, Johannes
Cc: linux-kernel@vger.kernel.org; chrisw@sous-sol.org; Winkler, Tomas; dmitry.torokhov@gmail.com; gregkh@suse.de
Subject: Re: [PATCH] firmware_classs: change val uevent's type to bool

On Wed, Jan 26, 2011 at 5:56 PM, Berg, Johannes <johannes.berg@intel.com> wrote:
> @@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
>        f_dev->parent = device;
>        f_dev->class = &firmware_class;
>
> -       dev_set_uevent_suppress(f_dev, true);
> +       if (uevent)
> +               dev_set_uevent_suppress(f_dev, true);
>
> Everything but this is a no-op basically, but you didn't even describe this change?
>


Hmm.. Sorry for that, but I mentioned that by "fix a place missing
uevent check".
I added this check because I think it should be paired with following
dev_set_uevent_suppress(f_dev, false).

I don't think it should -- if you don't want uevents, then they should _always_ be suppressed, right?

johannes
--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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

end of thread, other threads:[~2011-01-26 10:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 10:00 [PATCH] firmware_classs: change val uevent's type to bool Bob Liu
2011-01-26  9:56 ` Berg, Johannes
2011-01-26 10:03   ` Bob Liu
2011-01-26 10:15     ` Greg KH
2011-01-26 10:23     ` Berg, Johannes

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.