Skip to content

Commit b249bed

Browse files
ryaenggregkh
authored andcommitted
staging: rtl8712: fix open parentheses alignment
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Ryan England <rcengland@gmail.com> Link: https://lore.kernel.org/r/ZYSemFbzTlgLROMc@kernel.ryanengland.xyz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 93235f6 commit b249bed

7 files changed

Lines changed: 173 additions & 301 deletions

File tree

drivers/staging/rtl8712/os_intfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ struct net_device *r8712_init_netdev(void)
221221

222222
static u32 start_drv_threads(struct _adapter *padapter)
223223
{
224-
padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s",
225-
padapter->pnetdev->name);
224+
padapter->cmd_thread = kthread_run(r8712_cmd_thread, padapter, "%s", padapter->pnetdev->name);
226225
if (IS_ERR(padapter->cmd_thread))
227226
return _FAIL;
228227
return _SUCCESS;

drivers/staging/rtl8712/rtl8712_efuse.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ u16 r8712_efuse_get_current_size(struct _adapter *adapter)
213213
u8 hworden = 0;
214214
u8 efuse_data, word_cnts = 0;
215215

216-
while (bContinual && efuse_one_byte_read(adapter, efuse_addr,
217-
&efuse_data) && (efuse_addr < efuse_available_max_size)) {
216+
while (bContinual && efuse_one_byte_read(adapter, efuse_addr, &efuse_data) &&
217+
(efuse_addr < efuse_available_max_size)) {
218218
if (efuse_data != 0xFF) {
219219
hworden = efuse_data & 0x0F;
220220
word_cnts = calculate_word_cnts(hworden);
@@ -252,9 +252,8 @@ u8 r8712_efuse_pg_packet_read(struct _adapter *adapter, u8 offset, u8 *data)
252252
memset(tmpdata, 0xFF, PGPKT_DATA_SIZE);
253253
for (tmpidx = 0; tmpidx < word_cnts * 2;
254254
tmpidx++) {
255-
if (efuse_one_byte_read(adapter,
256-
efuse_addr + 1 + tmpidx,
257-
&efuse_data)) {
255+
if (efuse_one_byte_read(adapter, efuse_addr + 1 + tmpidx,
256+
&efuse_data)) {
258257
tmpdata[tmpidx] = efuse_data;
259258
} else {
260259
ret = false;

drivers/staging/rtl8712/rtl8712_recv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
267267
/*the first fragment*/
268268
if (!list_empty(&pdefrag_q->queue)) {
269269
/*free current defrag_q */
270-
r8712_free_recvframe_queue(pdefrag_q,
271-
pfree_recv_queue);
270+
r8712_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
272271
}
273272
}
274273
/* Then enqueue the 0~(n-1) fragment to the defrag_q */

drivers/staging/rtl8712/rtl8712_xmit.c

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ static u32 get_ff_hwaddr(struct xmit_frame *pxmitframe)
147147
}
148148

149149
static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
150-
struct hw_xmit *phwxmit,
151-
struct tx_servq *ptxservq,
152-
struct __queue *pframe_queue)
150+
struct hw_xmit *phwxmit, struct tx_servq *ptxservq,
151+
struct __queue *pframe_queue)
153152
{
154153
struct list_head *xmitframe_plist, *xmitframe_phead;
155154
struct xmit_frame *pxmitframe = NULL;
@@ -167,7 +166,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
167166
}
168167

169168
static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
170-
struct hw_xmit *phwxmit_i, sint entry)
169+
struct hw_xmit *phwxmit_i, sint entry)
171170
{
172171
unsigned long irqL0;
173172
struct list_head *sta_plist, *sta_phead;
@@ -197,11 +196,10 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
197196
sta_phead = &phwxmit->sta_queue->queue;
198197
sta_plist = sta_phead->next;
199198
while (!end_of_queue_search(sta_phead, sta_plist)) {
200-
ptxservq = container_of(sta_plist, struct tx_servq,
201-
tx_pending);
199+
ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
202200
pframe_queue = &ptxservq->sta_pending;
203-
pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit,
204-
ptxservq, pframe_queue);
201+
pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, ptxservq,
202+
pframe_queue);
205203
if (pxmitframe) {
206204
phwxmit->accnt--;
207205
goto exit_dequeue_xframe_ex;
@@ -221,8 +219,7 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
221219
return pxmitframe;
222220
}
223221

224-
void r8712_do_queue_select(struct _adapter *padapter,
225-
struct pkt_attrib *pattrib)
222+
void r8712_do_queue_select(struct _adapter *padapter, struct pkt_attrib *pattrib)
226223
{
227224
unsigned int qsel = 0;
228225
struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
@@ -292,14 +289,12 @@ void r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
292289
r8712_xmit_complete(padapter, pxmitframe);
293290
if (pxmitframe->attrib.ether_type != 0x0806) {
294291
if ((pxmitframe->attrib.ether_type != 0x888e) &&
295-
(pxmitframe->attrib.dhcp_pkt != 1)) {
296-
r8712_issue_addbareq_cmd(padapter,
297-
pxmitframe->attrib.priority);
292+
(pxmitframe->attrib.dhcp_pkt != 1)) {
293+
r8712_issue_addbareq_cmd(padapter, pxmitframe->attrib.priority);
298294
}
299295
}
300296
pxmitframe->last[0] = 1;
301-
update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr),
302-
pxmitframe->attrib.last_txcmdsz);
297+
update_txdesc(pxmitframe, (uint *)(pxmitframe->buf_addr), pxmitframe->attrib.last_txcmdsz);
303298
/*padding zero */
304299
last_txcmdsz = pxmitframe->attrib.last_txcmdsz;
305300
padding_sz = (8 - (last_txcmdsz % 8));
@@ -333,8 +328,7 @@ void r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
333328
pxmitbuf->aggr_nr = 1;
334329
}
335330

336-
u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf,
337-
struct xmit_frame *pxmitframe)
331+
u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf, struct xmit_frame *pxmitframe)
338332
{
339333
pxmitframe->pxmitbuf = pxmitbuf;
340334
pxmitbuf->priv_data = pxmitframe;
@@ -374,9 +368,9 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
374368
pxmitframe->bpending[0] = false;
375369
pxmitframe->mem_addr = pxmitbuf->pbuf;
376370

377-
if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) ==
378-
0) || ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) %
379-
0x40) == 0))) {
371+
if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == 0) ||
372+
((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) %
373+
0x40) == 0))) {
380374
ptxdesc->txdw0 |= cpu_to_le32
381375
(((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) &
382376
0x00ff0000);
@@ -387,8 +381,8 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
387381
0x00ff0000);
388382
/*default = 32 bytes for TX Desc*/
389383
}
390-
r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD,
391-
total_length + TXDESC_SIZE, (u8 *)pxmitframe);
384+
r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, total_length + TXDESC_SIZE,
385+
(u8 *)pxmitframe);
392386
}
393387

394388
#endif
@@ -618,14 +612,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
618612
pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
619613
/* need to remember the 1st frame */
620614
if (pxmitframe) {
621-
622615
#ifdef CONFIG_R8712_TX_AGGR
623616
/* 1. dequeue 2nd frame
624617
* 2. aggr if 2nd xframe is dequeued, else dump directly
625618
*/
626619
if (AGGR_NR_HIGH_BOUND > 1)
627-
p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits,
628-
hwentry);
620+
p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
629621
if (pxmitframe->frame_tag != DATA_FRAMETAG) {
630622
r8712_free_xmitbuf(pxmitpriv, pxmitbuf);
631623
return false;
@@ -639,16 +631,12 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
639631
if (p2ndxmitframe) {
640632
u16 total_length;
641633

642-
total_length = r8712_xmitframe_aggr_next(
643-
pxmitbuf, p2ndxmitframe);
634+
total_length = r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe);
644635
do {
645-
p2ndxmitframe = dequeue_xframe_ex(
646-
pxmitpriv, phwxmits, hwentry);
636+
p2ndxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry);
647637
if (p2ndxmitframe)
648638
total_length =
649-
r8712_xmitframe_aggr_next(
650-
pxmitbuf,
651-
p2ndxmitframe);
639+
r8712_xmitframe_aggr_next(pxmitbuf, p2ndxmitframe);
652640
else
653641
break;
654642
} while (total_length <= 0x1800 &&
@@ -662,8 +650,8 @@ int r8712_xmitframe_complete(struct _adapter *padapter,
662650
xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf);
663651
if (pxmitframe->frame_tag == DATA_FRAMETAG) {
664652
if (pxmitframe->attrib.priority <= 15)
665-
res = r8712_xmitframe_coalesce(padapter,
666-
pxmitframe->pkt, pxmitframe);
653+
res = r8712_xmitframe_coalesce(padapter, pxmitframe->pkt,
654+
pxmitframe);
667655
/* always return ndis_packet after
668656
* r8712_xmitframe_coalesce
669657
*/
@@ -714,10 +702,10 @@ static void dump_xframe(struct _adapter *padapter,
714702
ff_hwaddr = get_ff_hwaddr(pxmitframe);
715703
#ifdef CONFIG_R8712_TX_AGGR
716704
r8712_write_port(padapter, RTL8712_DMA_H2CCMD, w_sz,
717-
(unsigned char *)pxmitframe);
705+
(unsigned char *)pxmitframe);
718706
#else
719707
r8712_write_port(padapter, ff_hwaddr, w_sz,
720-
(unsigned char *)pxmitframe);
708+
(unsigned char *)pxmitframe);
721709
#endif
722710
mem_addr += w_sz;
723711
mem_addr = (u8 *)RND4(((addr_t)(mem_addr)));

0 commit comments

Comments
 (0)