From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbcGLV0J (ORCPT ); Tue, 12 Jul 2016 17:26:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42217 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750887AbcGLV0H (ORCPT ); Tue, 12 Jul 2016 17:26:07 -0400 Date: Tue, 12 Jul 2016 14:26:01 -0700 From: Andrew Morton To: Alexey Dobriyan Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] CFLAGS: add -Wunused-but-set-parameter Message-Id: <20160712142601.d64f863119b3cd8dcfbed7ec@linux-foundation.org> In-Reply-To: <20160707214306.GB31678@p183.telecom.by> References: <20160707214306.GB31678@p183.telecom.by> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Jul 2016 00:43:06 +0300 Alexey Dobriyan 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