From patchwork Wed Feb 27 09:46:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Kondratiev X-Patchwork-Id: 223574 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C42F42C0080 for ; Wed, 27 Feb 2013 20:46:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757904Ab3B0Jqo (ORCPT ); Wed, 27 Feb 2013 04:46:44 -0500 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:53584 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818Ab3B0Jql convert rfc822-to-8bit (ORCPT ); Wed, 27 Feb 2013 04:46:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1361958401; x=1393494401; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nyryh4AgEdyCh2ieB+OPNtP6nMIMGoyqjIdFD/DDvXQ=; b=vQ6SkMxXr419gi+ZO97Y51WgJgZ2n3rrgnfpUxPXTdfXluddq9fs3Uac e+I7LfEo2GJlNnqVS2WzvDQMyWmUGpitiviiWa878iTDVs/LqFVESwTqO hgQkvar5mD4E9SWZHKiwvRj/7+z+RlyjdV6IQ+h4Zqn5g/CB0Bb/5ruKb M=; X-IronPort-AV: E=Sophos;i="4.84,746,1355126400"; d="scan'208";a="26381489" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by sabertooth01.qualcomm.com with ESMTP; 27 Feb 2013 01:46:41 -0800 X-IronPort-AV: E=Sophos;i="4.84,746,1355126400"; d="scan'208";a="494782793" Received: from nasanexhc07.na.qualcomm.com ([172.30.39.190]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Feb 2013 01:46:40 -0800 Received: from lx-vladimir.localnet (172.30.39.5) by qcmail1.qualcomm.com (172.30.39.190) with Microsoft SMTP Server (TLS) id 14.2.318.4; Wed, 27 Feb 2013 01:46:39 -0800 From: Vladimir Kondratiev To: Chen Gang CC: "John W. Linville" , , , "netdev@vger.kernel.org >> netdev" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS Date: Wed, 27 Feb 2013 11:46:37 +0200 Message-ID: <1921426.IqHmmMU5eP@lx-vladimir> Organization: Qualcomm Atheros User-Agent: KMail/4.9.4 (Linux/3.5.0-25-generic; KDE/4.9.4; x86_64; ; ) In-Reply-To: <512DCA59.4040800@asianux.com> References: <512DADCA.9040609@asianux.com> <1385870.TegBXpTM9i@lx-vladimir> <512DCA59.4040800@asianux.com> MIME-Version: 1.0 X-Originating-IP: [172.30.39.5] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wednesday, February 27, 2013 04:56:57 PM Chen Gang wrote: > 于 2013年02月27日 16:45, Vladimir Kondratiev 写道: > > On Wednesday, February 27, 2013 02:55:06 PM Chen Gang wrote: > >> > >> When make with EXTRA_CFLAGS=-W, it will report error. > >> so give a check in Makefile. > >> > >> Signed-off-by: Chen Gang > >> --- > >> drivers/net/wireless/ath/wil6210/Makefile | 4 +++- > >> 1 files changed, 3 insertions(+), 1 deletions(-) > >> > >> diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile > >> index 9396dc9..d288eea 100644 > >> --- a/drivers/net/wireless/ath/wil6210/Makefile > >> +++ b/drivers/net/wireless/ath/wil6210/Makefile > >> @@ -9,5 +9,7 @@ wil6210-objs += wmi.o > >> wil6210-objs += interrupt.o > >> wil6210-objs += txrx.o > >> > >> -subdir-ccflags-y += -Werror > >> +ifeq (, $(findstring -W,$(EXTRA_CFLAGS))) > >> + subdir-ccflags-y += -Werror > >> +endif > >> subdir-ccflags-y += -D__CHECK_ENDIAN__ > >> > > Acked-by: Vladimir Kondratiev > > > > Well, agree; -W triggers lots of warnings, I suspect all other places that use > > -Werror should be problematic. Worth fixing all others? Quick look for v3.8 raises: > > > > thank you for your suggestion. > after this patch applied, I will do for others (let you as signed-of-by, too). Perhaps, it would be good idea to fight the original problem. I mean, fix warnings where possible. Example: there are lots of "unused parameter" ones. Where it is false warning, add __maybe_unused attribute. Like this: --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/kernel.h b/include/linux/kernel.h index c566927..83e43b7 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -163,8 +163,9 @@ extern int _cond_resched(void); # define might_sleep() \ do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) #else - static inline void __might_sleep(const char *file, int line, - int preempt_offset) { } + static inline void __might_sleep(const char *file __maybe_unused, + int line __maybe_unused, + int preempt_offset __maybe_unused) { } # define might_sleep() do { might_resched(); } while (0) #endif