lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_MSc_JO_p4hOkT-U+b5Rvig3tEK+-qwhu3HMBXsp1ymDQ@mail.gmail.com>
Date:   Tue, 20 Sep 2016 00:38:55 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Christian König <christian.koenig@....com>
Cc:     Baoyou Xie <baoyou.xie@...aro.org>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "nils.wallmenius@...il.com" <nils.wallmenius@...il.com>,
        "Deng, Emily" <Emily.Deng@....com>,
        "cpaul@...hat.com" <cpaul@...hat.com>,
        "Nath, Arindam" <Arindam.Nath@....com>,
        "Zhou, David(ChunMing)" <David1.Zhou@....com>,
        "Liu, Monk" <Monk.Liu@....com>,
        "Zhang, Jerry" <Jerry.Zhang@....com>,
        "dan.carpenter@...cle.com" <dan.carpenter@...cle.com>,
        "StDenis, Tom" <Tom.StDenis@....com>,
        "Daenzer, Michel" <Michel.Daenzer@....com>,
        "xie.baoyou@....com.cn" <xie.baoyou@....com.cn>,
        "arnd@...db.de" <arnd@...db.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: mark symbols static where possible

On Mon, Sep 19, 2016 at 6:01 AM, Christian König
<christian.koenig@....com> wrote:
> Am 18.09.2016 um 16:09 schrieb Baoyou Xie:
>>
>> We get 7 warnings when building kernel with W=1:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1990:5: warning: no previous
>> prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no
>> previous prototype for 'amdgpu_connector_virtual_dpms'
>> [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1560:5: warning: no
>> previous prototype for 'amdgpu_connector_virtual_set_property'
>> [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:330:5: warning: no previous
>> prototype for 'amdgpu_cs_list_validate' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/dce_virtual.c:98:6: warning: no previous
>> prototype for 'dce_virtual_stop_mc_access' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous
>> prototype for 'dce_virtual_resume_mc_access' [-Wmissing-prototypes]
>> drivers/gpu/drm/amd/amdgpu/dce_virtual.c:136:6: warning: no previous
>> prototype for 'dce_virtual_set_vga_render_state' [-Wmissing-prototypes]
>>
>> In fact, all of the 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 both functions with 'static'.
>>
>> Signed-off-by: Baoyou Xie <baoyou.xie@...aro.org>
>
>
> Reviewed-by: Christian König <christian.koenig@....com>.
>

Applied.  thanks!

Alex

>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 ++++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c         | 2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c     | 2 +-
>>   drivers/gpu/drm/amd/amdgpu/dce_virtual.c       | 6 +++---
>>   4 files changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
>> index 319a5e1..decbba5 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
>> @@ -1545,7 +1545,8 @@ static int
>> amdgpu_connector_virtual_mode_valid(struct drm_connector *connector,
>>         return MODE_OK;
>>   }
>>   -int amdgpu_connector_virtual_dpms(struct drm_connector *connector, int
>> mode)
>> +static int
>> +amdgpu_connector_virtual_dpms(struct drm_connector *connector, int mode)
>>   {
>>         return 0;
>>   }
>> @@ -1557,7 +1558,8 @@ amdgpu_connector_virtual_detect(struct drm_connector
>> *connector, bool force)
>>         return connector_status_connected;
>>   }
>>   -int amdgpu_connector_virtual_set_property(struct drm_connector
>> *connector,
>> +static int
>> +amdgpu_connector_virtual_set_property(struct drm_connector *connector,
>>                                   struct drm_property *property,
>>                                   uint64_t val)
>>   {
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> index d80e5d3..b408eea 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> @@ -327,7 +327,7 @@ retry:
>>         return r;
>>   }
>>   -int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
>> +static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
>>                             struct list_head *validated)
>>   {
>>         struct amdgpu_bo_list_entry *lobj;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index c38dc47..09b809d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -1987,7 +1987,7 @@ static bool amdgpu_check_soft_reset(struct
>> amdgpu_device *adev)
>>         return asic_hang;
>>   }
>>   -int amdgpu_pre_soft_reset(struct amdgpu_device *adev)
>> +static int amdgpu_pre_soft_reset(struct amdgpu_device *adev)
>>   {
>>         int i, r = 0;
>>   diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>> b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>> index 00663a7..2d02acd 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>> @@ -95,7 +95,7 @@ static bool dce_virtual_is_display_hung(struct
>> amdgpu_device *adev)
>>         return false;
>>   }
>>   -void dce_virtual_stop_mc_access(struct amdgpu_device *adev,
>> +static void dce_virtual_stop_mc_access(struct amdgpu_device *adev,
>>                               struct amdgpu_mode_mc_save *save)
>>   {
>>         switch (adev->asic_type) {
>> @@ -127,13 +127,13 @@ void dce_virtual_stop_mc_access(struct amdgpu_device
>> *adev,
>>         return;
>>   }
>> -void dce_virtual_resume_mc_access(struct amdgpu_device *adev,
>> +static void dce_virtual_resume_mc_access(struct amdgpu_device *adev,
>>                                 struct amdgpu_mode_mc_save *save)
>>   {
>>         return;
>>   }
>>   -void dce_virtual_set_vga_render_state(struct amdgpu_device *adev,
>> +static void dce_virtual_set_vga_render_state(struct amdgpu_device *adev,
>>                                     bool render)
>>   {
>>         return;
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ