Message ID | 1382648424-23743-1-git-send-email-ebru.akagunduz@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Ebru Akagunduz <ebru.akagunduz@gmail.com> writes: > This patch fixes the Sparse Warning "symbol was > not declared. Should it be static?" in dpc.c > > Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> But that's not all it does... > --- > drivers/staging/vt6656/dpc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c > index 75dc92d..16ffe89 100644 > --- a/drivers/staging/vt6656/dpc.c > +++ b/drivers/staging/vt6656/dpc.c > @@ -59,7 +59,7 @@ > //static int msglevel =MSG_LEVEL_DEBUG; > static int msglevel =MSG_LEVEL_INFO; > > -const u8 acbyRxRate[MAX_RATE] = > +static const u8 acbyRxRate[MAX_RATE] = > {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108}; > > static u8 s_byGetRateIdx(u8 byRate); > @@ -246,7 +246,7 @@ s_vGetDASA ( > *pcbHeaderSize = cbHeaderSize; > } > > -int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB, > +static int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB, > unsigned long BytesToIndicate) > { > struct net_device_stats *pStats = &pDevice->stats; > -- And this one is wrong. Cheers, Rusty.
> > -int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb > *pRCB, > > +static int RXbBulkInProcessData(struct vnt_private *pDevice, struct > vnt_rcb *pRCB, > > unsigned long BytesToIndicate) > > { > > struct net_device_stats *pStats = &pDevice->stats; > > -- > > And this one is wrong. > > I couldn't understand. Why this patch is wrong? How should I fix it? Thanks.
Ebru Akagunduz <ebru.akagunduz@gmail.com> writes: >> > -int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb >> *pRCB, >> > +static int RXbBulkInProcessData(struct vnt_private *pDevice, struct >> vnt_rcb *pRCB, >> > unsigned long BytesToIndicate) >> > { >> > struct net_device_stats *pStats = &pDevice->stats; >> > -- >> >> And this one is wrong. >> >> > I couldn't understand. Why this patch is wrong? How should I fix it? In my tree, RXbBulkInProcessData is called in staging/drivers/staging/vt6656/usbpipe.c. So you can't make it static... Cheers, Rusty.
On Mon, Oct 28, 2013 at 01:03:55AM +0200, Ebru Akagunduz wrote: > > > -int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb > *pRCB, > > +static int RXbBulkInProcessData(struct vnt_private *pDevice, struct > vnt_rcb *pRCB, > > unsigned long BytesToIndicate) > > { > > struct net_device_stats *pStats = &pDevice->stats; > > -- > > And this one is wrong. > > > > I couldn't understand. Why this patch is wrong? How should I fix it? Without all of the context, I can't remember anymore. Remember, "kernel maintainer's brain == squirrel", we need context. greg k-h
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 75dc92d..16ffe89 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -59,7 +59,7 @@ //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; -const u8 acbyRxRate[MAX_RATE] = +static const u8 acbyRxRate[MAX_RATE] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108}; static u8 s_byGetRateIdx(u8 byRate); @@ -246,7 +246,7 @@ s_vGetDASA ( *pcbHeaderSize = cbHeaderSize; } -int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB, +static int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB, unsigned long BytesToIndicate) { struct net_device_stats *pStats = &pDevice->stats;
This patch fixes the Sparse Warning "symbol was not declared. Should it be static?" in dpc.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> --- drivers/staging/vt6656/dpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)