* [Patch v2 1/3] Staging: vt6655: Remove CARDbSoftwareReset definition.
2020-03-31 5:16 [Patch v2 0/3] staging: vt6655: Remove functions that are never Briana Oursler
@ 2020-03-31 5:16 ` Briana Oursler
2020-03-31 5:16 ` [Patch v2 2/3] Staging: vt6655: Remove CARDvSetLoopbackMode definition Briana Oursler
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Briana Oursler @ 2020-03-31 5:16 UTC (permalink / raw)
To: julia.lawall, sbrivio, gregkh, forest, outreachy-kernel; +Cc: Briana Oursler
Remove function CARDbSoftwareReset that is never called, along with
comments related to it.
Signed-off-by: Briana Oursler <briana.oursler@gmail.com>
---
Changes in v2:
- Update patch description to be more clear, changes suggested
by Julia Lawall and issue found by Stefano Brivio.
- Remove extra newline that was introduced after function call,
change recommended by Stefano Brivio.
drivers/staging/vt6655/card.c | 21 ---------------------
drivers/staging/vt6655/card.h | 1 -
2 files changed, 22 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index e65c9825ea5a..52af85fe538d 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -12,7 +12,6 @@
* CARDbAddBasicRate - Add to BasicRateSet
* CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet
* CARDvSetLoopbackMode - Set Loopback mode
- * CARDbSoftwareReset - Sortware reset NIC
* CARDqGetTSFOffset - Calculate TSFOffset
* CARDbGetCurrentTSF - Read Current NIC TSF counter
* CARDqGetNextTBTT - Calculate Next Beacon TSF counter
@@ -843,26 +842,6 @@ void CARDvSetLoopbackMode(struct vnt_private *priv,
/* set Baseband loopback */
}
-/*
- * Description: Software Reset NIC
- *
- * Parameters:
- * In:
- * priv - The adapter to be reset
- * Out:
- * none
- *
- * Return Value: none
- */
-bool CARDbSoftwareReset(struct vnt_private *priv)
-{
- /* reset MAC */
- if (!MACbSafeSoftwareReset(priv))
- return false;
-
- return true;
-}
-
/*
* Description: Calculate TSF offset of two TSF input
* Get TSF Offset from RxBCN's TSF and local TSF
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 337266add6b2..a811ac8942a0 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -46,7 +46,6 @@ void CARDvUpdateBasicTopRate(struct vnt_private *priv);
bool CARDbIsOFDMinBasicRate(struct vnt_private *priv);
void CARDvSetLoopbackMode(struct vnt_private *priv,
unsigned short wLoopbackMode);
-bool CARDbSoftwareReset(struct vnt_private *priv);
void CARDvSetFirstNextTBTT(struct vnt_private *priv,
unsigned short wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF,
--
2.24.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Patch v2 2/3] Staging: vt6655: Remove CARDvSetLoopbackMode definition.
2020-03-31 5:16 [Patch v2 0/3] staging: vt6655: Remove functions that are never Briana Oursler
2020-03-31 5:16 ` [Patch v2 1/3] Staging: vt6655: Remove CARDbSoftwareReset definition Briana Oursler
@ 2020-03-31 5:16 ` Briana Oursler
2020-03-31 5:16 ` [Patch v2 3/3] Staging: vt6655: Remove CARDbRadioPowerOn definition Briana Oursler
2020-03-31 19:09 ` [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never Stefano Brivio
3 siblings, 0 replies; 9+ messages in thread
From: Briana Oursler @ 2020-03-31 5:16 UTC (permalink / raw)
To: julia.lawall, sbrivio, gregkh, forest, outreachy-kernel; +Cc: Briana Oursler
Remove function CARDvSetLoopbackMode that is never called, along with
comments related to it.
Signed-off-by: Briana Oursler <briana.oursler@gmail.com>
---
Changes in v2:
- Update commit description as recommended by Julia Lawall,
issue found by Stefano Brivio.
drivers/staging/vt6655/card.c | 29 -----------------------------
drivers/staging/vt6655/card.h | 2 --
2 files changed, 31 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 52af85fe538d..222b6ef61d9c 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -11,7 +11,6 @@
* CARDvUpdateBasicTopRate - Update BasicTopRate
* CARDbAddBasicRate - Add to BasicRateSet
* CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet
- * CARDvSetLoopbackMode - Set Loopback mode
* CARDqGetTSFOffset - Calculate TSFOffset
* CARDbGetCurrentTSF - Read Current NIC TSF counter
* CARDqGetNextTBTT - Calculate Next Beacon TSF counter
@@ -814,34 +813,6 @@ unsigned char CARDbyGetPktType(struct vnt_private *priv)
return PK_TYPE_11GB;
}
-/*
- * Description: Set NIC Loopback mode
- *
- * Parameters:
- * In:
- * priv - The adapter to be set
- * wLoopbackMode - Loopback mode to be set
- * Out:
- * none
- *
- * Return Value: none
- */
-void CARDvSetLoopbackMode(struct vnt_private *priv,
- unsigned short wLoopbackMode)
-{
- switch (wLoopbackMode) {
- case CARD_LB_NONE:
- case CARD_LB_MAC:
- case CARD_LB_PHY:
- break;
- default:
- break;
- }
- /* set MAC loopback */
- MACvSetLoopbackMode(priv, LOBYTE(wLoopbackMode));
- /* set Baseband loopback */
-}
-
/*
* Description: Calculate TSF offset of two TSF input
* Get TSF Offset from RxBCN's TSF and local TSF
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index a811ac8942a0..32405027e269 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -44,8 +44,6 @@ struct vnt_private;
void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type);
void CARDvUpdateBasicTopRate(struct vnt_private *priv);
bool CARDbIsOFDMinBasicRate(struct vnt_private *priv);
-void CARDvSetLoopbackMode(struct vnt_private *priv,
- unsigned short wLoopbackMode);
void CARDvSetFirstNextTBTT(struct vnt_private *priv,
unsigned short wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF,
--
2.24.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Patch v2 3/3] Staging: vt6655: Remove CARDbRadioPowerOn definition.
2020-03-31 5:16 [Patch v2 0/3] staging: vt6655: Remove functions that are never Briana Oursler
2020-03-31 5:16 ` [Patch v2 1/3] Staging: vt6655: Remove CARDbSoftwareReset definition Briana Oursler
2020-03-31 5:16 ` [Patch v2 2/3] Staging: vt6655: Remove CARDvSetLoopbackMode definition Briana Oursler
@ 2020-03-31 5:16 ` Briana Oursler
2020-03-31 19:09 ` [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never Stefano Brivio
3 siblings, 0 replies; 9+ messages in thread
From: Briana Oursler @ 2020-03-31 5:16 UTC (permalink / raw)
To: julia.lawall, sbrivio, gregkh, forest, outreachy-kernel; +Cc: Briana Oursler
Remove function CARDbRadioPowerOn that is never called, along with
comments related to it.
Signed-off-by: Briana Oursler <briana.oursler@gmail.com>
---
Changes in v2:
- Update commit description to be more clear, as recommended by
Stefano Brivio and Julia Lawall.
drivers/staging/vt6655/card.c | 55 -----------------------------------
drivers/staging/vt6655/card.h | 1 -
2 files changed, 56 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 222b6ef61d9c..67b23ab0b0d1 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -17,7 +17,6 @@
* CARDvSetFirstNextTBTT - Set NIC Beacon time
* CARDvUpdateNextTBTT - Sync. NIC Beacon time
* CARDbRadioPowerOff - Turn Off NIC Radio Power
- * CARDbRadioPowerOn - Turn On NIC Radio Power
*
* Revision History:
* 06-10-2003 Bryan YC Fan: Re-write codes to support VT3253 spec.
@@ -437,60 +436,6 @@ void CARDbRadioPowerOff(struct vnt_private *priv)
LED_ACTSET); /* LED issue */
}
-/*
- * Description: Turn on Radio power
- *
- * Parameters:
- * In:
- * priv - The adapter to be turned on
- * Out:
- * none
- *
- * Return Value: true if success; otherwise false
- */
-bool CARDbRadioPowerOn(struct vnt_private *priv)
-{
- bool bResult = true;
-
- pr_debug("chester power on\n");
- if (priv->bRadioControlOff) {
- if (priv->bHWRadioOff)
- pr_debug("chester bHWRadioOff\n");
- if (priv->bRadioControlOff)
- pr_debug("chester bRadioControlOff\n");
- return false; }
-
- if (!priv->bRadioOff) {
- pr_debug("chester pbRadioOff\n");
- return true; }
-
- BBvExitDeepSleep(priv, priv->byLocalID);
-
- MACvRegBitsOn(priv->PortOffset, MAC_REG_HOSTCR, HOSTCR_RXON);
-
- switch (priv->byRFType) {
- case RF_RFMD2959:
- MACvWordRegBitsOn(priv->PortOffset, MAC_REG_SOFTPWRCTL,
- SOFTPWRCTL_TXPEINV);
- MACvWordRegBitsOff(priv->PortOffset, MAC_REG_SOFTPWRCTL,
- SOFTPWRCTL_SWPE1);
- break;
-
- case RF_AIROHA:
- case RF_AL2230S:
- case RF_AIROHA7230:
- MACvWordRegBitsOn(priv->PortOffset, MAC_REG_SOFTPWRCTL,
- (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
- break;
- }
-
- priv->bRadioOff = false;
- pr_debug("chester power on\n");
- MACvRegBitsOff(priv->PortOffset, MAC_REG_GPIOCTL0,
- LED_ACTSET); /* LED issue */
- return bResult;
-}
-
void CARDvSafeResetTx(struct vnt_private *priv)
{
unsigned int uu;
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 32405027e269..568a2ddd6588 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -55,7 +55,6 @@ unsigned char CARDbyGetPktType(struct vnt_private *priv);
void CARDvSafeResetTx(struct vnt_private *priv);
void CARDvSafeResetRx(struct vnt_private *priv);
void CARDbRadioPowerOff(struct vnt_private *priv);
-bool CARDbRadioPowerOn(struct vnt_private *priv);
bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type);
bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
u64 qwBSSTimestamp);
--
2.24.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
2020-03-31 5:16 [Patch v2 0/3] staging: vt6655: Remove functions that are never Briana Oursler
` (2 preceding siblings ...)
2020-03-31 5:16 ` [Patch v2 3/3] Staging: vt6655: Remove CARDbRadioPowerOn definition Briana Oursler
@ 2020-03-31 19:09 ` Stefano Brivio
2020-03-31 19:42 ` Briana Oursler
3 siblings, 1 reply; 9+ messages in thread
From: Stefano Brivio @ 2020-03-31 19:09 UTC (permalink / raw)
To: Briana Oursler; +Cc: julia.lawall, gregkh, forest, outreachy-kernel
> Subject: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
never...? :)
On Mon, 30 Mar 2020 22:16:37 -0700
Briana Oursler <briana.oursler@gmail.com> wrote:
> This patchset removes functions that are not called in the driver but
> are prototyped in card.h. Each commit limits its scope to one function
> definition and related documentation in code. References in the
> developer's initial changelog were left in place.
What do you mean by this? Which references?
--
Stefano
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
2020-03-31 19:09 ` [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never Stefano Brivio
@ 2020-03-31 19:42 ` Briana Oursler
2020-03-31 20:04 ` Julia Lawall
0 siblings, 1 reply; 9+ messages in thread
From: Briana Oursler @ 2020-03-31 19:42 UTC (permalink / raw)
To: Stefano Brivio; +Cc: julia.lawall, gregkh, forest, outreachy-kernel
On Tue, 2020-03-31 at 21:09 +0200, Stefano Brivio wrote:
> > Subject: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove
> > functions that are never
>
> never...? :)
>
It looks like my subject got cut off. Is it okay to just call it 'dead
code' in the subject of my revision? As in: staging: vt6655: Remove
dead code, leaving all the rest as is (outside of changes from other
feedback I may receive).
> On Mon, 30 Mar 2020 22:16:37 -0700
> Briana Oursler <briana.oursler@gmail.com> wrote:
>
> > This patchset removes functions that are not called in the driver
> > but
> > are prototyped in card.h. Each commit limits its scope to one
> > function
> > definition and related documentation in code. References in the
> > developer's initial changelog were left in place.
>
> What do you mean by this? Which references?
>
Apologies, that is a mistake. Their changelog does reference a deleted
function elsewhere in the driver, but not in this file nor in the scope
of this patch series. I confused myself there, sorry for that. I'll
remove that reference from the cover letter.
Thanks,
Briana
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
2020-03-31 19:42 ` Briana Oursler
@ 2020-03-31 20:04 ` Julia Lawall
2020-03-31 20:09 ` Briana Oursler
0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2020-03-31 20:04 UTC (permalink / raw)
To: Briana Oursler; +Cc: Stefano Brivio, gregkh, forest, outreachy-kernel
On Tue, 31 Mar 2020, Briana Oursler wrote:
> On Tue, 2020-03-31 at 21:09 +0200, Stefano Brivio wrote:
> > > Subject: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove
> > > functions that are never
> >
> > never...? :)
> >
> It looks like my subject got cut off. Is it okay to just call it 'dead
> code' in the subject of my revision? As in: staging: vt6655: Remove
> dead code, leaving all the rest as is (outside of changes from other
> feedback I may receive).
To me, dead code is a branch that is never executed. I think that saying
that the function is never called in the kernel would be clearer.
julia
>
> > On Mon, 30 Mar 2020 22:16:37 -0700
> > Briana Oursler <briana.oursler@gmail.com> wrote:
> >
> > > This patchset removes functions that are not called in the driver
> > > but
> > > are prototyped in card.h. Each commit limits its scope to one
> > > function
> > > definition and related documentation in code. References in the
> > > developer's initial changelog were left in place.
> >
> > What do you mean by this? Which references?
> >
> Apologies, that is a mistake. Their changelog does reference a deleted
> function elsewhere in the driver, but not in this file nor in the scope
> of this patch series. I confused myself there, sorry for that. I'll
> remove that reference from the cover letter.
>
> Thanks,
>
> Briana
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/e78323c6c6a7429ad084149b66a4cd025b9dbb15.camel%40gmail.com.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
2020-03-31 20:04 ` Julia Lawall
@ 2020-03-31 20:09 ` Briana Oursler
2020-03-31 20:22 ` Julia Lawall
0 siblings, 1 reply; 9+ messages in thread
From: Briana Oursler @ 2020-03-31 20:09 UTC (permalink / raw)
To: Julia Lawall; +Cc: Stefano Brivio, gregkh, forest, outreachy-kernel
On Tue, 2020-03-31 at 22:04 +0200, Julia Lawall wrote:
>
> On Tue, 31 Mar 2020, Briana Oursler wrote:
>
> > On Tue, 2020-03-31 at 21:09 +0200, Stefano Brivio wrote:
> > > > Subject: [Outreachy kernel] [Patch v2 0/3] staging: vt6655:
> > > > Remove
> > > > functions that are never
> > >
> > > never...? :)
> > >
> > It looks like my subject got cut off. Is it okay to just call it
> > 'dead
> > code' in the subject of my revision? As in: staging: vt6655: Remove
> > dead code, leaving all the rest as is (outside of changes from
> > other
> > feedback I may receive).
>
> To me, dead code is a branch that is never executed. I think that
> saying
> that the function is never called in the kernel would be clearer.
>
> julia
Okay, in that case I will leave the title as it was originally
intended. I'll send it as soon as I can determine how to stop the title
from cutting off.
Thanks,
Briana
> > > On Mon, 30 Mar 2020 22:16:37 -0700
> > > Briana Oursler <briana.oursler@gmail.com> wrote:
> > >
> > > > This patchset removes functions that are not called in the
> > > > driver
> > > > but
> > > > are prototyped in card.h. Each commit limits its scope to one
> > > > function
> > > > definition and related documentation in code. References in the
> > > > developer's initial changelog were left in place.
> > >
> > > What do you mean by this? Which references?
> > >
> > Apologies, that is a mistake. Their changelog does reference a
> > deleted
> > function elsewhere in the driver, but not in this file nor in the
> > scope
> > of this patch series. I confused myself there, sorry for that. I'll
> > remove that reference from the cover letter.
> >
> > Thanks,
> >
> > Briana
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/outreachy-kernel/e78323c6c6a7429ad084149b66a4cd025b9dbb15.camel%40gmail.com
> > .
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [Patch v2 0/3] staging: vt6655: Remove functions that are never
2020-03-31 20:09 ` Briana Oursler
@ 2020-03-31 20:22 ` Julia Lawall
0 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2020-03-31 20:22 UTC (permalink / raw)
To: Briana Oursler
Cc: Julia Lawall, Stefano Brivio, gregkh, forest, outreachy-kernel
On Tue, 31 Mar 2020, Briana Oursler wrote:
> On Tue, 2020-03-31 at 22:04 +0200, Julia Lawall wrote:
> >
> > On Tue, 31 Mar 2020, Briana Oursler wrote:
> >
> > > On Tue, 2020-03-31 at 21:09 +0200, Stefano Brivio wrote:
> > > > > Subject: [Outreachy kernel] [Patch v2 0/3] staging: vt6655:
> > > > > Remove
> > > > > functions that are never
> > > >
> > > > never...? :)
> > > >
> > > It looks like my subject got cut off. Is it okay to just call it
> > > 'dead
> > > code' in the subject of my revision? As in: staging: vt6655: Remove
> > > dead code, leaving all the rest as is (outside of changes from
> > > other
> > > feedback I may receive).
> >
> > To me, dead code is a branch that is never executed. I think that
> > saying
> > that the function is never called in the kernel would be clearer.
> >
> > julia
>
> Okay, in that case I will leave the title as it was originally
> intended. I'll send it as soon as I can determine how to stop the title
> from cutting off.
Maybe remove dead functions would be ok.
julia
>
> Thanks,
>
> Briana
>
> > > > On Mon, 30 Mar 2020 22:16:37 -0700
> > > > Briana Oursler <briana.oursler@gmail.com> wrote:
> > > >
> > > > > This patchset removes functions that are not called in the
> > > > > driver
> > > > > but
> > > > > are prototyped in card.h. Each commit limits its scope to one
> > > > > function
> > > > > definition and related documentation in code. References in the
> > > > > developer's initial changelog were left in place.
> > > >
> > > > What do you mean by this? Which references?
> > > >
> > > Apologies, that is a mistake. Their changelog does reference a
> > > deleted
> > > function elsewhere in the driver, but not in this file nor in the
> > > scope
> > > of this patch series. I confused myself there, sorry for that. I'll
> > > remove that reference from the cover letter.
> > >
> > > Thanks,
> > >
> > > Briana
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from it,
> > > send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> > > https://groups.google.com/d/msgid/outreachy-kernel/e78323c6c6a7429ad084149b66a4cd025b9dbb15.camel%40gmail.com
> > > .
> > >
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread