* [linux-next:master 6065/10489] drivers/memory/tegra/tegra210-emc-core.c:1695:0-23: WARNING: tegra210_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
@ 2021-06-17 11:18 kernel test robot
2021-06-17 11:18 ` [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings kernel test robot
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2021-06-17 11:18 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Dmitry Osipenko <digetx@gmail.com>
CC: Thierry Reding <treding@nvidia.com>
CC: Krzysztof Kozlowski <krzk@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8
commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 [6065/10489] memory: tegra: Enable compile testing for all drivers
:::::: branch date: 22 hours ago
:::::: commit date: 2 weeks ago
config: arm64-randconfig-c024-20210617 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/memory/tegra/tegra210-emc-core.c:1695:0-23: WARNING: tegra210_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>> drivers/memory/tegra/tegra210-emc-core.c:1665:0-23: WARNING: tegra210_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>> drivers/memory/tegra/tegra210-emc-core.c:1726:0-23: WARNING: tegra210_emc_debug_temperature_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34569 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings 2021-06-17 11:18 [linux-next:master 6065/10489] drivers/memory/tegra/tegra210-emc-core.c:1695:0-23: WARNING: tegra210_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE kernel test robot @ 2021-06-17 11:18 ` kernel test robot 0 siblings, 0 replies; 4+ messages in thread From: kernel test robot @ 2021-06-17 11:18 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 4421 bytes --] CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List <linux-mm@kvack.org> TO: Dmitry Osipenko <digetx@gmail.com> CC: Thierry Reding <treding@nvidia.com> CC: Krzysztof Kozlowski <krzk@kernel.org> CC: Jonathan Hunter <jonathanh@nvidia.com> CC: Joseph Lo <josephl@nvidia.com> CC: Geert Uytterhoeven <geert+renesas@glider.be> CC: linux-kernel(a)vger.kernel.org CC: linux-tegra(a)vger.kernel.org From: kernel test robot <lkp@intel.com> drivers/memory/tegra/tegra210-emc-core.c:1695:0-23: WARNING: tegra210_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE drivers/memory/tegra/tegra210-emc-core.c:1665:0-23: WARNING: tegra210_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE drivers/memory/tegra/tegra210-emc-core.c:1726:0-23: WARNING: tegra210_emc_debug_temperature_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: 56ebc9b0d77e ("memory: tegra: Enable compile testing for all drivers") CC: Dmitry Osipenko <digetx@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8 commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 [6065/10489] memory: tegra: Enable compile testing for all drivers :::::: branch date: 22 hours ago :::::: commit date: 2 weeks ago Please take the patch only if it's a positive warning. Thanks! tegra210-emc-core.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) --- a/drivers/memory/tegra/tegra210-emc-core.c +++ b/drivers/memory/tegra/tegra210-emc-core.c @@ -1662,9 +1662,9 @@ static int tegra210_emc_debug_min_rate_s return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra210_emc_debug_min_rate_fops, - tegra210_emc_debug_min_rate_get, - tegra210_emc_debug_min_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra210_emc_debug_min_rate_fops, + tegra210_emc_debug_min_rate_get, + tegra210_emc_debug_min_rate_set, "%llu\n"); static int tegra210_emc_debug_max_rate_get(void *data, u64 *rate) { @@ -1692,9 +1692,9 @@ static int tegra210_emc_debug_max_rate_s return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra210_emc_debug_max_rate_fops, - tegra210_emc_debug_max_rate_get, - tegra210_emc_debug_max_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra210_emc_debug_max_rate_fops, + tegra210_emc_debug_max_rate_get, + tegra210_emc_debug_max_rate_set, "%llu\n"); static int tegra210_emc_debug_temperature_get(void *data, u64 *temperature) { @@ -1723,9 +1723,9 @@ static int tegra210_emc_debug_temperatur return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra210_emc_debug_temperature_fops, - tegra210_emc_debug_temperature_get, - tegra210_emc_debug_temperature_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra210_emc_debug_temperature_fops, + tegra210_emc_debug_temperature_get, + tegra210_emc_debug_temperature_set, "%llu\n"); static void tegra210_emc_debugfs_init(struct tegra210_emc *emc) { @@ -1766,12 +1766,12 @@ static void tegra210_emc_debugfs_init(st debugfs_create_file("available_rates", 0444, emc->debugfs.root, emc, &tegra210_emc_debug_available_rates_fops); - debugfs_create_file("min_rate", 0644, emc->debugfs.root, emc, - &tegra210_emc_debug_min_rate_fops); - debugfs_create_file("max_rate", 0644, emc->debugfs.root, emc, - &tegra210_emc_debug_max_rate_fops); - debugfs_create_file("temperature", 0644, emc->debugfs.root, emc, - &tegra210_emc_debug_temperature_fops); + debugfs_create_file_unsafe("min_rate", 0644, emc->debugfs.root, emc, + &tegra210_emc_debug_min_rate_fops); + debugfs_create_file_unsafe("max_rate", 0644, emc->debugfs.root, emc, + &tegra210_emc_debug_max_rate_fops); + debugfs_create_file_unsafe("temperature", 0644, emc->debugfs.root, + emc, &tegra210_emc_debug_temperature_fops); } static void tegra210_emc_detect(struct tegra210_emc *emc) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-next:master 6065/10489] drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE @ 2021-06-17 9:58 kernel test robot 2021-06-17 9:58 ` [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings kernel test robot 2021-06-17 9:59 ` kernel test robot 0 siblings, 2 replies; 4+ messages in thread From: kernel test robot @ 2021-06-17 9:58 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 1756 bytes --] CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List <linux-mm@kvack.org> TO: Dmitry Osipenko <digetx@gmail.com> CC: Thierry Reding <treding@nvidia.com> CC: Krzysztof Kozlowski <krzk@kernel.org> Hi Dmitry, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8 commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 [6065/10489] memory: tegra: Enable compile testing for all drivers :::::: branch date: 21 hours ago :::::: commit date: 2 weeks ago config: powerpc64-randconfig-c004-20210617 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> cocci warnings: (new ones prefixed by >>) >> drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE >> drivers/memory/tegra/tegra20-emc.c:714:0-23: WARNING: tegra_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE -- >> drivers/memory/tegra/tegra30-emc.c:1322:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE >> drivers/memory/tegra/tegra30-emc.c:1292:0-23: WARNING: tegra_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE -- >> drivers/memory/tegra/tegra20-emc.c:1086:2-9: line 1086 is redundant because platform_get_irq() already prints an error Please review and possibly fold the followup patch. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 38909 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings 2021-06-17 9:58 [linux-next:master 6065/10489] drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE kernel test robot @ 2021-06-17 9:58 ` kernel test robot 2021-06-17 9:59 ` kernel test robot 1 sibling, 0 replies; 4+ messages in thread From: kernel test robot @ 2021-06-17 9:58 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 3413 bytes --] CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List <linux-mm@kvack.org> TO: Dmitry Osipenko <digetx@gmail.com> CC: Thierry Reding <treding@nvidia.com> CC: Krzysztof Kozlowski <krzk@kernel.org> CC: Jonathan Hunter <jonathanh@nvidia.com> CC: Viresh Kumar <viresh.kumar@linaro.org> CC: Chanwoo Choi <cw00.choi@samsung.com> CC: linux-kernel(a)vger.kernel.org CC: linux-tegra(a)vger.kernel.org From: kernel test robot <lkp@intel.com> drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE drivers/memory/tegra/tegra20-emc.c:714:0-23: WARNING: tegra_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: 56ebc9b0d77e ("memory: tegra: Enable compile testing for all drivers") CC: Dmitry Osipenko <digetx@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8 commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 [6065/10489] memory: tegra: Enable compile testing for all drivers :::::: branch date: 21 hours ago :::::: commit date: 2 weeks ago Please take the patch only if it's a positive warning. Thanks! tegra20-emc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -711,9 +711,9 @@ static int tegra_emc_debug_min_rate_set( return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_min_rate_fops, - tegra_emc_debug_min_rate_get, - tegra_emc_debug_min_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_min_rate_fops, + tegra_emc_debug_min_rate_get, + tegra_emc_debug_min_rate_set, "%llu\n"); static int tegra_emc_debug_max_rate_get(void *data, u64 *rate) { @@ -741,9 +741,9 @@ static int tegra_emc_debug_max_rate_set( return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_max_rate_fops, - tegra_emc_debug_max_rate_get, - tegra_emc_debug_max_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_max_rate_fops, + tegra_emc_debug_max_rate_get, + tegra_emc_debug_max_rate_set, "%llu\n"); static void tegra_emc_debugfs_init(struct tegra_emc *emc) { @@ -783,10 +783,10 @@ static void tegra_emc_debugfs_init(struc debugfs_create_file("available_rates", 0444, emc->debugfs.root, emc, &tegra_emc_debug_available_rates_fops); - debugfs_create_file("min_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_min_rate_fops); - debugfs_create_file("max_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_max_rate_fops); + debugfs_create_file_unsafe("min_rate", 0644, emc->debugfs.root, emc, + &tegra_emc_debug_min_rate_fops); + debugfs_create_file_unsafe("max_rate", 0644, emc->debugfs.root, emc, + &tegra_emc_debug_max_rate_fops); } static inline struct tegra_emc * ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings 2021-06-17 9:58 [linux-next:master 6065/10489] drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE kernel test robot 2021-06-17 9:58 ` [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings kernel test robot @ 2021-06-17 9:59 ` kernel test robot 1 sibling, 0 replies; 4+ messages in thread From: kernel test robot @ 2021-06-17 9:59 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 3422 bytes --] CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List <linux-mm@kvack.org> TO: Dmitry Osipenko <digetx@gmail.com> CC: Thierry Reding <treding@nvidia.com> CC: Krzysztof Kozlowski <krzk@kernel.org> CC: Jonathan Hunter <jonathanh@nvidia.com> CC: Nathan Chancellor <nathan@kernel.org> CC: Viresh Kumar <viresh.kumar@linaro.org> CC: linux-kernel(a)vger.kernel.org CC: linux-tegra(a)vger.kernel.org From: kernel test robot <lkp@intel.com> drivers/memory/tegra/tegra30-emc.c:1322:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE drivers/memory/tegra/tegra30-emc.c:1292:0-23: WARNING: tegra_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Semantic patch information: Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: 56ebc9b0d77e ("memory: tegra: Enable compile testing for all drivers") CC: Dmitry Osipenko <digetx@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c7d4c1fd91ab4a6d2620497921a9c6bf54650ab8 commit: 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 [6065/10489] memory: tegra: Enable compile testing for all drivers :::::: branch date: 21 hours ago :::::: commit date: 2 weeks ago Please take the patch only if it's a positive warning. Thanks! tegra30-emc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -1289,9 +1289,9 @@ static int tegra_emc_debug_min_rate_set( return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_min_rate_fops, - tegra_emc_debug_min_rate_get, - tegra_emc_debug_min_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_min_rate_fops, + tegra_emc_debug_min_rate_get, + tegra_emc_debug_min_rate_set, "%llu\n"); static int tegra_emc_debug_max_rate_get(void *data, u64 *rate) { @@ -1319,9 +1319,9 @@ static int tegra_emc_debug_max_rate_set( return 0; } -DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_max_rate_fops, - tegra_emc_debug_max_rate_get, - tegra_emc_debug_max_rate_set, "%llu\n"); +DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_max_rate_fops, + tegra_emc_debug_max_rate_get, + tegra_emc_debug_max_rate_set, "%llu\n"); static void tegra_emc_debugfs_init(struct tegra_emc *emc) { @@ -1361,10 +1361,10 @@ static void tegra_emc_debugfs_init(struc debugfs_create_file("available_rates", 0444, emc->debugfs.root, emc, &tegra_emc_debug_available_rates_fops); - debugfs_create_file("min_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_min_rate_fops); - debugfs_create_file("max_rate", 0644, emc->debugfs.root, - emc, &tegra_emc_debug_max_rate_fops); + debugfs_create_file_unsafe("min_rate", 0644, emc->debugfs.root, emc, + &tegra_emc_debug_min_rate_fops); + debugfs_create_file_unsafe("max_rate", 0644, emc->debugfs.root, emc, + &tegra_emc_debug_max_rate_fops); } static inline struct tegra_emc * ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-17 11:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-17 11:18 [linux-next:master 6065/10489] drivers/memory/tegra/tegra210-emc-core.c:1695:0-23: WARNING: tegra210_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE kernel test robot 2021-06-17 11:18 ` [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings kernel test robot -- strict thread matches above, loose matches on Subject: below -- 2021-06-17 9:58 [linux-next:master 6065/10489] drivers/memory/tegra/tegra20-emc.c:744:0-23: WARNING: tegra_emc_debug_max_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE kernel test robot 2021-06-17 9:58 ` [PATCH] memory: tegra: fix debugfs_simple_attr.cocci warnings kernel test robot 2021-06-17 9:59 ` kernel test robot
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.