From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbcGMTGs (ORCPT ); Wed, 13 Jul 2016 15:06:48 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34673 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbcGMTGr (ORCPT ); Wed, 13 Jul 2016 15:06:47 -0400 Date: Wed, 13 Jul 2016 22:06:22 +0300 From: Alexey Dobriyan To: Andrew Morton Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2] CFLAGS: add -Wunused-but-set-parameter Message-ID: <20160713190622.GB1910@p183.telecom.by> References: <20160707214306.GB31678@p183.telecom.by> <20160712142601.d64f863119b3cd8dcfbed7ec@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160712142601.d64f863119b3cd8dcfbed7ec@linux-foundation.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -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 change top level Makefile. Signed-off-by: Alexey Dobriyan --- Can't compile gcc that old :-( Makefile | 3 +++ 1 file changed, 3 insertions(+) --- a/Makefile +++ b/Makefile @@ -796,6 +796,9 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) # enforce correct pointer usage KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types) +# dead code +KBUILD_CFLAGS += $(call cc-option,-Wunused-but-set-parameter,) + # use the deterministic mode of AR if available KBUILD_ARFLAGS := $(call ar-option,D)