Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1032023ybv; Thu, 20 Feb 2020 11:48:34 -0800 (PST) X-Google-Smtp-Source: APXvYqw97iXBCIny9JjsqsY76jPCf5e3ot7sVoZcJuaWYWjI1m3oPNiH8StHhHH131mnwelVr+Bs X-Received: by 2002:a05:6830:4c7:: with SMTP id s7mr24584123otd.359.1582228114150; Thu, 20 Feb 2020 11:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582228114; cv=none; d=google.com; s=arc-20160816; b=Jm+ERkdm2RZQqFxCSw6CZUtwEpCp7Ovl8qnP7BZmIQJKzWjOfqD6UeopPFC4YlCeVb FkMnIhNSobtf6wEuEDj4c31prHQO4Ep+nFzeCZBgFmtUU86m3fpYoy3ni5ckwaqHoNPy wM7zUyy3ET5MzrQa30Nl+plsWWGvCQX4pqMW9xpnrQ9j0J7y3u8TFHm9LEoyHpV+zGKm eBlMMYcGL+dFx1JatXFSskq9sBbmC84IY0cAapXZFQLiz1RsVmyAeNLqq2n7MaEPZF/E KfdXn88e6Yggw+aHVvbpIv2lHMvM/RzRR469Nv0EB+mlfBBc/t30bU3MR4R2A9sScl7f 1dFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=/HoCewIWGRlWuEeXmrfv+UqiTIAJGSteGrzN7L3uWb0=; b=OuH2mTYcZ3TtpKuId48qDeSVquGU31WJcbd2UD+r4oKa+gcwgbTNC/1imWnz1x9O/u 4lQZz+ZJ9ZB7ebakQi8Ou3SkbCoRvklIOdBHk/OP9TBw1nMo6P/rK+qtW3rYFnTbb2lG sa9TkcsQ302ky5XWGliVT20szflGX36odz45L+/dCyCxG/R8IvSlopLzXxjIqOI9qNAW Z4zG7ODYeTCWpHTc20Ie8pbajW9ql157glzHFtmJzbadRIXVZS07FR4RemvYEe2Hcqo1 ScGW4wVRDg6HH65PRCIhvULyysjuoxLp3eEW8pj6M2EvS6rPlUONYxu+RV8QuSaHFsJ4 YQdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mXySGb13; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si181894oth.15.2020.02.20.11.48.21; Thu, 20 Feb 2020 11:48:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mXySGb13; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728985AbgBTTrz (ORCPT + 99 others); Thu, 20 Feb 2020 14:47:55 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:44717 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728770AbgBTTrz (ORCPT ); Thu, 20 Feb 2020 14:47:55 -0500 Received: by mail-ot1-f67.google.com with SMTP id h9so4801497otj.11 for ; Thu, 20 Feb 2020 11:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/HoCewIWGRlWuEeXmrfv+UqiTIAJGSteGrzN7L3uWb0=; b=mXySGb13iy9gzRfPs3NaD1y2EggX6AKvHjK2u1VLG+nbxl1Ozio4YFC+bpiY6nAuoh H8U9TE7PFM6ukgW3QD7RplK4kbpKBnztIq8gnGDy7ryzo2BWB9Op472nO97axwVPW0G5 yMmVR5EQ0CnAaK7RkLxy1KPv5MCHgRjPN8aaeex8FxKhQXc7IZXynjQ727XchLc+g4Wu uzmfoME7tpK3aN2zU2RD8qGvQZjQNU979Py4DIkA5RS8kfmleT72r6l0g9zWCFsI5jhy O1RuK871r/B9ertTVMZkw4yam8xqJZXkJNG9m8e/0iRotD5Zit0OhM8TsM642cIFm7Jr z3BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HoCewIWGRlWuEeXmrfv+UqiTIAJGSteGrzN7L3uWb0=; b=hE8CP440at4CAGCa/ebcsv4v/Fr/j/hj3DROUohHP3qnevHqmZvE6vmS0u3LdPlT8Y pOpU9Wqm7hjnL9EZJaQuSrDVFHIX2BrS1HmAETWR/4tnCz6eVtKopCcDy2VGzwlftpF7 Mensa5aG/TQ37YYbtYrTrse16IS5c/E+VowlIaTa7xr2uW2UMDplBzaDBFs1DoEovyq3 SXXWVogn42BAONyQi9z9gaZb/Qs7mLcGSIEBZV4XkZwrFxxko6mgJ2JEaP1FvyAe3Tbg Vkkre1uSmd69au9j4AomtoSg37wf+zWTQHxdoHxC3RsJEOPMG19KTV9lSqZcYi2P8iZp K4TQ== X-Gm-Message-State: APjAAAXmB1ilnYVBidmVeJM2prE8pDBWPvG7oRdZX7NH0BI+RlDXp86X 7gUI+LMGt8lR4wn9kfNkB1nojjwMo3Nv+k4bJFs85g== X-Received: by 2002:a9d:7695:: with SMTP id j21mr25627694otl.157.1582228074288; Thu, 20 Feb 2020 11:47:54 -0800 (PST) MIME-Version: 1.0 References: <1582220224-1904-1-git-send-email-orson.unisoc@gmail.com> <20200220191513.GA3450796@kroah.com> In-Reply-To: <20200220191513.GA3450796@kroah.com> From: John Stultz Date: Thu, 20 Feb 2020 11:47:41 -0800 Message-ID: Subject: Re: [PATCH] Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" To: Greg Kroah-Hartman Cc: Orson Zhai , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , mingmin.ling@unisoc.com, orsonzhai@gmail.com, jingchao.ye@unisoc.com, Linux PM list , lkml , stable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 20, 2020 at 11:15 AM Greg Kroah-Hartman wrote: > > On Fri, Feb 21, 2020 at 01:37:04AM +0800, Orson Zhai wrote: > > This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14. > > > > The name changing as devfreq(X) breaks some user space applications, > > such as Android HAL from Unisoc and Hikey [1]. > > The device name will be changed unexpectly after every boot depending > > on module init sequence. It will make trouble to setup some system > > configuration like selinux for Android. > > > > So we'd like to revert it back to old naming rule before any better > > way being found. > > > > [1] https://lkml.org/lkml/2018/5/8/1042 > > > > Cc: John Stultz > > Cc: Greg Kroah-Hartman > > Cc: stable@vger.kernel.org > > Signed-off-by: Orson Zhai > > > > --- > > drivers/devfreq/devfreq.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > > index cceee8b..7dcf209 100644 > > --- a/drivers/devfreq/devfreq.c > > +++ b/drivers/devfreq/devfreq.c > > @@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev, > > { > > struct devfreq *devfreq; > > struct devfreq_governor *governor; > > - static atomic_t devfreq_no = ATOMIC_INIT(-1); > > int err = 0; > > > > if (!dev || !profile || !governor_name) { > > @@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev, > > devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev); > > atomic_set(&devfreq->suspend_count, 0); > > > > - dev_set_name(&devfreq->dev, "devfreq%d", > > - atomic_inc_return(&devfreq_no)); > > + dev_set_name(&devfreq->dev, "%s", dev_name(dev)); > > err = device_register(&devfreq->dev); > > if (err) { > > mutex_unlock(&devfreq->lock); > > -- > > 2.7.4 > > > > Thanks for this, I agree, this needs to get back to the way things were > as it seems to break too many existing systems as-is. > > I'll queue this up in my tree now, thanks. Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then. thanks -john