* [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter @ 2022-11-14 18:50 Tanjuate Brunostar 2022-11-14 20:16 ` Philipp Hortmann 2022-11-17 18:46 ` Greg KH 0 siblings, 2 replies; 4+ messages in thread From: Tanjuate Brunostar @ 2022-11-14 18:50 UTC (permalink / raw) To: gregkh; +Cc: linux-staging, linux-kernel, outreachy Remove the use of Hungarian notation, which is not used in the Linux kernel. Reported by checkpatch Add indentation to the affected function to follow the Linux kernel coding style. This improves code visibility Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> --- v2: removed unnecessary function prototype drivers/staging/vt6655/rxtx.c | 44 +++++++++++------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 715b323cd2a8..341e23054817 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -10,7 +10,7 @@ * Date: May 20, 2003 * * Functions: - * s_vGenerateTxParameter - Generate tx dma required parameter. + * generate_tx_parameter - Generate tx dma required parameter. * vGenerateMACHeader - Translate 802.3 to 802.11 header * cbGetFragCount - Calculate fragment number count * csBeacon_xmit - beacon tx function @@ -85,18 +85,6 @@ static const unsigned short fb_opt1[2][5] = { #define DATADUR_A_F1 13 /*--------------------- Static Functions --------------------------*/ -static void s_vGenerateTxParameter(struct vnt_private *pDevice, - unsigned char byPktType, - struct vnt_tx_fifo_head *, - void *pvRrvTime, - void *pvRTS, - void *pvCTS, - unsigned int cbFrameSize, - bool bNeedACK, - unsigned int uDMAIdx, - void *psEthHeader, - unsigned short wCurrentRate); - static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, unsigned char *pbyTxBufferAddr, @@ -854,21 +842,17 @@ s_vFillCTSHead( - * unsigned int cbFrameSize, Hdr+Payload+FCS */ -static -void -s_vGenerateTxParameter( - struct vnt_private *pDevice, - unsigned char byPktType, - struct vnt_tx_fifo_head *tx_buffer_head, - void *pvRrvTime, - void *pvRTS, - void *pvCTS, - unsigned int cbFrameSize, - bool bNeedACK, - unsigned int uDMAIdx, - void *psEthHeader, - unsigned short wCurrentRate -) +static void generate_tx_parameter(struct vnt_private *pDevice, + unsigned char byPktType, + struct vnt_tx_fifo_head *tx_buffer_head, + void *pvRrvTime, + void *pvRTS, + void *pvCTS, + unsigned int cbFrameSize, + bool bNeedACK, + unsigned int uDMAIdx, + void *psEthHeader, + unsigned short wCurrentRate) { u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); bool bDisCRC = false; @@ -1097,8 +1081,8 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize)); /* Fill FIFO,RrvTime,RTS,and CTS */ - s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, - cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); + generate_tx_parameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, + cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); /* Fill DataHead */ uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll); -- 2.34.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter 2022-11-14 18:50 [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter Tanjuate Brunostar @ 2022-11-14 20:16 ` Philipp Hortmann 2022-11-16 19:12 ` Philipp Hortmann 2022-11-17 18:46 ` Greg KH 1 sibling, 1 reply; 4+ messages in thread From: Philipp Hortmann @ 2022-11-14 20:16 UTC (permalink / raw) To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy On 11/14/22 19:50, Tanjuate Brunostar wrote: > Remove the use of Hungarian notation, which is not used in the Linux > kernel. Reported by checkpatch > Add indentation to the affected function to follow the Linux kernel > coding style. This improves code visibility > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> > --- > > v2: removed unnecessary function prototype > > drivers/staging/vt6655/rxtx.c | 44 +++++++++++------------------------ > 1 file changed, 14 insertions(+), 30 deletions(-) > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > index 715b323cd2a8..341e23054817 100644 > --- a/drivers/staging/vt6655/rxtx.c > +++ b/drivers/staging/vt6655/rxtx.c > @@ -10,7 +10,7 @@ > * Date: May 20, 2003 > * > * Functions: > - * s_vGenerateTxParameter - Generate tx dma required parameter. > + * generate_tx_parameter - Generate tx dma required parameter. > * vGenerateMACHeader - Translate 802.3 to 802.11 header > * cbGetFragCount - Calculate fragment number count > * csBeacon_xmit - beacon tx function > @@ -85,18 +85,6 @@ static const unsigned short fb_opt1[2][5] = { > #define DATADUR_A_F1 13 > > /*--------------------- Static Functions --------------------------*/ > -static void s_vGenerateTxParameter(struct vnt_private *pDevice, > - unsigned char byPktType, > - struct vnt_tx_fifo_head *, > - void *pvRrvTime, > - void *pvRTS, > - void *pvCTS, > - unsigned int cbFrameSize, > - bool bNeedACK, > - unsigned int uDMAIdx, > - void *psEthHeader, > - unsigned short wCurrentRate); > - > static unsigned int > s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, > unsigned char *pbyTxBufferAddr, > @@ -854,21 +842,17 @@ s_vFillCTSHead( > - > * unsigned int cbFrameSize, Hdr+Payload+FCS > */ > -static > -void > -s_vGenerateTxParameter( > - struct vnt_private *pDevice, > - unsigned char byPktType, > - struct vnt_tx_fifo_head *tx_buffer_head, > - void *pvRrvTime, > - void *pvRTS, > - void *pvCTS, > - unsigned int cbFrameSize, > - bool bNeedACK, > - unsigned int uDMAIdx, > - void *psEthHeader, > - unsigned short wCurrentRate > -) > +static void generate_tx_parameter(struct vnt_private *pDevice, > + unsigned char byPktType, > + struct vnt_tx_fifo_head *tx_buffer_head, > + void *pvRrvTime, > + void *pvRTS, > + void *pvCTS, > + unsigned int cbFrameSize, > + bool bNeedACK, > + unsigned int uDMAIdx, > + void *psEthHeader, > + unsigned short wCurrentRate) > { > u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); > bool bDisCRC = false; > @@ -1097,8 +1081,8 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, > memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize)); > > /* Fill FIFO,RrvTime,RTS,and CTS */ > - s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, > - cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); > + generate_tx_parameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, > + cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); > /* Fill DataHead */ > uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, > 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll); I cannot apply your patch. Bye Philipp ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter 2022-11-14 20:16 ` Philipp Hortmann @ 2022-11-16 19:12 ` Philipp Hortmann 0 siblings, 0 replies; 4+ messages in thread From: Philipp Hortmann @ 2022-11-16 19:12 UTC (permalink / raw) To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy On 11/14/22 21:16, Philipp Hortmann wrote: > On 11/14/22 19:50, Tanjuate Brunostar wrote: >> Remove the use of Hungarian notation, which is not used in the Linux >> kernel. Reported by checkpatch >> Add indentation to the affected function to follow the Linux kernel >> coding style. This improves code visibility >> >> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> >> --- >> >> v2: removed unnecessary function prototype >> >> drivers/staging/vt6655/rxtx.c | 44 +++++++++++------------------------ >> 1 file changed, 14 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/staging/vt6655/rxtx.c >> b/drivers/staging/vt6655/rxtx.c >> index 715b323cd2a8..341e23054817 100644 >> --- a/drivers/staging/vt6655/rxtx.c >> +++ b/drivers/staging/vt6655/rxtx.c >> @@ -10,7 +10,7 @@ >> * Date: May 20, 2003 >> * >> * Functions: >> - * s_vGenerateTxParameter - Generate tx dma required parameter. >> + * generate_tx_parameter - Generate tx dma required parameter. >> * vGenerateMACHeader - Translate 802.3 to 802.11 header >> * cbGetFragCount - Calculate fragment number count >> * csBeacon_xmit - beacon tx function >> @@ -85,18 +85,6 @@ static const unsigned short fb_opt1[2][5] = { >> #define DATADUR_A_F1 13 >> /*--------------------- Static Functions --------------------------*/ >> -static void s_vGenerateTxParameter(struct vnt_private *pDevice, >> - unsigned char byPktType, >> - struct vnt_tx_fifo_head *, >> - void *pvRrvTime, >> - void *pvRTS, >> - void *pvCTS, >> - unsigned int cbFrameSize, >> - bool bNeedACK, >> - unsigned int uDMAIdx, >> - void *psEthHeader, >> - unsigned short wCurrentRate); >> - >> static unsigned int >> s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, >> unsigned char *pbyTxBufferAddr, >> @@ -854,21 +842,17 @@ s_vFillCTSHead( >> - >> * unsigned int cbFrameSize, Hdr+Payload+FCS >> */ >> -static >> -void >> -s_vGenerateTxParameter( >> - struct vnt_private *pDevice, >> - unsigned char byPktType, >> - struct vnt_tx_fifo_head *tx_buffer_head, >> - void *pvRrvTime, >> - void *pvRTS, >> - void *pvCTS, >> - unsigned int cbFrameSize, >> - bool bNeedACK, >> - unsigned int uDMAIdx, >> - void *psEthHeader, >> - unsigned short wCurrentRate >> -) >> +static void generate_tx_parameter(struct vnt_private *pDevice, >> + unsigned char byPktType, >> + struct vnt_tx_fifo_head *tx_buffer_head, >> + void *pvRrvTime, >> + void *pvRTS, >> + void *pvCTS, >> + unsigned int cbFrameSize, >> + bool bNeedACK, >> + unsigned int uDMAIdx, >> + void *psEthHeader, >> + unsigned short wCurrentRate) >> { >> u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl); >> bool bDisCRC = false; >> @@ -1097,8 +1081,8 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, >> unsigned char byPktType, >> memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, >> (cbHeaderLength - wTxBufSize)); >> /* Fill FIFO,RrvTime,RTS,and CTS */ >> - s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, >> pvRrvTime, pvRTS, pvCTS, >> - cbFrameSize, bNeedACK, uDMAIdx, hdr, >> pDevice->wCurrentRate); >> + generate_tx_parameter(pDevice, byPktType, tx_buffer_head, >> pvRrvTime, pvRTS, pvCTS, >> + cbFrameSize, bNeedACK, uDMAIdx, hdr, >> pDevice->wCurrentRate); >> /* Fill DataHead */ >> uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, >> cbFrameSize, uDMAIdx, bNeedACK, >> 0, 0, uMACfragNum, byFBOption, >> pDevice->wCurrentRate, is_pspoll); > > I cannot apply your patch. > > Bye Philipp Hi kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git apply --reject --ignore-space-change --ignore-whitespace ~/Downloads/20221114-\[PATCH\ v2\]\ staging_\ vt6655_\ change\ the\ function\ name\ s_vGenerateTxParameter-5399.txt Checking patch drivers/staging/vt6655/rxtx.c... error: while searching for: #define DATADUR_A_F1 13 /*--------------------- Static Functions --------------------------*/ static void s_vGenerateTxParameter(struct vnt_private *pDevice, unsigned char byPktType, struct vnt_tx_fifo_head *, void *pvRrvTime, void *pvRTS, void *pvCTS, unsigned int cbFrameSize, bool bNeedACK, unsigned int uDMAIdx, void *psEthHeader, unsigned short wCurrentRate); static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, unsigned char *pbyTxBufferAddr, error: patch failed: drivers/staging/vt6655/rxtx.c:85 Hunk #3 succeeded at 880 (offset 38 lines). Hunk #4 succeeded at 1119 (offset 38 lines). Applying patch drivers/staging/vt6655/rxtx.c with 1 reject... Hunk #1 applied cleanly. Rejected hunk #2. Hunk #3 applied cleanly. Hunk #4 applied cleanly. Bye Philipp ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter 2022-11-14 18:50 [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter Tanjuate Brunostar 2022-11-14 20:16 ` Philipp Hortmann @ 2022-11-17 18:46 ` Greg KH 1 sibling, 0 replies; 4+ messages in thread From: Greg KH @ 2022-11-17 18:46 UTC (permalink / raw) To: Tanjuate Brunostar; +Cc: linux-staging, linux-kernel, outreachy On Mon, Nov 14, 2022 at 06:50:34PM +0000, Tanjuate Brunostar wrote: > Remove the use of Hungarian notation, which is not used in the Linux > kernel. Reported by checkpatch > Add indentation to the affected function to follow the Linux kernel > coding style. This improves code visibility > > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> > --- > > v2: removed unnecessary function prototype > Does not apply to my tree: checking file drivers/staging/vt6655/rxtx.c Hunk #2 FAILED at 85. Hunk #3 succeeded at 880 (offset 26 lines). Hunk #4 succeeded at 1119 (offset 26 lines). 1 out of 4 hunks FAILED ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-17 18:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-14 18:50 [PATCH v2] staging: vt6655: change the function name s_vGenerateTxParameter Tanjuate Brunostar 2022-11-14 20:16 ` Philipp Hortmann 2022-11-16 19:12 ` Philipp Hortmann 2022-11-17 18:46 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox