diff mbox series

[-next,5/5] drm/amd/display: Make dcn35_fpga_funcs static

Message ID 20240821064040.2292969-6-ruanjinjie@huawei.com (mailing list archive)
State New, archived
Headers show
Series drm/amd/display: Make some symobols static | expand

Commit Message

Jinjie Ruan Aug. 21, 2024, 6:40 a.m. UTC
The sparse tool complains as follows:

drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c:1071:22: warning:
	symbol 'dcn35_fpga_funcs' was not declared. Should it be static?

This symbol is not used outside of dcn35_clk_mgr.c, so marks it static.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Deucher Aug. 21, 2024, 8:28 p.m. UTC | #1
On Wed, Aug 21, 2024 at 2:33 AM Jinjie Ruan <ruanjinjie@huawei.com> wrote:
>
> The sparse tool complains as follows:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c:1071:22: warning:
>         symbol 'dcn35_fpga_funcs' was not declared. Should it be static?
>
> This symbol is not used outside of dcn35_clk_mgr.c, so marks it static.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>  drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
> index e2d906327e2e..818a9b0933a5 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
> @@ -1068,7 +1068,7 @@ static struct clk_mgr_funcs dcn35_funcs = {
>         .is_ips_supported = dcn35_is_ips_supported,
>  };
>
> -struct clk_mgr_funcs dcn35_fpga_funcs = {
> +static struct clk_mgr_funcs dcn35_fpga_funcs = {
>         .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
>         .update_clocks = dcn35_update_clocks_fpga,
>         .init_clocks = dcn35_init_clocks_fpga,

This structure is not used and could be removed.  Making it static
will create a warning.

Alex


> --
> 2.34.1
>
kernel test robot Aug. 24, 2024, 9:27 a.m. UTC | #2
Hi Jinjie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20240821]

url:    https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/drm-amd-display-Make-core_dcn4_g6_temp_read_blackout_table-static/20240821-143421
base:   next-20240821
patch link:    https://lore.kernel.org/r/20240821064040.2292969-6-ruanjinjie%40huawei.com
patch subject: [PATCH -next 5/5] drm/amd/display: Make dcn35_fpga_funcs static
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240824/202408241600.uHrTIx7j-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240824/202408241600.uHrTIx7j-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408241600.uHrTIx7j-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c:1071:29: warning: unused variable 'dcn35_fpga_funcs' [-Wunused-variable]
    1071 | static struct clk_mgr_funcs dcn35_fpga_funcs = {
         |                             ^~~~~~~~~~~~~~~~
   1 warning generated.


vim +/dcn35_fpga_funcs +1071 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c

  1070	
> 1071	static struct clk_mgr_funcs dcn35_fpga_funcs = {
  1072		.get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
  1073		.update_clocks = dcn35_update_clocks_fpga,
  1074		.init_clocks = dcn35_init_clocks_fpga,
  1075		.get_dtb_ref_clk_frequency = dcn31_get_dtb_ref_freq_khz,
  1076	};
  1077
kernel test robot Aug. 24, 2024, 7:49 p.m. UTC | #3
Hi Jinjie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20240821]

url:    https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/drm-amd-display-Make-core_dcn4_g6_temp_read_blackout_table-static/20240821-143421
base:   next-20240821
patch link:    https://lore.kernel.org/r/20240821064040.2292969-6-ruanjinjie%40huawei.com
patch subject: [PATCH -next 5/5] drm/amd/display: Make dcn35_fpga_funcs static
config: i386-randconfig-003-20240824 (https://download.01.org/0day-ci/archive/20240825/202408250235.XZ6zToZY-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240825/202408250235.XZ6zToZY-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408250235.XZ6zToZY-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c:1071:29: warning: 'dcn35_fpga_funcs' defined but not used [-Wunused-variable]
    1071 | static struct clk_mgr_funcs dcn35_fpga_funcs = {
         |                             ^~~~~~~~~~~~~~~~


vim +/dcn35_fpga_funcs +1071 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c

  1070	
> 1071	static struct clk_mgr_funcs dcn35_fpga_funcs = {
  1072		.get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
  1073		.update_clocks = dcn35_update_clocks_fpga,
  1074		.init_clocks = dcn35_init_clocks_fpga,
  1075		.get_dtb_ref_clk_frequency = dcn31_get_dtb_ref_freq_khz,
  1076	};
  1077
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
index e2d906327e2e..818a9b0933a5 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
@@ -1068,7 +1068,7 @@  static struct clk_mgr_funcs dcn35_funcs = {
 	.is_ips_supported = dcn35_is_ips_supported,
 };
 
-struct clk_mgr_funcs dcn35_fpga_funcs = {
+static struct clk_mgr_funcs dcn35_fpga_funcs = {
 	.get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
 	.update_clocks = dcn35_update_clocks_fpga,
 	.init_clocks = dcn35_init_clocks_fpga,