From: Marcel Holtmann <marcel@holtmann.org>
To: Greg KH <greg@kroah.com>
Cc: Shaohua Li <shaohua.li@intel.com>,
lkml <linux-kernel@vger.kernel.org>,
Patrick Mochel <mochel@digitalimplant.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/2] request_firmware without a device
Date: Thu, 25 May 2006 12:24:54 +0200 [thread overview]
Message-ID: <1148552694.4734.10.camel@localhost> (raw)
In-Reply-To: <20060525040134.GA29974@kroah.com>
Hi Greg,
> > The patch allows calling request_firmware without a 'struct device'.
> > It appears we just need a name here from 'struct device'. I changed it
> > to use a kobject as Patrick suggested.
> > Next patch will use the new API to request firmware (microcode) for a CPU.
>
> But a cpu does have a struct device. Why not just use that?
>
> > +fw_setup_class_device_id(struct class_device *class_dev, struct kobject *kobj)
> > {
> > /* XXX warning we should watch out for name collisions */
> > - strlcpy(class_dev->class_id, dev->bus_id, BUS_ID_SIZE);
> > + strlcpy(class_dev->class_id, kobj->k_name, BUS_ID_SIZE);
>
> There's a function for this, kobject_name(), please never touch k_name
> directly.
>
> > +EXPORT_SYMBOL(request_firmware_kobj);
>
> Ick, if you really want to do this, just fix up all callers of
> request_firmware(), there aren't that many of them.
>
> But I don't recommend it anyway.
I also disagree with this change at all. The callers of request_firmware
should not fiddle around with kobject's to make this work. All of them
have their struct device and they should use it.
So I would propose that we fix the caller and the not request_firmware
code. However one option would be calling it with NULL as device
argument and it registers itself a dummy device for the operation.
Regards
Marcel
next prev parent reply other threads:[~2006-05-25 10:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 3:50 [PATCH 1/2] request_firmware without a device Shaohua Li
2006-05-25 4:01 ` Greg KH
2006-05-25 4:49 ` Shaohua Li
2006-05-25 10:26 ` Marcel Holtmann
2006-05-25 14:55 ` Greg KH
2006-05-25 10:24 ` Marcel Holtmann [this message]
2006-05-26 3:40 ` Shaohua Li
2006-05-26 4:06 ` Greg KH
2006-05-26 4:41 ` Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1148552694.4734.10.camel@localhost \
--to=marcel@holtmann.org \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=shaohua.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox