From nobody Thu Apr 2 15:02:26 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 78F7EC6FA86 for ; Thu, 22 Sep 2022 14:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231932AbiIVOAU (ORCPT ); Thu, 22 Sep 2022 10:00:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiIVOAL (ORCPT ); Thu, 22 Sep 2022 10:00:11 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F412C44552; Thu, 22 Sep 2022 07:00:09 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYGy53SJRzMp07; Thu, 22 Sep 2022 21:55:25 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 22:00:08 +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; Thu, 22 Sep 2022 22:00:07 +0800 From: Liu Shixin To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter CC: , , Liu Shixin Subject: [PATCH 1/4] memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Date: Thu, 22 Sep 2022 22:33:41 +0800 Message-ID: <20220922143344.3252585-2-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922143344.3252585-1-liushixin2@huawei.com> References: <20220922143344.3252585-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin --- drivers/memory/tegra/tegra20-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegr= a20-emc.c index 25ba3c5e4ad6..bd4e37b6552d 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -841,20 +841,7 @@ static int tegra_emc_debug_available_rates_show(struct= seq_file *s, void *data) =20 return 0; } - -static int tegra_emc_debug_available_rates_open(struct inode *inode, - struct file *file) -{ - return single_open(file, tegra_emc_debug_available_rates_show, - inode->i_private); -} - -static const struct file_operations tegra_emc_debug_available_rates_fops = =3D { - .open =3D tegra_emc_debug_available_rates_open, - .read =3D seq_read, - .llseek =3D seq_lseek, - .release =3D single_release, -}; +DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates); =20 static int tegra_emc_debug_min_rate_get(void *data, u64 *rate) { --=20 2.25.1 From nobody Thu Apr 2 15:02:26 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 451FCC6FA82 for ; Thu, 22 Sep 2022 14:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231942AbiIVOAY (ORCPT ); Thu, 22 Sep 2022 10:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231901AbiIVOAL (ORCPT ); Thu, 22 Sep 2022 10:00:11 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800FD52443; Thu, 22 Sep 2022 07:00:10 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYGy56fKfzMp4R; Thu, 22 Sep 2022 21:55:25 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 22:00:08 +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; Thu, 22 Sep 2022 22:00:08 +0800 From: Liu Shixin To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter CC: , , Liu Shixin Subject: [PATCH 2/4] memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Date: Thu, 22 Sep 2022 22:33:42 +0800 Message-ID: <20220922143344.3252585-3-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922143344.3252585-1-liushixin2@huawei.com> References: <20220922143344.3252585-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin --- drivers/memory/tegra/tegra30-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegr= a30-emc.c index 9ba2a9e5316b..77706e9bc543 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -1359,20 +1359,7 @@ static int tegra_emc_debug_available_rates_show(stru= ct seq_file *s, void *data) =20 return 0; } - -static int tegra_emc_debug_available_rates_open(struct inode *inode, - struct file *file) -{ - return single_open(file, tegra_emc_debug_available_rates_show, - inode->i_private); -} - -static const struct file_operations tegra_emc_debug_available_rates_fops = =3D { - .open =3D tegra_emc_debug_available_rates_open, - .read =3D seq_read, - .llseek =3D seq_lseek, - .release =3D single_release, -}; +DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates); =20 static int tegra_emc_debug_min_rate_get(void *data, u64 *rate) { --=20 2.25.1 From nobody Thu Apr 2 15:02:26 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 8ABC8C54EE9 for ; Thu, 22 Sep 2022 14:00:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbiIVOA2 (ORCPT ); Thu, 22 Sep 2022 10:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbiIVOAP (ORCPT ); Thu, 22 Sep 2022 10:00:15 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB01D52DF5; Thu, 22 Sep 2022 07:00:10 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYGym2qK8zlX54; Thu, 22 Sep 2022 21:56:00 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 22:00:09 +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; Thu, 22 Sep 2022 22:00:08 +0800 From: Liu Shixin To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter CC: , , Liu Shixin Subject: [PATCH 3/4] memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Date: Thu, 22 Sep 2022 22:33:43 +0800 Message-ID: <20220922143344.3252585-4-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922143344.3252585-1-liushixin2@huawei.com> References: <20220922143344.3252585-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin --- drivers/memory/tegra/tegra210-emc-core.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegr= a/tegra210-emc-core.c index cbe1a7723514..603b306daca1 100644 --- a/drivers/memory/tegra/tegra210-emc-core.c +++ b/drivers/memory/tegra/tegra210-emc-core.c @@ -1621,20 +1621,8 @@ static int tegra210_emc_debug_available_rates_show(s= truct seq_file *s, =20 return 0; } +DEFINE_SHOW_ATTRIBUTE(tegra210_emc_debug_available_rates); =20 -static int tegra210_emc_debug_available_rates_open(struct inode *inode, - struct file *file) -{ - return single_open(file, tegra210_emc_debug_available_rates_show, - inode->i_private); -} - -static const struct file_operations tegra210_emc_debug_available_rates_fop= s =3D { - .open =3D tegra210_emc_debug_available_rates_open, - .read =3D seq_read, - .llseek =3D seq_lseek, - .release =3D single_release, -}; =20 static int tegra210_emc_debug_min_rate_get(void *data, u64 *rate) { --=20 2.25.1 From nobody Thu Apr 2 15:02:26 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 822B8C54EE9 for ; Thu, 22 Sep 2022 14:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbiIVOAa (ORCPT ); Thu, 22 Sep 2022 10:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231895AbiIVOAQ (ORCPT ); Thu, 22 Sep 2022 10:00:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F2843634; Thu, 22 Sep 2022 07:00:11 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYGym5t44zlX89; Thu, 22 Sep 2022 21:56:00 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 22:00:09 +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; Thu, 22 Sep 2022 22:00:09 +0800 From: Liu Shixin To: Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter CC: , , Liu Shixin Subject: [PATCH 4/4] memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code Date: Thu, 22 Sep 2022 22:33:44 +0800 Message-ID: <20220922143344.3252585-5-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922143344.3252585-1-liushixin2@huawei.com> References: <20220922143344.3252585-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin --- drivers/memory/tegra/tegra186-emc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/teg= ra186-emc.c index 54b47ca33483..26e763bde92a 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -84,20 +84,7 @@ static int tegra186_emc_debug_available_rates_show(struc= t seq_file *s, =20 return 0; } - -static int tegra186_emc_debug_available_rates_open(struct inode *inode, - struct file *file) -{ - return single_open(file, tegra186_emc_debug_available_rates_show, - inode->i_private); -} - -static const struct file_operations tegra186_emc_debug_available_rates_fop= s =3D { - .open =3D tegra186_emc_debug_available_rates_open, - .read =3D seq_read, - .llseek =3D seq_lseek, - .release =3D single_release, -}; +DEFINE_SHOW_ATTRIBUTE(tegra186_emc_debug_available_rates); =20 static int tegra186_emc_debug_min_rate_get(void *data, u64 *rate) { --=20 2.25.1