* [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code
@ 2022-09-26 13:00 Liu Shixin
2022-09-26 13:00 ` [PATCH v2 1/4] memory: tegra20-emc: use " Liu Shixin
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Liu Shixin @ 2022-09-26 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: linux-kernel, linux-tegra, Liu Shixin
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
No functional change.
v1->v2: remove duplicate blank lines.
Liu Shixin (4):
memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
drivers/memory/tegra/tegra186-emc.c | 15 +--------------
drivers/memory/tegra/tegra20-emc.c | 15 +--------------
drivers/memory/tegra/tegra210-emc-core.c | 15 +--------------
drivers/memory/tegra/tegra30-emc.c | 15 +--------------
4 files changed, 4 insertions(+), 56 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
@ 2022-09-26 13:00 ` Liu Shixin
2022-09-26 13:00 ` [PATCH v2 2/4] memory: tegra30-emc: " Liu Shixin
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Liu Shixin @ 2022-09-26 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: linux-kernel, linux-tegra, Liu Shixin
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
No functional change.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
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/tegra20-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)
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 = {
- .open = tegra_emc_debug_available_rates_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates);
static int tegra_emc_debug_min_rate_get(void *data, u64 *rate)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
2022-09-26 13:00 ` [PATCH v2 1/4] memory: tegra20-emc: use " Liu Shixin
@ 2022-09-26 13:00 ` Liu Shixin
2022-09-26 13:00 ` [PATCH v2 3/4] memory: tegra210-emc: " Liu Shixin
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Liu Shixin @ 2022-09-26 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: linux-kernel, linux-tegra, Liu Shixin
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
No functional change.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
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/tegra30-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(struct seq_file *s, void *data)
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 = {
- .open = tegra_emc_debug_available_rates_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates);
static int tegra_emc_debug_min_rate_get(void *data, u64 *rate)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
2022-09-26 13:00 ` [PATCH v2 1/4] memory: tegra20-emc: use " Liu Shixin
2022-09-26 13:00 ` [PATCH v2 2/4] memory: tegra30-emc: " Liu Shixin
@ 2022-09-26 13:00 ` Liu Shixin
2022-09-26 13:00 ` [PATCH v2 4/4] memory: tegra186-emc: " Liu Shixin
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Liu Shixin @ 2022-09-26 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: linux-kernel, linux-tegra, Liu Shixin
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
No functional change.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
drivers/memory/tegra/tegra210-emc-core.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c
index cbe1a7723514..ae5f982f861b 100644
--- a/drivers/memory/tegra/tegra210-emc-core.c
+++ b/drivers/memory/tegra/tegra210-emc-core.c
@@ -1621,20 +1621,7 @@ static int tegra210_emc_debug_available_rates_show(struct seq_file *s,
return 0;
}
-
-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_fops = {
- .open = tegra210_emc_debug_available_rates_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(tegra210_emc_debug_available_rates);
static int tegra210_emc_debug_min_rate_get(void *data, u64 *rate)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
` (2 preceding siblings ...)
2022-09-26 13:00 ` [PATCH v2 3/4] memory: tegra210-emc: " Liu Shixin
@ 2022-09-26 13:00 ` Liu Shixin
2022-09-28 9:02 ` [PATCH v2 0/4] memory: tegra: Use " Krzysztof Kozlowski
2022-10-24 13:10 ` Thierry Reding
5 siblings, 0 replies; 7+ messages in thread
From: Liu Shixin @ 2022-09-26 13:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: linux-kernel, linux-tegra, Liu Shixin
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
No functional change.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
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/tegra186-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(struct seq_file *s,
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_fops = {
- .open = tegra186_emc_debug_available_rates_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(tegra186_emc_debug_available_rates);
static int tegra186_emc_debug_min_rate_get(void *data, u64 *rate)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
` (3 preceding siblings ...)
2022-09-26 13:00 ` [PATCH v2 4/4] memory: tegra186-emc: " Liu Shixin
@ 2022-09-28 9:02 ` Krzysztof Kozlowski
2022-10-24 13:10 ` Thierry Reding
5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-28 9:02 UTC (permalink / raw)
To: liushixin2, thierry.reding, jonathanh
Cc: Krzysztof Kozlowski, linux-tegra, linux-kernel
On Mon, 26 Sep 2022 21:00:21 +0800, Liu Shixin wrote:
> Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
> No functional change.
>
> v1->v2: remove duplicate blank lines.
>
> Liu Shixin (4):
> memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
>
> [...]
Applied, thanks!
[1/4] memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
https://git.kernel.org/krzk/linux-mem-ctrl/c/94a052d7d52a70d8681644bd88062c61b0f986ce
[2/4] memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
https://git.kernel.org/krzk/linux-mem-ctrl/c/91fcc1dfa790d74b9a1dacfefdb023804dedd319
[3/4] memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
https://git.kernel.org/krzk/linux-mem-ctrl/c/82710f9114a7857052f012599fdb688b93ee218c
[4/4] memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
https://git.kernel.org/krzk/linux-mem-ctrl/c/56efd6435c6890a3a38a33d192a0f9d5c835a24b
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
` (4 preceding siblings ...)
2022-09-28 9:02 ` [PATCH v2 0/4] memory: tegra: Use " Krzysztof Kozlowski
@ 2022-10-24 13:10 ` Thierry Reding
5 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2022-10-24 13:10 UTC (permalink / raw)
To: Liu Shixin
Cc: Krzysztof Kozlowski, Jonathan Hunter, linux-kernel, linux-tegra
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
On Mon, Sep 26, 2022 at 09:00:21PM +0800, Liu Shixin wrote:
> Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.
> No functional change.
>
> v1->v2: remove duplicate blank lines.
>
> Liu Shixin (4):
> memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
> memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
>
> drivers/memory/tegra/tegra186-emc.c | 15 +--------------
> drivers/memory/tegra/tegra20-emc.c | 15 +--------------
> drivers/memory/tegra/tegra210-emc-core.c | 15 +--------------
> drivers/memory/tegra/tegra30-emc.c | 15 +--------------
> 4 files changed, 4 insertions(+), 56 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-24 14:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 13:00 [PATCH v2 0/4] memory: tegra: Use DEFINE_SHOW_ATTRIBUTE to simplify code Liu Shixin
2022-09-26 13:00 ` [PATCH v2 1/4] memory: tegra20-emc: use " Liu Shixin
2022-09-26 13:00 ` [PATCH v2 2/4] memory: tegra30-emc: " Liu Shixin
2022-09-26 13:00 ` [PATCH v2 3/4] memory: tegra210-emc: " Liu Shixin
2022-09-26 13:00 ` [PATCH v2 4/4] memory: tegra186-emc: " Liu Shixin
2022-09-28 9:02 ` [PATCH v2 0/4] memory: tegra: Use " Krzysztof Kozlowski
2022-10-24 13:10 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).