* [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
@ 2016-09-19 7:28 Baoyou Xie
2016-09-19 7:34 ` Arnd Bergmann
2016-09-19 7:43 ` Huang Rui
0 siblings, 2 replies; 9+ messages in thread
From: Baoyou Xie @ 2016-09-19 7:28 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, airlied, Qingqing.Wang,
Monk.Liu, JinHuiEric.Huang, Rex.Zhu, nils.wallmenius, ray.huang,
Young.Yang, Flora.Cui, Jammy.Zhou, funfunctor, dri-devel,
linux-kernel, arnd, baoyou.xie, xie.baoyou
We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 22 +++++++++++-----------
.../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
.../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 20 +++++++++++++-------
.../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +-
4 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
index 8e52a2e..96fc38e 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
@@ -187,7 +187,7 @@ int fiji_copy_bytes_to_smc(struct pp_smumgr *smumgr,
return 0;
}
-int fiji_program_jump_on_start(struct pp_smumgr *smumgr)
+static int fiji_program_jump_on_start(struct pp_smumgr *smumgr)
{
static const unsigned char data[] = { 0xE0, 0x00, 0x80, 0x40 };
@@ -201,7 +201,7 @@ int fiji_program_jump_on_start(struct pp_smumgr *smumgr)
*
* @param smumgr the address of the powerplay hardware manager.
*/
-bool fiji_is_smc_ram_running(struct pp_smumgr *smumgr)
+static bool fiji_is_smc_ram_running(struct pp_smumgr *smumgr)
{
return ((0 == SMUM_READ_VFPF_INDIRECT_FIELD(smumgr->device,
CGS_IND_REG__SMC,
@@ -217,7 +217,7 @@ bool fiji_is_smc_ram_running(struct pp_smumgr *smumgr)
* @param msg the message to send.
* @return The response that came from the SMC.
*/
-int fiji_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
+static int fiji_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
{
if (!fiji_is_smc_ram_running(smumgr))
return -1;
@@ -240,7 +240,7 @@ int fiji_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
* @param parameter: the parameter to send
* @return The response that came from the SMC.
*/
-int fiji_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr,
+static int fiji_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr,
uint16_t msg, uint32_t parameter)
{
if (!fiji_is_smc_ram_running(smumgr))
@@ -267,7 +267,7 @@ int fiji_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr,
* @param parameter: the parameter to send
* @return The response that came from the SMC.
*/
-int fiji_send_msg_to_smc_with_parameter_without_waiting(
+static int fiji_send_msg_to_smc_with_parameter_without_waiting(
struct pp_smumgr *smumgr, uint16_t msg, uint32_t parameter)
{
if (1 != SMUM_READ_FIELD(smumgr->device, SMC_RESP_0, SMC_RESP)) {
@@ -661,7 +661,7 @@ static int fiji_start_smu_in_non_protection_mode(struct pp_smumgr *smumgr)
return result;
}
-int fiji_setup_pwr_virus(struct pp_smumgr *smumgr)
+static int fiji_setup_pwr_virus(struct pp_smumgr *smumgr)
{
int i, result = -1;
uint32_t reg, data;
@@ -726,7 +726,7 @@ static int fiji_start_avfs_btc(struct pp_smumgr *smumgr)
return result;
}
-int fiji_setup_pm_fuse_for_avfs(struct pp_smumgr *smumgr)
+static int fiji_setup_pm_fuse_for_avfs(struct pp_smumgr *smumgr)
{
int result = 0;
uint32_t table_start;
@@ -762,7 +762,7 @@ int fiji_setup_pm_fuse_for_avfs(struct pp_smumgr *smumgr)
return result;
}
-int fiji_setup_graphics_level_structure(struct pp_smumgr *smumgr)
+static int fiji_setup_graphics_level_structure(struct pp_smumgr *smumgr)
{
int32_t vr_config;
uint32_t table_start;
@@ -801,7 +801,7 @@ int fiji_setup_graphics_level_structure(struct pp_smumgr *smumgr)
}
/* Work in Progress */
-int fiji_restore_vft_table(struct pp_smumgr *smumgr)
+static int fiji_restore_vft_table(struct pp_smumgr *smumgr)
{
struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
@@ -813,7 +813,7 @@ int fiji_restore_vft_table(struct pp_smumgr *smumgr)
}
/* Work in Progress */
-int fiji_save_vft_table(struct pp_smumgr *smumgr)
+static int fiji_save_vft_table(struct pp_smumgr *smumgr)
{
struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
@@ -824,7 +824,7 @@ int fiji_save_vft_table(struct pp_smumgr *smumgr)
return -EINVAL;
}
-int fiji_avfs_event_mgr(struct pp_smumgr *smumgr, bool smu_started)
+static int fiji_avfs_event_mgr(struct pp_smumgr *smumgr, bool smu_started)
{
struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
index f506583..e5a2b0c 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
@@ -164,7 +164,7 @@ static void iceland_pp_reset_smc(struct pp_smumgr *smumgr)
rst_reg, 1);
}
-int iceland_program_jump_on_start(struct pp_smumgr *smumgr)
+static int iceland_program_jump_on_start(struct pp_smumgr *smumgr)
{
static const unsigned char pData[] = { 0xE0, 0x00, 0x80, 0x40 };
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
index 704ff4c..e7f7b68 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
@@ -212,7 +212,7 @@ static int polaris10_program_jump_on_start(struct pp_smumgr *smumgr)
*
* @param smumgr the address of the powerplay hardware manager.
*/
-bool polaris10_is_smc_ram_running(struct pp_smumgr *smumgr)
+static bool polaris10_is_smc_ram_running(struct pp_smumgr *smumgr)
{
return ((0 == SMUM_READ_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, SMC_SYSCON_CLOCK_CNTL_0, ck_disable))
&& (0x20100 <= cgs_read_ind_register(smumgr->device, CGS_IND_REG__SMC, ixSMC_PC_C)));
@@ -237,7 +237,8 @@ static bool polaris10_is_hw_avfs_present(struct pp_smumgr *smumgr)
* @param msg the message to send.
* @return The response that came from the SMC.
*/
-int polaris10_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
+static int
+polaris10_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
{
int ret;
@@ -272,7 +273,9 @@ int polaris10_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
* @param msg the message to send.
* @return Always return 0.
*/
-int polaris10_send_msg_to_smc_without_waiting(struct pp_smumgr *smumgr, uint16_t msg)
+static int
+polaris10_send_msg_to_smc_without_waiting(struct pp_smumgr *smumgr,
+ uint16_t msg)
{
cgs_write_register(smumgr->device, mmSMC_MESSAGE_0, msg);
@@ -287,7 +290,9 @@ int polaris10_send_msg_to_smc_without_waiting(struct pp_smumgr *smumgr, uint16_t
* @param parameter: the parameter to send
* @return The response that came from the SMC.
*/
-int polaris10_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr, uint16_t msg, uint32_t parameter)
+static int
+polaris10_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr,
+ uint16_t msg, uint32_t parameter)
{
if (!polaris10_is_smc_ram_running(smumgr)) {
return -1;
@@ -316,7 +321,7 @@ int polaris10_send_msg_to_smc_with_parameter_without_waiting(struct pp_smumgr *s
return polaris10_send_msg_to_smc_without_waiting(smumgr, msg);
}
-int polaris10_send_msg_to_smc_offset(struct pp_smumgr *smumgr)
+static int polaris10_send_msg_to_smc_offset(struct pp_smumgr *smumgr)
{
cgs_write_register(smumgr->device, mmSMC_MSG_ARG_0, 0x20000);
@@ -686,7 +691,7 @@ static int polaris10_perform_btc(struct pp_smumgr *smumgr)
}
-int polaris10_setup_graphics_level_structure(struct pp_smumgr *smumgr)
+static int polaris10_setup_graphics_level_structure(struct pp_smumgr *smumgr)
{
uint32_t vr_config;
uint32_t dpm_table_start;
@@ -740,7 +745,8 @@ int polaris10_setup_graphics_level_structure(struct pp_smumgr *smumgr)
return 0;
}
-int polaris10_avfs_event_mgr(struct pp_smumgr *smumgr, bool SMU_VFT_INTACT)
+static int
+polaris10_avfs_event_mgr(struct pp_smumgr *smumgr, bool SMU_VFT_INTACT)
{
struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(smumgr->backend);
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
index f42c536..2efdd98 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c
@@ -143,7 +143,7 @@ out:
}
-int tonga_program_jump_on_start(struct pp_smumgr *smumgr)
+static int tonga_program_jump_on_start(struct pp_smumgr *smumgr)
{
static const unsigned char pData[] = { 0xE0, 0x00, 0x80, 0x40 };
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
2016-09-19 7:28 [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible Baoyou Xie
@ 2016-09-19 7:34 ` Arnd Bergmann
2016-09-19 7:43 ` Huang Rui
1 sibling, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-09-19 7:34 UTC (permalink / raw)
To: Baoyou Xie
Cc: alexander.deucher, christian.koenig, airlied, Qingqing.Wang,
Monk.Liu, JinHuiEric.Huang, Rex.Zhu, nils.wallmenius, ray.huang,
Young.Yang, Flora.Cui, Jammy.Zhou, funfunctor, dri-devel,
linux-kernel, xie.baoyou
On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
> We get a few warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> ....
>
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> So this patch marks these functions with 'static'.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>
Hi Baoyou,
All your drm/amd patches seem fine to me, but again (as with the nouveau
driver patches before), I think it would make more sense to consolidate
them, and do a small number of patches such as
[PATCH 1/3] drm/amdgpu: add missing includes
[PATCH 2/3] drm/amdgpu: remove unused functions
[PATCH 3/3] drm/amdgpu: mark symbol static where possible
This is all one big driver, and I see no value in splitting it up
per file within the driver.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
@ 2016-09-19 7:34 ` Arnd Bergmann
0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-09-19 7:34 UTC (permalink / raw)
To: Baoyou Xie
Cc: nils.wallmenius, Jammy.Zhou, funfunctor, xie.baoyou,
linux-kernel, dri-devel, JinHuiEric.Huang, ray.huang, Young.Yang,
alexander.deucher, Qingqing.Wang, Flora.Cui, Rex.Zhu,
christian.koenig, Monk.Liu
On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
> We get a few warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> ....
>
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> So this patch marks these functions with 'static'.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>
Hi Baoyou,
All your drm/amd patches seem fine to me, but again (as with the nouveau
driver patches before), I think it would make more sense to consolidate
them, and do a small number of patches such as
[PATCH 1/3] drm/amdgpu: add missing includes
[PATCH 2/3] drm/amdgpu: remove unused functions
[PATCH 3/3] drm/amdgpu: mark symbol static where possible
This is all one big driver, and I see no value in splitting it up
per file within the driver.
Arnd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
2016-09-19 7:28 [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible Baoyou Xie
@ 2016-09-19 7:43 ` Huang Rui
2016-09-19 7:43 ` Huang Rui
1 sibling, 0 replies; 9+ messages in thread
From: Huang Rui @ 2016-09-19 7:43 UTC (permalink / raw)
To: Baoyou Xie, amd-gfx
Cc: alexander.deucher, christian.koenig, airlied, Qingqing.Wang,
Monk.Liu, JinHuiEric.Huang, Rex.Zhu, nils.wallmenius, Young.Yang,
Flora.Cui, Jammy.Zhou, funfunctor, dri-devel, linux-kernel, arnd,
xie.baoyou
Hi Baoyou,
On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote:
> We get a few warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> ....
>
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> So this patch marks these functions with 'static'.
>
+ amd-gfx mail list.
Thanks to your patch. But powerplay part is refactored recently below, some
functions are already updated. So you might need rebase them. :-)
https://lists.freedesktop.org/archives/amd-gfx/2016-September/002118.html
Thanks,
Rui
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
@ 2016-09-19 7:43 ` Huang Rui
0 siblings, 0 replies; 9+ messages in thread
From: Huang Rui @ 2016-09-19 7:43 UTC (permalink / raw)
To: Baoyou Xie, amd-gfx
Cc: nils.wallmenius, arnd, Jammy.Zhou, funfunctor, xie.baoyou,
linux-kernel, dri-devel, JinHuiEric.Huang, Young.Yang,
alexander.deucher, Qingqing.Wang, Flora.Cui, Rex.Zhu,
christian.koenig, Monk.Liu
Hi Baoyou,
On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote:
> We get a few warnings when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> ....
>
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> So this patch marks these functions with 'static'.
>
+ amd-gfx mail list.
Thanks to your patch. But powerplay part is refactored recently below, some
functions are already updated. So you might need rebase them. :-)
https://lists.freedesktop.org/archives/amd-gfx/2016-September/002118.html
Thanks,
Rui
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
2016-09-19 7:34 ` Arnd Bergmann
@ 2016-09-19 7:59 ` Christian König
-1 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2016-09-19 7:59 UTC (permalink / raw)
To: Arnd Bergmann, Baoyou Xie
Cc: alexander.deucher, airlied, Qingqing.Wang, Monk.Liu,
JinHuiEric.Huang, Rex.Zhu, nils.wallmenius, ray.huang,
Young.Yang, Flora.Cui, Jammy.Zhou, funfunctor, dri-devel,
linux-kernel, xie.baoyou
Am 19.09.2016 um 09:34 schrieb Arnd Bergmann:
> On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
>> We get a few warnings when building kernel with W=1:
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
>> ....
>>
>> In fact, these functions are only used in the file in which they are
>> declared and don't need a declaration, but can be made static.
>> So this patch marks these functions with 'static'.
>>
>> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>>
> Hi Baoyou,
>
> All your drm/amd patches seem fine to me, but again (as with the nouveau
> driver patches before), I think it would make more sense to consolidate
> them, and do a small number of patches such as
>
> [PATCH 1/3] drm/amdgpu: add missing includes
> [PATCH 2/3] drm/amdgpu: remove unused functions
> [PATCH 3/3] drm/amdgpu: mark symbol static where possible
>
> This is all one big driver,
No it isn't. The different parts are developed by different teams at
AMD, so the splitting them up is rather welcome here.
So please keep your style as it is, at least for the amdgpu driver.
Regards,
Christian.
> and I see no value in splitting it up
> per file within the driver.
>
> Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
@ 2016-09-19 7:59 ` Christian König
0 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2016-09-19 7:59 UTC (permalink / raw)
To: Arnd Bergmann, Baoyou Xie
Cc: nils.wallmenius, Jammy.Zhou, funfunctor, xie.baoyou,
linux-kernel, dri-devel, JinHuiEric.Huang, ray.huang, Young.Yang,
alexander.deucher, Qingqing.Wang, Flora.Cui, Rex.Zhu, Monk.Liu
Am 19.09.2016 um 09:34 schrieb Arnd Bergmann:
> On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
>> We get a few warnings when building kernel with W=1:
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
>> ....
>>
>> In fact, these functions are only used in the file in which they are
>> declared and don't need a declaration, but can be made static.
>> So this patch marks these functions with 'static'.
>>
>> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>>
> Hi Baoyou,
>
> All your drm/amd patches seem fine to me, but again (as with the nouveau
> driver patches before), I think it would make more sense to consolidate
> them, and do a small number of patches such as
>
> [PATCH 1/3] drm/amdgpu: add missing includes
> [PATCH 2/3] drm/amdgpu: remove unused functions
> [PATCH 3/3] drm/amdgpu: mark symbol static where possible
>
> This is all one big driver,
No it isn't. The different parts are developed by different teams at
AMD, so the splitting them up is rather welcome here.
So please keep your style as it is, at least for the amdgpu driver.
Regards,
Christian.
> and I see no value in splitting it up
> per file within the driver.
>
> Arnd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
2016-09-19 7:59 ` Christian König
@ 2016-09-19 8:04 ` Arnd Bergmann
-1 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-09-19 8:04 UTC (permalink / raw)
To: Christian König
Cc: Baoyou Xie, alexander.deucher, airlied, Qingqing.Wang, Monk.Liu,
JinHuiEric.Huang, Rex.Zhu, nils.wallmenius, ray.huang,
Young.Yang, Flora.Cui, Jammy.Zhou, funfunctor, dri-devel,
linux-kernel, xie.baoyou
On Monday, September 19, 2016 9:59:56 AM CEST Christian König wrote:
> Am 19.09.2016 um 09:34 schrieb Arnd Bergmann:
> > On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
> >> We get a few warnings when building kernel with W=1:
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> >> ....
> >>
> >> In fact, these functions are only used in the file in which they are
> >> declared and don't need a declaration, but can be made static.
> >> So this patch marks these functions with 'static'.
> >>
> >> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> >>
> > Hi Baoyou,
> >
> > All your drm/amd patches seem fine to me, but again (as with the nouveau
> > driver patches before), I think it would make more sense to consolidate
> > them, and do a small number of patches such as
> >
> > [PATCH 1/3] drm/amdgpu: add missing includes
> > [PATCH 2/3] drm/amdgpu: remove unused functions
> > [PATCH 3/3] drm/amdgpu: mark symbol static where possible
> >
> > This is all one big driver,
>
> No it isn't. The different parts are developed by different teams at
> AMD, so the splitting them up is rather welcome here.
>
> So please keep your style as it is, at least for the amdgpu driver.
Ok, fair enough. Thanks for the clarification!
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible
@ 2016-09-19 8:04 ` Arnd Bergmann
0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-09-19 8:04 UTC (permalink / raw)
To: Christian König
Cc: Flora.Cui, nils.wallmenius, Jammy.Zhou, funfunctor, xie.baoyou,
linux-kernel, dri-devel, JinHuiEric.Huang, ray.huang, Young.Yang,
alexander.deucher, Qingqing.Wang, Baoyou Xie, Rex.Zhu, Monk.Liu
On Monday, September 19, 2016 9:59:56 AM CEST Christian König wrote:
> Am 19.09.2016 um 09:34 schrieb Arnd Bergmann:
> > On Monday, September 19, 2016 3:28:39 PM CEST Baoyou Xie wrote:
> >> We get a few warnings when building kernel with W=1:
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/fiji_smumgr.c:816:5: warning: no previous prototype for 'fiji_save_vft_table' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/polaris10_smumgr.c:743:5: warning: no previous prototype for 'polaris10_avfs_event_mgr' [-Wmissing-prototypes]
> >> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/iceland_smumgr.c:167:5: warning: no previous prototype for 'iceland_program_jump_on_start' [-Wmissing-prototypes]
> >> ....
> >>
> >> In fact, these functions are only used in the file in which they are
> >> declared and don't need a declaration, but can be made static.
> >> So this patch marks these functions with 'static'.
> >>
> >> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> >>
> > Hi Baoyou,
> >
> > All your drm/amd patches seem fine to me, but again (as with the nouveau
> > driver patches before), I think it would make more sense to consolidate
> > them, and do a small number of patches such as
> >
> > [PATCH 1/3] drm/amdgpu: add missing includes
> > [PATCH 2/3] drm/amdgpu: remove unused functions
> > [PATCH 3/3] drm/amdgpu: mark symbol static where possible
> >
> > This is all one big driver,
>
> No it isn't. The different parts are developed by different teams at
> AMD, so the splitting them up is rather welcome here.
>
> So please keep your style as it is, at least for the amdgpu driver.
Ok, fair enough. Thanks for the clarification!
Arnd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-09-19 8:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 7:28 [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible Baoyou Xie
2016-09-19 7:34 ` Arnd Bergmann
2016-09-19 7:34 ` Arnd Bergmann
2016-09-19 7:59 ` Christian König
2016-09-19 7:59 ` Christian König
2016-09-19 8:04 ` Arnd Bergmann
2016-09-19 8:04 ` Arnd Bergmann
2016-09-19 7:43 ` Huang Rui
2016-09-19 7:43 ` Huang Rui
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.