From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933622AbcI3O3n (ORCPT ); Fri, 30 Sep 2016 10:29:43 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:61999 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933063AbcI3O3k (ORCPT ); Fri, 30 Sep 2016 10:29:40 -0400 From: Arnd Bergmann To: Baoyou Xie Subject: Re: [PATCH 2/2] qed: remove unused function in qed_cxt.c Date: Fri, 30 Sep 2016 16:29:03 +0200 User-Agent: KMail/1.12.2 (Linux/4.7.0-rc7+; KDE/4.3.2; x86_64; ; ) Cc: Yuval.Mintz@qlogic.com, Ariel.Elior@qlogic.com, everest-linux-l2@qlogic.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn References: <1475222574-19280-1-git-send-email-baoyou.xie@linaro.org> In-Reply-To: <1475222574-19280-1-git-send-email-baoyou.xie@linaro.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201609301629.03359.arnd@arndb.de> X-Provags-ID: V03:K0:haZ325vfWTOX4AVZN6iN/9qAK83bkPQbIV4dWqzPFZAWqTlYpvi /dKv/a8e5jg6VNIYwFVlcU7rG5TUKZlSqcvKf/NXOSLIg30CHoLLew7LfN6lXJVG5HJoPzj +W3L1B3dJTdnpsXw8k81ADeT3l6SonjGAm12f922Z0dfohXRowIYA26by+4QdmQ3piEBEub qlmOEY3MlhMvJ9eHutOWw== X-UI-Out-Filterresults: notjunk:1;V01:K0:8fJnn75jwT8=:Dh9bwcR6s+M8wq59gZpVMu 9NGPeCnsi7RyNzGr2nMBhODvUCGm7IYvMYFtV4woBRfYYbvz494oj7AxjyWScR/rChFtaUAjF JVIYGRhTwELA8B88pUAA3g/IydwNdAnC3vT+TBExzdDnc89A9Ybw4fm8Cq3P0duXWZWdeeqil J1MSm8+sIdJkrzosgIyNVZIRLhg3qSpVr6NJ4oCMw+t3gxzfhR3uGMrqL2x3x4RkpjQC55/Iy sE251fi3gbDfq1FPJ61L2HWudo2b3GyhREVpx3WgrIdY3pou+9okSrMh0UY3eViAUHjhYrB86 WG83WdHSZAx+QW1c5W7Q8YKVUP2RTTdNmfz8CCaVOI1synvp8cQ25Cui/y5IKqJkndbBzzFt+ N/ZtCUctzVNs5SNJ3MHOqCSXqnE0pAp/ZNJuifJilUK1uAUsSDbBROY0nUyUsnkBdSxehbQnL cOERp85IBVpWWkeq2eoT9yeuntEhG46QEbjvmR92fj9KAmYN5+InQ81IRY6RVRXBFIzxFTVCm 6BJk7i21VsvxSmmZpSu2n4/tu7OtYdu+OUMrqBWEbjwf2++GWut4awaPlniQhvY+iXHpKCh18 iElB+DZYvoj0WIOqtv0zcTAvi83UhkcxiyPvZyhZ6UoA1ZJ9/sBqrfsBunxo92Uv7blrOvn7B jh96wQh7LA3GGGlpmWvinHiSxr5+rbBswA8AoXLmh2RTgKITwfP6SlJkhBtcZshKpSpyzBEj3 ijRxp8gRlQ0UW2FF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 30 September 2016, Baoyou Xie wrote: > We get 3 warnings when building kernel with W=1: > drivers/net/ethernet/qlogic/qed/qed_cxt.c:1941:1: warning: no previous prototype for 'qed_cxt_dynamic_ilt_alloc' [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qed/qed_cxt.c:2158:5: warning: no previous prototype for 'qed_cxt_free_proto_ilt' [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qed/qed_cxt.c:2186:5: warning: no previous prototype for 'qed_cxt_get_task_ctx' [-Wmissing-prototypes] > > In fact, these functions are unused in > drivers/net/ethernet/qlogic/qed/qed_cxt.c, but should be removed. > > So this patch removes these unused functions. > > Signed-off-by: Baoyou Xie These were only recently added in dbb799c39717 ("qed: Initialize hardware for new protocols"), so it's likely that the plan is to use them in the future, and your commit message should at least mention that. If there is no longer a plan to use them, it would probably better to back out that whole patch, other alternatives in this case might be to mark them as "static __maybe_unused" so the compiler can drop the code silently, or to add declarations in a header if the user would be in another file. Arnd