From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH] stmmac: fix sparse warnings Date: Wed, 05 Nov 2014 11:03:46 +0200 Message-ID: <1415178226.472.9.camel@linux.intel.com> References: <1415035734-24163-1-git-send-email-andriy.shevchenko@linux.intel.com> <54590045.3050305@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Kweh Hock Leong , "David S . Miller" , Vince Bridgers To: Giuseppe CAVALLARO Return-path: Received: from mga11.intel.com ([192.55.52.93]:56863 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbaKEJDr (ORCPT ); Wed, 5 Nov 2014 04:03:47 -0500 In-Reply-To: <54590045.3050305@st.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2014-11-04 at 17:35 +0100, Giuseppe CAVALLARO wrote: > On 11/3/2014 6:28 PM, Andy Shevchenko wrote: > > This patch fixes the following sparse warnings. > > > > drivers/net/ethernet/stmicro/stmmac/enh_desc.c:381:30: warning: symbol 'enh_desc_ops' was not declared. Should it be static? > > drivers/net/ethernet/stmicro/stmmac/norm_desc.c:253:30: warning: symbol 'ndesc_ops' was not declared. Should it be static? > > drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c:141:33: warning: symbol 'stmmac_ptp' was not declared. Should it be static? > > > > There is no functional change. > > Hello Andy > > I have never seen this kind of warnings. I prefer to not include the > stmmac.h in enh_desc.c and norm_desc.c but eventually to move the > following from stmmac.h to common.h: > extern const struct stmmac_desc_ops enh_desc_ops; > extern const struct stmmac_desc_ops ndesc_ops; > what do you think? If it would work I do this way certainly. Thanks for the tip. Will check soon and resubmit new version. > > peppe > > > > > > Signed-off-by: Andy Shevchenko > > --- > > drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 2 ++ > > drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 2 ++ > > drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2 ++ > > 3 files changed, 6 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c > > index 1e2bcf5..ddd4272 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c > > @@ -23,8 +23,10 @@ > > *******************************************************************************/ > > > > #include > > + > > #include "common.h" > > #include "descs_com.h" > > +#include "stmmac.h" > > > > static int enh_desc_get_tx_status(void *data, struct stmmac_extra_stats *x, > > struct dma_desc *p, void __iomem *ioaddr) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c > > index 35ad4f4..46b882c 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c > > @@ -23,8 +23,10 @@ > > *******************************************************************************/ > > > > #include > > + > > #include "common.h" > > #include "descs_com.h" > > +#include "stmmac.h" > > > > static int ndesc_get_tx_status(void *data, struct stmmac_extra_stats *x, > > struct dma_desc *p, void __iomem *ioaddr) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c > > index 76ad214..88e0da3 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c > > @@ -25,8 +25,10 @@ > > > > #include > > #include > > + > > #include "common.h" > > #include "stmmac_ptp.h" > > +#include "stmmac.h" > > > > static void stmmac_config_hw_tstamping(void __iomem *ioaddr, u32 data) > > { > > > -- Andy Shevchenko Intel Finland Oy