linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CFLAGS: add -Wunused-but-set-parameter
Date: Tue, 12 Jul 2016 14:26:01 -0700	[thread overview]
Message-ID: <20160712142601.d64f863119b3cd8dcfbed7ec@linux-foundation.org> (raw)
In-Reply-To: <20160707214306.GB31678@p183.telecom.by>

On Fri, 8 Jul 2016 00:43:06 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:

> -Wunused-but-set-parameter is finding stuff with current allmodconfig:
> 
> drivers/misc/mic/scif/scif_dma.c:118:27: warning: parameter 'ep' set but not used [-Wunused-but-set-parameter]
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: warning: parameter 'function' set but not used [-Wunused-but-set-parameter]
> drivers/net/ethernet/ti/tlan.c:1647:59: warning: parameter 'host_int' set but not used [-Wunused-but-set-parameter]
> drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: warning: parameter 'driver' set but not used [-Wunused-but-set-parameter]
> 
> and judging by changelogs, people were using it before,
> but were too scared to touch top level Makefile.
>
> ...
>
> --- a/Makefile
> +++ b/Makefile
> @@ -399,6 +399,7 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
>  		   -Werror-implicit-function-declaration \
>  		   -Wno-format-security \
>  		   -std=gnu89
> +KBUILD_CFLAGS += -Wunused-but-set-parameter
>  
>  KBUILD_AFLAGS_KERNEL :=
>  KBUILD_CFLAGS_KERNEL :=

gcc-4.4.4:

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
cc1: error: unrecognized command line option "-Wunused-but-set-parameter"
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-Wunused-but-set-parameter"
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1

  parent reply	other threads:[~2016-07-12 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 21:43 [PATCH] CFLAGS: add -Wunused-but-set-parameter Alexey Dobriyan
2016-07-11 10:13 ` kbuild test robot
2016-07-12 21:26 ` Andrew Morton [this message]
2016-07-13 19:06   ` [PATCH v2] " Alexey Dobriyan

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=20160712142601.d64f863119b3cd8dcfbed7ec@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).