Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp603168ybg; Sun, 26 Jul 2020 15:12:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5ncOgy6u2gEsTi3RPoCLMWEEBtLOLBVTaxOOI3oPmEWewUuKw7FMsVE/YVWq7Rav6QY92 X-Received: by 2002:a05:6402:16c7:: with SMTP id r7mr19044092edx.288.1595801550301; Sun, 26 Jul 2020 15:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595801550; cv=none; d=google.com; s=arc-20160816; b=aRnLIu+06UxP3/0VXW4oFt3PZ7g/Oa2R8klo0ZzOFahiZPMnCBmMy6Y1C9/sS1JVxr owKuzUzkzNbxYJNtl4BnSh3iPRGz/mjlZf+J16oKrJR0lgxjtg40ehcT32QvvCh6enFH /1F2uMekImW1tt2Y6v0kR0d+GKUUcObcCMuWICMoBdYwixY5+3Rcr70Tbb9TFwpLerCi npoKxLc2nNlTqKSkHKkPTUX7UUQbmFv3Kh5e9UjdCKQy9Bba7ZgIBx/1JUwTIS1JA+66 AVeVY0nkSs4oNJnlbMaIPf7Gm66gx2Xni5uKbz8dZS7v/XWIcg0Smx0EO34jJydIZylz yLDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EQzrB+AYQBn+g9M6zd9apiVybTQu9yGlG07m0mP3txA=; b=w6Xg9hoa3s4GDWDtz2h6Gmc7JrLl3hPt4mrrWQsdlT7TigEAunsJM2/fFXGd2RuMNx WQjKYM02WTX4KSAzpZsJFtDzax15yc8LfwLhfxm3jcsTlXDhc/PWr58oqx4lHSrcu27D B6LgZCePQfM1p2AcArCJoqG6L8XJDlMB94Qk4Y4lt163XAl109IEolVgPy+b/UHDUMcW 1u9ctNsGTeefkNlvB4pVHUBsTJ834V576vDI39PPtu+EvQ4zOiGkiKz6D1DbvllFhx/z FseGPaFbyp79wwmS2F10I+MAXgYpng3JQmZ+fiaOimQ4L6qtFGoX+ea5Hd9qQKBXOGTp BBqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1pCHgWq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si4802359ejd.575.2020.07.26.15.12.08; Sun, 26 Jul 2020 15:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1pCHgWq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727770AbgGZWJw (ORCPT + 99 others); Sun, 26 Jul 2020 18:09:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:33352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgGZWJv (ORCPT ); Sun, 26 Jul 2020 18:09:51 -0400 Received: from earth.universe (unknown [185.213.155.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 762762065F; Sun, 26 Jul 2020 22:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595801391; bh=LfHWfBg1Qfp818BKW1nd9sxbwjERmwPxm12kyIqm0Ak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1pCHgWq75TDYeOlW/SX2FohhHJ4AAL4TKHTj80iEU+lD0wfmvWm8m5Gh/sqYbB8TF Gjedib6n5Ej1KUI7qoPXQRJGNIzyrBmgLdbA9xJ5oApxzt3Iqt2tMusW2GONwyAwH1 yOdCW4E0nnppQom5b5kGK4UUJ7EjjDrNrPVtYv0g= Received: by earth.universe (Postfix, from userid 1000) id B16DA3C0B87; Mon, 27 Jul 2020 00:09:49 +0200 (CEST) Date: Mon, 27 Jul 2020 00:09:49 +0200 From: Sebastian Reichel To: Qinglang Miao Cc: Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] power: Convert to DEFINE_SHOW_ATTRIBUTE Message-ID: <20200726220949.m456hoqcb5bis4ry@earth.universe> References: <20200716085849.11571-1-miaoqinglang@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2twpfrl4w4tppxvr" Content-Disposition: inline In-Reply-To: <20200716085849.11571-1-miaoqinglang@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2twpfrl4w4tppxvr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Jul 16, 2020 at 04:58:49PM +0800, Qinglang Miao wrote: > From: Yongqiang Liu >=20 > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. >=20 > Signed-off-by: Yongqiang Liu Thanks, queued. -- Sebastian > drivers/power/supply/da9030_battery.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) >=20 > diff --git a/drivers/power/supply/da9030_battery.c b/drivers/power/supply= /da9030_battery.c > index 292ecf875..0deba48d2 100644 > --- a/drivers/power/supply/da9030_battery.c > +++ b/drivers/power/supply/da9030_battery.c > @@ -172,17 +172,7 @@ static int bat_debug_show(struct seq_file *s, void *= data) > return 0; > } > =20 > -static int debug_open(struct inode *inode, struct file *file) > -{ > - return single_open(file, bat_debug_show, inode->i_private); > -} > - > -static const struct file_operations bat_debug_fops =3D { > - .open =3D debug_open, > - .read_iter =3D seq_read_iter, > - .llseek =3D seq_lseek, > - .release =3D single_release, > -}; > +DEFINE_SHOW_ATTRIBUTE(bat_debug); > =20 > static struct dentry *da9030_bat_create_debugfs(struct da9030_charger *c= harger) > { > --=20 > 2.17.1 >=20 --2twpfrl4w4tppxvr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl8d/ygACgkQ2O7X88g7 +pqmSA//fvwJAMXbsenKVkN26BoMn1sGqtCr6wiAveZsXonjqg6W8zMDW8AaDNJy RUid+1abBPkqEJ8Vvo9azVGmhHbauh+/467fY4mPyjf/Gill+FxIdap/hriiom5P XUKtQ9EzBroM55ktPkaH4W3lUjUTSpfuGdDc9DPKOi4Hr2VVo/pJ8PBrCm4g+MxE m2Ufzda9YYYzbN8Pj71k6PgYCFlUEAIuaOSPxCOrTu6hIGOyyenySooPlXtp1YbG Xd/o+1nHMuI+l/lKn9+ofh1xjrzz9uyOOKktPSlQhHtLG+zcfM9fHvTqpienqP3Z qZQ12CCjbraBkduQpJtVKlyYRDBX6/xmgpvx7qYCNk57V1dyzcwDlpOUho5dwQ9D Q2IzEpp6sP7R1Bj3Z03RSKtRtcl4GWumD1uKJFiZdObgIhqU8MobLE5nUYU5tdZt zUPTkDgxOInHxq8btmM/pWpA9OlEeqmsNffCE9k5UCaoA4kYnl56CeEBjf7fH14x IParuo95m1Ybi88QMu/grbXUmtHdZnGbqrSshF5zvSxaTqNupxFI+6WeEhYiRSWi 2xOrzTe/DwuFNJ8SA1A96+v1txu8pk+JBXkwnY4NBju9+cBQJ31L8ebgTl0kpfhF c+a5z2qaLwCm/0/ECnVpd8xn1N20Ipgx83idM7zKQlB1qYYRr8w= =iYzJ -----END PGP SIGNATURE----- --2twpfrl4w4tppxvr--