From nobody Thu Apr 2 11:55:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77ED4C07E9D for ; Sat, 24 Sep 2022 10:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233456AbiIXKHN (ORCPT ); Sat, 24 Sep 2022 06:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233748AbiIXKHE (ORCPT ); Sat, 24 Sep 2022 06:07:04 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8C75110EF0 for ; Sat, 24 Sep 2022 03:06:59 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MZPhj3kRdz1P6q3; Sat, 24 Sep 2022 18:02:45 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 18:06:56 +0800 Received: from huawei.com (10.175.113.32) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 18:06:55 +0800 From: Liu Shixin To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , "Mel Gorman" , Daniel Bristot de Oliveira , Valentin Schneider CC: , Liu Shixin Subject: [PATCH] sched/debug: use DEFINE_SEQ_ATTRIBUTE to simplify code Date: Sat, 24 Sep 2022 18:40:31 +0800 Message-ID: <20220924104031.931600-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use DEFINE_SEQ_ATTRIBUTE to simplify code. No functional change. Signed-off-by: Liu Shixin --- kernel/sched/debug.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 6331aa4a4a14..83bf19a81bf0 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -246,17 +246,7 @@ __read_mostly bool sched_debug_verbose; =20 static const struct seq_operations sched_debug_sops; =20 -static int sched_debug_open(struct inode *inode, struct file *filp) -{ - return seq_open(filp, &sched_debug_sops); -} - -static const struct file_operations sched_debug_fops =3D { - .open =3D sched_debug_open, - .read =3D seq_read, - .llseek =3D seq_lseek, - .release =3D seq_release, -}; +DEFINE_SEQ_ATTRIBUTE(sched_debug); =20 static struct dentry *debugfs_sched; =20 --=20 2.25.1