Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp150502iog; Wed, 29 Jun 2022 20:31:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3FdDHQD21MLPFjDrgYmpzA4rEXPGmT2dr3zLbDRFhYFREccaEH/KSUzVIYgSNRNBgi2ez X-Received: by 2002:a17:906:99c1:b0:6fe:b01d:134 with SMTP id s1-20020a17090699c100b006feb01d0134mr6673333ejn.598.1656559890701; Wed, 29 Jun 2022 20:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656559890; cv=none; d=google.com; s=arc-20160816; b=wBvVFyHcw0ZN5wDXGFY3uChm7ER6wWcgn+H2q1Mx7vuxZ5KL1PqCaRTMm6ZVsW2H6k UDop8rqGjVe9b4GMIBT5KKZ15od4+CR1dhdmwwcMbL4AiOcDquf6oVnPc8YVlHtbaRIM v2P2VzLzu52N7OIcIJgO/u6p9fOyTnIwH6xLP/mkYWhXOWqRDlH3spYKi9ffBu6wDG8f HRDK+N1VgAHiyAm7O/QTQwA7l3o7Zbi/A2B/qJcKipISn8i27ofGvsIXCEsEyodSSFQC SMEnyMOfLvlo/bs3OkAAG9XhmEztCJnwvCIjlSLwPJx5yijU2JiZNwlHNO36xlRwgDd5 LHiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lAxoLbADZAhu/fbtT19sYsfwjIQHx+7cL3zp8zm5ylc=; b=K4149AmCD91OWRcoOfpfyOg5EDIBDroEv1HnWx3QNq84mZyCuSce1KOxAFM6xfoSfc IQUo8ANP4CgApE0hR4nEr4rzh5nC/N58UJcTWgsS/O0N/uRu2EsyCUu3Dy5WvZXFeDPY 1R8TgAoQzSG3McVUqWn3F6r8LCOruGKrtnZc0zClnNFcaVwARkOm55Rt56+q1XshFvLU 1VdwP0XStkGBneGyFV24J2l9vtSN1k0Th3eyhTjOWghnXlTw5cb4u9jUgq+auh10guSZ KtsYp7SAKaFqtE+yYY0NE8n7I2lY5Ql423V1j0V/f11IELJyl9w/BXazITfMRQqD1O5q tixg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=cEfq2bbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a056402268300b0042e30989df3si6546291edd.147.2022.06.29.20.31.03; Wed, 29 Jun 2022 20:31:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=cEfq2bbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231924AbiF3DCf (ORCPT + 99 others); Wed, 29 Jun 2022 23:02:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbiF3DCd (ORCPT ); Wed, 29 Jun 2022 23:02:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C62286DF; Wed, 29 Jun 2022 20:02:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B3E806202D; Thu, 30 Jun 2022 03:02:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ADC3C3411E; Thu, 30 Jun 2022 03:02:27 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="cEfq2bbY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1656558145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lAxoLbADZAhu/fbtT19sYsfwjIQHx+7cL3zp8zm5ylc=; b=cEfq2bbYg+E0cJPmGbfqowUlZyBsEFMB+Tx0GAvzVTKBOF7AJsVTfIV6F3UeLWUpu2xbSL REcWxgdTxNMimTFAsv2fXTf8VAIjeKWpDKecdvNtTMkrU9267h6JnxgCkrxxlSMx660w+6 xigc6asOchBZ4Fie7h+gI+in3P0RKaw= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 44cb7fda (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 30 Jun 2022 03:02:25 +0000 (UTC) Date: Thu, 30 Jun 2022 05:02:19 +0200 From: "Jason A. Donenfeld" To: Joe Perches Cc: Kalesh Singh , Christoph Hellwig , Greg Kroah-Hartman , Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Theodore Ts'o , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Alex Xu (Hello71)" , Paolo Abeni , Rob Herring , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan , LKML , wireguard@lists.zx2c4.com, netdev@vger.kernel.org, rcu , "open list:KERNEL SELFTEST FRAMEWORK" , sultan@kerneltoast.com, android-kernel-team , John Stultz , Saravana Kannan , rafael@kernel.org Subject: Re: [PATCH] remove CONFIG_ANDROID Message-ID: References: <306dacfb29c2e38312943fa70d419f0a8d5ffe82.camel@perches.com> <1a1f24707a03c2363e29ef91905e9f206fb6a0b5.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1a1f24707a03c2363e29ef91905e9f206fb6a0b5.camel@perches.com> X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 29, 2022 at 06:44:14PM -0700, Joe Perches wrote: > On Thu, 2022-06-30 at 02:50 +0200, Jason A. Donenfeld wrote: > > On Wed, Jun 29, 2022 at 05:36:57PM -0700, Joe Perches wrote: > > > > > +static ssize_t pm_userspace_autosleeper_show(struct kobject *kobj, > > > > > + struct kobj_attribute *attr, char *buf) > > > > > +{ > > > > > + return sprintf(buf, "%d\n", pm_userspace_autosleeper_enabled); > > > > > > This should use sysfs_emit no? > > > > Probably, yea. Note that I just copy and pasted a nearby function, > > pm_async_show, `:%s/`d the variable name, and then promptly `git diff | > > clip`d it and plonked it into my email. Looking at the file, it uses > > sprintf all over the place in this fashion. So you may want to submit a > > cleanup to Rafael on this if you're right about sysfs_emit() being > > universally preferred. > > Perhaps: > > (trivial refactored and added a missing newline in autosleep_show) > > --- > kernel/power/main.c | 102 ++++++++++++++++++++++++++-------------------------- > 1 file changed, 52 insertions(+), 50 deletions(-) You should probably post a proper patch to the PM people. At least I'm not going to look at that here, as it's not really relevant at all to this discussion. Jason