Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758264AbcJYIPc (ORCPT ); Tue, 25 Oct 2016 04:15:32 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:49741 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbcJYIP2 (ORCPT ); Tue, 25 Oct 2016 04:15:28 -0400 From: Arnd Bergmann To: Baoyou Xie Cc: "Deucher, Alexander" , Dave Airlie , "Zhu, Rex" , "Zhou, Jammy" , "Huang, JinHuiEric" , "StDenis, Tom" , "Edward O'Callaghan" , "Prosyak, Vitaly" , "Yang, Eric" , "Yang, Young" , Huang Rui , Dan Carpenter , "Cui, Flora" , Nils =?ISO-8859-1?Q?Wallm=E9nius?= , "Liu, Monk" , Qingqing.Wang@amd.com, "Min, Frank" , dri-devel , Linux Kernel Mailing List , xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: Re: [PATCH] drm/amd/powerplay: mark symbols static where possible Date: Tue, 25 Oct 2016 10:15:06 +0200 Message-ID: <10254575.qBa8RMPyZ5@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1477126582-2906-1-git-send-email-baoyou.xie@linaro.org> <6582910.6C6abby7Jc@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:LmV/QfLFYFr3eHtpkbQjH137qxUiuDBtdKl5sYYITgi4LBsWjJh Ly7n0fqhr/5fAkrFwutTCJ5bpa+/SRohZWHH3U/yPxO8rEKsCfNH0hWRPnasHGDh8JVML+4 ILKzr8d5mxQphol+dn/sZKRx8zedQbbtYNfDtUhpdvhHe12uKkf+KEI0Jl3jcoZ6bPc/cHz XcQSJiGWvkGVXorsM6H5A== X-UI-Out-Filterresults: notjunk:1;V01:K0:MMwey5Rm1GI=:eoX5zKdru7oBsjKYz6gNMQ AcZbXiJPK5tQ8gcebyF5i0h/RwylRc8Ut9A149siPo4o9VwRXWEg1FJj3RACdksLTxSYPlJx4 ubGLS68RJwJ8N9UGoLtUOPplG4AeEiOEbeHNHSKLihhpVC7B7e796yJJqBGaFlVa06fxxDsKW ua78pKSlCfjItzPNq9TxwD24tOkS5REsa8rRc1It7J1qN/szhN9kdhXdbiucmssrL+ogx7rrN ME0sla2myDvSDdaRaHS+/XWCmFKnlymyDS6A/3VZWUP4U/vD4bWGxuxkZOEiwwuOQWdUSk9i5 3T5m69VCZY/riS4Y3XCCLRF1ae5xxZ9cClzpxOUt/SuIvloPEVkRqcR+uYWlNh7Qbbtwpih9X 1m3L7pT874pOX/4cd6IoJH9de6v4x39mgI0n3bCCemd4qintu1e9TEsLt02I/1zBgiODH/XlB Fhkb6Tb1Z8rFaAEw2DwDqeGLris+be4jh87AcwQe4u10ayVWqer2+LXa/Lwa78O2kx9EF8Sal E/X5eFI6enUULNUwVHTo4vDVMYlPpXQvaJx+YWMexrZxyQ/i+OHMmCJj2uA+/AzpOSnHRGIH4 kD/M+rojOG2ztN3KTSqd1ve+JIlmj6KSTa9QLpyTQ42ZCBhcj8R4TRdLVCp05cjuMiZMAMhf0 Vg/yZplgfSxkIZq6xUOCM3U/32H3JSN22U8qY3e8B/EQsnd8RlzESfu4pYHrmU2VA/psy/XUe K3o2LxpjDEP9Uxx6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 29 On Tuesday, October 25, 2016 10:31:21 AM CEST Baoyou Xie wrote: > On 25 October 2016 at 04:51, Arnd Bergmann wrote: > > On Saturday, October 22, 2016 4:56:22 PM CEST Baoyou Xie wrote: > > The function has no callers, so the easiest way would be to remove it > > entirely, but it's possible that there are plans to add users soon. > > > > It was assumed that this function will be used soon, so this patch remains > it. > if it still not be used in 4.10, then we can remove it. > is it right? There is no such rule in general, it's up to the maintainer and it depends on the specific reason for why the function ended up being unused in the first place. However, we can expect the maintainer to come up with some solution to address the warning. Possible options include: - calling the function from where it was meant to be used - removing the function - adding __maybe_unused - adding an #if 0 I have not looked at this specific example and do not know which of them would be appropriate here. If you look at the output of 'git log -p drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c' you might find it out yourself. Arnd