From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755645AbcBIUTV (ORCPT ); Tue, 9 Feb 2016 15:19:21 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:62952 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755077AbcBIUTU (ORCPT ); Tue, 9 Feb 2016 15:19:20 -0500 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: "Rafael J. Wysocki" , Juri Lelli , Lists linaro-kernel , "linux-pm@vger.kernel.org" , Saravana Kannan , Peter Zijlstra , Michael Turquette , Steve Muckle , Vincent Guittot , Morten Rasmussen , dietmar.eggemann@arm.com, Shilpasri G Bhat , Linux Kernel Mailing List Subject: Re: [PATCH V3 03/13] cpufreq: governor: New sysfs show/store callbacks for governor tunables Date: Tue, 09 Feb 2016 21:20:31 +0100 Message-ID: <1574334.EZHJkPPKZd@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160209032126.GA23393@vireshk> References: <20160209032126.GA23393@vireshk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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