Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330630
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 03/13] cpufreq: governor: New sysfs show/store callbacks for governor tunables |
| Date | 2016-02-09 21:20 +0100 |
| Message-ID | <r0mVt-wW-23@gated-at.bofh.it> (permalink) |
| References | <qZSul-4Ei-3@gated-at.bofh.it> <r01Hk-2vO-9@gated-at.bofh.it> <r07a1-6x5-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tuesday, February 09, 2016 08:51:26 AM Viresh Kumar wrote: > On 08-02-16, 22:36, Rafael J. Wysocki wrote: > > On Mon, Feb 8, 2016 at 12:39 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > > + ret = kobject_init_and_add(&dbs_data->kobj, &gov->kobj_type, > > > + get_governor_parent_kobj(policy), > > > + gov->kobj_name); > > > > Besides, you forgot about the format argument for kobject_init_and_add(). > > What about that? Why is it required here ? We don't have to modify the > gov->gov.name string at all, and that string can be used here without adding any > more format arguments. But that's because the governor name is a static string and we can safely pass it as a format (because we know that it doesn't contain any output field specifiers in particular). So either there should be a comment to that effect in the code, or the format argument should be present. Thanks, Rafael
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH V3 03/13] cpufreq: governor: New sysfs show/store callbacks for governor tunables "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-09 21:20 +0100
csiph-web