From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbcH3UKu (ORCPT ); Tue, 30 Aug 2016 16:10:50 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:54022 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751118AbcH3UKt (ORCPT ); Tue, 30 Aug 2016 16:10:49 -0400 From: Arnd Bergmann To: Baoyou Xie , dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/nouveau: silence warnings reported during builds with W=1 Date: Tue, 30 Aug 2016 22:04:41 +0200 User-Agent: KMail/1.12.2 (Linux/4.7.0-rc7+; KDE/4.3.2; x86_64; ; ) Cc: bskeggs@redhat.com, airlied@linux.ie, acourbot@nvidia.com, imirkin@alum.mit.edu, Julia.Lawall@lip6.fr, martin.peres@free.fr, rspliet@eclipso.eu, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, xie.baoyou@zte.com.cn References: <1472573836-2759-1-git-send-email-baoyou.xie@linaro.org> In-Reply-To: <1472573836-2759-1-git-send-email-baoyou.xie@linaro.org> MIME-Version: 1.0 Message-Id: <201608302204.41518.arnd@arndb.de> Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:uTtFpF/S7I9sSoqpD7mx7E+h5bkDxYTqVGk8cmecYvf2rIIoTu/ L3Xdotbicu7jqn/O7FK8PUSVbWCdTj0Th1p92zx09at+UZcxOggh00Pl6q8uYlkF2zHiuWE BkGd36RYQ87OEuERgXmFhcyiyNB9HPSnOWGR6V6Wpid89IYoFfhEJaYWQbWI6j5pGZ+pL8X EwxOzZNCGkRq5OFrhlrZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:EjszCW5ty3g=:KKNkIyFWE97+RNwAja6nmz GnqVp2ZQITFeeXoE5HnLWFPbAyLSJXAbvMIPvsD7PAQMTaCxYa50KUT5FinXUVZIGyxaacy5X Li5JIo/Jke77zmpl3CrTCXN8B8FV9/L37//haUXScL2/6FUSuvQPuL40gBifEDLnfbP9JLjUg O5BYCCbOTbZTOsGF6h1eML60lOWbUe7q61ae27uRV8+mA4skE+IVLITCKIWjccpE+fLoyrZFk yZVJQmvD9WWI9nfUAX+GaS2liE6BgCM0OusM9GoDcfXiNPY/vMom592s31hzyM0ZEjXCu/keu WgxHCS0r5lhNgq1bfUImlcmnFdAXN46w0w8mVsv5dVDdc8q7Nl2RLaycs1Wj4+06lK6COVyOu GttkiTNZze0+yNdv+gXMoAtVbcIvdy3wjRfk+yokoVTHDtD7EY97eOpdY57y9a5Ap3VOEJuiO LZZQGaG+sh0NjQl7bFRjs9Ru9GF1mewUWZG9YwVRX2InBOgsPvOSBNYLAC3Ng/V9TlpnezoAd z0UIdiq3c2o9KitXYgFj4sFZ5EhejLoYByYNsiAfNEnsgz2vlIHXdiokD23Lr/67PmbxeRqNM AwUmrfZoyCjdaCDvOsPlVTqhihhex40rj7XxkfugVuOJX520LpDenHZetOpEAKBvqJ8rvWQt5 cn7zLe8CPhly3WUU7an2XNXs7rZbH3p01MwgY+me7pWGBJB4O6WnvJrMRZCqWNM5ZId7kdZXq Un970KZzyFFkOizf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 30 August 2016, Baoyou Xie wrote: > We get some warnings when building kernel with W=1: > drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c:222:1: warning: no previous prototype for 'gf117_grctx_generate_main' [-Wmissing-prototypes] > drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c:255:1: warning: no previous prototype for 'nv50_grctx_fill' [-Wmissing-prototypes] > drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c:265:1: warning: no previous prototype for 'nv50_grctx_init' [-Wmissing-prototypes] > .... > > In fact, some functions are only used in the file in which they > are declared and don't need a declaration, but can be made static. > and others are declared in the header files, but need to add > missing header dependencies. > > Signed-off-by: Baoyou Xie The patch looks very good, and this is better than one patch per file. I would personally do this as two patches, as you are touching a number of files and are doing two separate things here. As a rule of thumb, when the changelog text mentions two or more things that the patch does, the patch should be split up so that each part does one thing. After you do that, it also becomes easier to write a good subject line like "mark function as static" and "add missing includes", which tells you more about the patch than "silence warnings". It's quite likely that the nouveau maintainers are less picky than I am though, so if they want to apply the patch as-is Acked-by: Arnd Bergmann Otherwise please split and resend in a few days, in case there are other comments that need to be addressed. Arnd