Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp74046iog; Wed, 29 Jun 2022 18:28:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sEshCWNvLaeKjEF4Pnm5x924MLq1zGMZWArTNKmsvdi7wS4Q63obPhvSWq86QmL1FenrC8 X-Received: by 2002:a17:902:dad1:b0:16a:75cb:5d97 with SMTP id q17-20020a170902dad100b0016a75cb5d97mr12039222plx.64.1656552495651; Wed, 29 Jun 2022 18:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656552495; cv=none; d=google.com; s=arc-20160816; b=T6aHbsQzbwh5/NaXKwzACAh0QeV2cC27O9qBR8fxcpZkJQ667UNm6E4G7IQEtNKxeR 1FLRdQ+8JVsDVOnlVCWmnfhMKe1MeU3GfDLFTPc7qfqsLtucq+n6s+BHQUFZoXVCCfwT PKQmPfYR+JAGX9vrN0Aa6RsMFI9eYzMHE0Ib2xCeioisyz45RGDgcJDIKAYntNFUwl8L a1XNroQnRf0Sc6NWl3JKsSHgIYqWjrbe/tZ3oACVPmGrGeCtjxnJjy/W1wfsWTFnq3E0 BmcvR757ZkAZT3l6jEKdvHP/v4hFm/YNl6RzBlkPW7wuhgIz+Fu2KXNJAOYpPzCq6vWz yTYQ== 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=lAj+UsLxPeGR3JIzKkMAY3UQ4Fc7rVtE34gVa7F5Mk0=; b=P5dIqASHDK4pEqnULofsYFac07qWRfri9QeAPLpo9RHbJJJT4blAQsNs75RC0AEHWa k5e64w834hBaGYYaXtVBO3hP1cS+bZ3XxEQZUbzxcLu0xPUtu1W1rEYQQToAKRhre6oc 9tME6tVs5VXoqtC35dvwWwUx2hwhCP6WsZEPSIDP18fSbnUUcqNj4lssOudi2VyFRMSq q1VkdiaYqJhmAN8L6W0F1bmCsvY94PJC3geKBPzNX19yULeYPhL039DW9PnTAO+XuA8T vunScu/2hMu7VXgTnRoxi/uSzO9yJDZ6hg88F1qM6GhuZtOFuEBRiNPOAcwsqONgJY63 CA1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Rio6hS73; 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 j16-20020a62b610000000b0050ad2c9d507si3980011pff.170.2022.06.29.18.27.22; Wed, 29 Jun 2022 18:28:15 -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=Rio6hS73; 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 S231358AbiF3Auy (ORCPT + 99 others); Wed, 29 Jun 2022 20:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiF3Auw (ORCPT ); Wed, 29 Jun 2022 20:50:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0942403ED; Wed, 29 Jun 2022 17:50:46 -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 ams.source.kernel.org (Postfix) with ESMTPS id 9C6FCB827B6; Thu, 30 Jun 2022 00:50:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E5E0C34114; Thu, 30 Jun 2022 00:50:41 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Rio6hS73" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1656550239; 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=lAj+UsLxPeGR3JIzKkMAY3UQ4Fc7rVtE34gVa7F5Mk0=; b=Rio6hS73DikBrANqdWBHqlvUAZr9HeM3Tw2P2RT7GwzMWfx1mEoPnAX9y2tYS3dnyLa61K G9F/AphVS3+hx/JuleNTfayYZfXj8oeQUQ6MZ4LtXRluQmG0UQvBPWFw0KqujncUNs3GUB +IL/7OeJsmgFDXKFSsmPdhgTbsSjW5k= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id c29fd627 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 30 Jun 2022 00:50:39 +0000 (UTC) Date: Thu, 30 Jun 2022 02:50:34 +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: <20220629163007.GA25279@lst.de> <306dacfb29c2e38312943fa70d419f0a8d5ffe82.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <306dacfb29c2e38312943fa70d419f0a8d5ffe82.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 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. Jason