linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Baoyou Xie <baoyou.xie@linaro.org>, dri-devel@lists.freedesktop.org
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
Subject: Re: [PATCH] drm/nouveau: silence warnings reported during builds with W=1
Date: Tue, 30 Aug 2016 22:04:41 +0200	[thread overview]
Message-ID: <201608302204.41518.arnd@arndb.de> (raw)
In-Reply-To: <1472573836-2759-1-git-send-email-baoyou.xie@linaro.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 <baoyou.xie@linaro.org>

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 <arnd@arndb.de>

Otherwise please split and resend in a few days, in case there are other comments
that need to be addressed.

	Arnd

      reply	other threads:[~2016-08-30 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 16:17 [PATCH] drm/nouveau: silence warnings reported during builds with W=1 Baoyou Xie
2016-08-30 20:04 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201608302204.41518.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Julia.Lawall@lip6.fr \
    --cc=acourbot@nvidia.com \
    --cc=airlied@linux.ie \
    --cc=baoyou.xie@linaro.org \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.peres@free.fr \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rspliet@eclipso.eu \
    --cc=xie.baoyou@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).