From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EB35FA3741 for ; Fri, 28 Oct 2022 23:25:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbiJ1XZ5 (ORCPT ); Fri, 28 Oct 2022 19:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiJ1XZu (ORCPT ); Fri, 28 Oct 2022 19:25:50 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A6342413F8 for ; Fri, 28 Oct 2022 16:25:48 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id r12so10655891lfp.1 for ; Fri, 28 Oct 2022 16:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NydDvRv0i8mMT7jRZyJYJbYlAa1+nO5vO7eF1y80kZw=; b=E9MqjzSzPc9LhNOmhwtwSVnBeemxoUB7Thg6pwAaJZeP2e+HYMhSC5lLzAAeNG4RMq w/7Oz65qQFP5gqVGRHIiDuqPVpBkTjiX0appsBNmWUVQjJLdJl372Q2rAr724GWuCmkz LGnJiM3UNXSwtRzyaMS8Ab8CS4naCh3wubvd1r9cPMgWvvmts7qOJGiCt2cSBP0gbMsM osmx1kY56Vj5/6VW4UIHBLuFhxOA6KRi4LQpDj7LK7tFZYfdbFydq+8iFhNHDjVomNFn Kft3+64eBYN/H9bQStgfzTTmAyFaY328+xE606h4sqIBOBY1vcbTBH+1r5/T/z3VB6gs 62+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NydDvRv0i8mMT7jRZyJYJbYlAa1+nO5vO7eF1y80kZw=; b=VnViwW9NmF4AnqI5VWzUyvm49h6iGNayPaOQuWvtNpevBk9MjFu/w83i2yYWauRVcj B82fo6+SXQUPWL2mSqpVK/Jy+a4xO7kJP3xJScixlo+Tvdou+Ak6AVXic5oSj+QbBjyD 7gCal1FrVanvSy7y9sCsOTyFITiv59yqbNDUOv+wX1DostxQu1SC5Ae1KCyMzY0L6Jx5 rqXZZov5cxAQ2OKC/puLB+cRKZU1ZYb+tv9qeUXTo0Uz4SC8LKjFoGrAGR4t+pNP2LUG XNiI2A3vgvU50Y+W3CpWta1C5983bIxqIYZKIR75OzYJn5WUm+qNxqswiRsU7iwVMkZo 4WqQ== X-Gm-Message-State: ACrzQf0Mijq7QTeomGeF/VYTFsgTKGlHMP334ErPrfISqrtgxj3LbV8s Sbiv/obs/lIIdQXkEeixsXw2j/iDJ+9VLg== X-Google-Smtp-Source: AMsMyM4X8FmA5VtSoDrLyrhm1C/ZcmO8HSJPXAv823KLyiFzC3fWpLfTF8xhBgy4yDKUSvMfJGwFhQ== X-Received: by 2002:a19:c50d:0:b0:4a9:2a57:e236 with SMTP id w13-20020a19c50d000000b004a92a57e236mr574014lfe.263.1666999546845; Fri, 28 Oct 2022 16:25:46 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:25:46 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 1/6] staging: vt6655: fix lines ending in a '(' Date: Fri, 28 Oct 2022 23:23:22 +0000 Message-Id: <6742e42999e05ddf09318a0a3bda9ce23b6ae562.1666995639.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" fix several checkpatch errors related to lines ending with a '('=20 by joining some lines of code and indenting properly to improve visibility Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 165 ++++++++++++++-------------------- 1 file changed, 69 insertions(+), 96 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e5036121665..7eb7c6eb5cf0 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -139,15 +139,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *= priv, u16 rate) * PK_TYPE_11GB 2 * PK_TYPE_11GA 3 */ -static -unsigned int -s_uGetTxRsvTime( - struct vnt_private *pDevice, - unsigned char byPktType, - unsigned int cbFrameLength, - unsigned short wRate, - bool bNeedAck -) +static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned int cbFrameLength, + unsigned short wRate, + bool bNeedAck) { unsigned int uDataTime, uAckTime; =20 @@ -214,20 +210,16 @@ static __le16 get_rtscts_time(struct vnt_private *pri= v, } =20 /* byFreqType 0: 5GHz, 1:2.4Ghz */ -static -unsigned int -s_uGetDataDuration( - struct vnt_private *pDevice, - unsigned char byDurType, - unsigned int cbFrameLength, - unsigned char byPktType, - unsigned short wRate, - bool bNeedAck, - unsigned int uFragIdx, - unsigned int cbLastFragmentSize, - unsigned int uMACfragNum, - unsigned char byFBOption -) +static unsigned int s_uGetDataDuration(struct vnt_private *pDevice, + unsigned char byDurType, + unsigned int cbFrameLength, + unsigned char byPktType, + unsigned short wRate, + bool bNeedAck, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, + unsigned char byFBOption) { bool bLastFrag =3D false; unsigned int uAckTime =3D 0, uNextPktTime =3D 0, len; @@ -316,17 +308,13 @@ s_uGetDataDuration( } =20 /* byFreqType: 0=3D>5GHZ 1=3D>2.4GHZ */ -static -__le16 -s_uGetRTSCTSDuration( - struct vnt_private *pDevice, - unsigned char byDurType, - unsigned int cbFrameLength, - unsigned char byPktType, - unsigned short wRate, - bool bNeedAck, - unsigned char byFBOption -) +static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, + unsigned char byDurType, + unsigned int cbFrameLength, + unsigned char byPktType, + unsigned short wRate, + bool bNeedAck, + unsigned char byFBOption) { unsigned int uCTSTime =3D 0, uDurTime =3D 0; =20 @@ -409,22 +397,18 @@ s_uGetRTSCTSDuration( return cpu_to_le16((u16)uDurTime); } =20 -static -__le16 -s_uFillDataHead( - struct vnt_private *pDevice, - unsigned char byPktType, - void *pTxDataHead, - unsigned int cbFrameLength, - unsigned int uDMAIdx, - bool bNeedAck, - unsigned int uFragIdx, - unsigned int cbLastFragmentSize, - unsigned int uMACfragNum, - unsigned char byFBOption, - unsigned short wCurrentRate, - bool is_pspoll -) +static __le16 s_uFillDataHead(struct vnt_private *pDevice, + unsigned char byPktType, + void *pTxDataHead, + unsigned int cbFrameLength, + unsigned int uDMAIdx, + bool bNeedAck, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, + unsigned char byFBOption, + unsigned short wCurrentRate, + bool is_pspoll) { struct vnt_tx_datahead_ab *buf =3D pTxDataHead; =20 @@ -555,19 +539,15 @@ s_uFillDataHead( return buf->duration; } =20 -static -void -s_vFillRTSHead( - struct vnt_private *pDevice, - unsigned char byPktType, - void *pvRTS, - unsigned int cbFrameLength, - bool bNeedAck, - bool bDisCRC, - struct ieee80211_hdr *hdr, - unsigned short wCurrentRate, - unsigned char byFBOption -) +static void s_vFillRTSHead(struct vnt_private *pDevice, + unsigned char byPktType, + void *pvRTS, + unsigned int cbFrameLength, + bool bNeedAck, + bool bDisCRC, + struct ieee80211_hdr *hdr, + unsigned short wCurrentRate, + unsigned char byFBOption) { unsigned int uRTSFrameLen =3D 20; =20 @@ -750,19 +730,15 @@ s_vFillRTSHead( } } =20 -static -void -s_vFillCTSHead( - struct vnt_private *pDevice, - unsigned int uDMAIdx, - unsigned char byPktType, - void *pvCTS, - unsigned int cbFrameLength, - bool bNeedAck, - bool bDisCRC, - unsigned short wCurrentRate, - unsigned char byFBOption -) +static void s_vFillCTSHead(struct vnt_private *pDevice, + unsigned int uDMAIdx, + unsigned char byPktType, + void *pvCTS, + unsigned int cbFrameLength, + bool bNeedAck, + bool bDisCRC, + unsigned short wCurrentRate, + unsigned char byFBOption) { unsigned int uCTSFrameLen =3D 14; =20 @@ -868,21 +844,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 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) { u16 fifo_ctl =3D le16_to_cpu(tx_buffer_head->fifo_ctl); bool bDisCRC =3D false; @@ -954,11 +926,12 @@ s_vGenerateTxParameter( } } =20 -static unsigned int -s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, - unsigned char *pbyTxBufferAddr, - unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD, - unsigned int is_pspoll) +static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned char *pbyTxBufferAddr, + unsigned int uDMAIdx, + struct vnt_tx_desc *pHeadTD, + unsigned int is_pspoll) { struct vnt_td_info *td_info =3D pHeadTD->td_info; struct sk_buff *skb =3D td_info->skb; --=20 2.34.1 From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7801FA3741 for ; Fri, 28 Oct 2022 23:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbiJ1X0F (ORCPT ); Fri, 28 Oct 2022 19:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbiJ1XZ6 (ORCPT ); Fri, 28 Oct 2022 19:25:58 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C87249D15 for ; Fri, 28 Oct 2022 16:25:52 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id g12so10650024lfh.3 for ; Fri, 28 Oct 2022 16:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9QYGjKdaJZ5AAMSss+Z2Pspk+VYwutLrf3hAHYJXKtc=; b=nkJs1MhGhax3WDtTu2CVq4IYT7j0/16CNSBN+kwE4u1OAI1A/zADtodk9o6QAsupm+ lFOj1y7dKF93ncO6EEosPOOQV4Ey2frVsttr/fXsipVMTuebKPN9HNOItnbP1QocJKCc zMHvPzELJgVobg0DnE86oT5lutcFIxTNV/IBPkh1N9lPelx2BZxEXqrELHFFARNpcpSQ TQG2J5o0HDwjshBc4yzVEH+k3totHNzsEoXDHyuHzASTLT1V4ZaoYRVOMQTamgDsBejJ FAzMZZIeWvatY/6kA8XOGP0f72y2ikAsnj1Jv9Fmsa76GTyfT0f0jmR3+wBVGGb+ycdy IVxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9QYGjKdaJZ5AAMSss+Z2Pspk+VYwutLrf3hAHYJXKtc=; b=KEQe1yzRRmZF9y602HaFlzbQrH6k/xupy5hION/HZ3F2yJnWRDI/tnRTS8iMUzweDG UwQUhqzaeT42vktmYt9eWwSKhp+PRHbbnmHBgoAPBW1goacXbht0GczrNpJOB6xmyBJJ wQ+MS2/x5USdnbcV+XiVXIRdl1lG0qKIhR7UTdTjYamIZoBVMJwgO1rjL1Bwcm7rO8dG MAzOM56p0+DBpDSpyzaxTpCYx0F7FoEn9a/TmCzPDlz6iWlNes87nlj7wCcsA72OQNeX spqJvm114omSVI6c/YwzYzXWP/b898Tqo+L7/EE+T4ZtR6Kq25b0j4IzUxYrvnBp6lQR vLAQ== X-Gm-Message-State: ACrzQf1xbs0T0gjGTqMJhCAAVMD+FwMAAzKthwQBCni/7ZzbvoR1/NwZ aC7uph5yI9oHLbA8AN3CABc= X-Google-Smtp-Source: AMsMyM76+DSJEgccz4o3SioEl35CUNcCjWlxlhvWnIWb1Ea2lwJAgmL83iz0R/3yoXaVrkK/Hvms3w== X-Received: by 2002:a05:6512:22c3:b0:4a2:7cd9:1f1f with SMTP id g3-20020a05651222c300b004a27cd91f1fmr601951lfu.582.1666999551228; Fri, 28 Oct 2022 16:25:51 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:25:50 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 2/6] staging: vt6655: split long code lines in s_uGetRTSCTSDuration Date: Fri, 28 Oct 2022 23:23:23 +0000 Message-Id: <0e6a307052d3a354a850a502e509f46baccdbe1e.1666995639.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Increase code visibility by splitting long lines of code in the function: s_uGetRTSCTSDuration Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 108 ++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 32 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 7eb7c6eb5cf0..8e56a7ee8035 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -186,20 +186,29 @@ static __le16 get_rtscts_time(struct vnt_private *pri= v, =20 data_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, frame_leng= th, current_rate); if (rts_rsvtype =3D=3D 0) { /* RTSTxRrvTime_bb */ - rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->= byTopCCKBasicRate); - ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopCCKBasicRate); + rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); cts_time =3D ack_time; } else if (rts_rsvtype =3D=3D 1) { /* RTSTxRrvTime_ba, only in 2.4GHZ */ - rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->= byTopCCKBasicRate); - cts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopCCKBasicRate); - ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopOFDMBasicRate); + rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + cts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); } else if (rts_rsvtype =3D=3D 2) { /* RTSTxRrvTime_aa */ - rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->= byTopOFDMBasicRate); - ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopOFDMBasicRate); + rts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopOFDMBasicRate); + ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); cts_time =3D ack_time; } else if (rts_rsvtype =3D=3D 3) { /* CTSTxRrvTime_ba, only in 2.4GHZ */ - cts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopCCKBasicRate); - ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->= byTopOFDMBasicRate); + cts_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time =3D bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); rrv_time =3D cts_time + ack_time + data_time + 2 * priv->uSIFS; return cpu_to_le16((u16)rrv_time); } @@ -320,73 +329,108 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_privat= e *pDevice, =20 switch (byDurType) { case RTSDUR_BB: /* RTSDuration_bb */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopCCKBasicRate); - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, by= PktType, cbFrameLength, wRate, bNeedAck); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; =20 case RTSDUR_BA: /* RTSDuration_ba */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopCCKBasicRate); - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, by= PktType, cbFrameLength, wRate, bNeedAck); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; =20 case RTSDUR_AA: /* RTSDuration_aa */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopOFDMBasicRate); - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, by= PktType, cbFrameLength, wRate, bNeedAck); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; =20 case CTSDUR_BA: /* CTSDuration_ba */ - uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFram= eLength, wRate, bNeedAck); + uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, + cbFrameLength, wRate, bNeedAck); break; =20 case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopCCKBasicRate); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); =20 break; =20 case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopOFDMBasicRate); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); =20 break; =20 case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopCCKBasicRate); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); =20 break; =20 case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */ - uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pD= evice->byTopOFDMBasicRate); + uCTSTime =3D bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, b= yPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); =20 break; =20 case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */ if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFra= meLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFra= meLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime =3D pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); =20 break; =20 case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */ if ((byFBOption =3D=3D AUTO_FB_0) && (wRate >=3D RATE_18M) && (wRate <= =3D RATE_54M)) - uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFra= meLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption =3D=3D AUTO_FB_1) && (wRate >=3D RATE_18M) && (wRat= e <=3D RATE_54M)) - uDurTime =3D pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFra= meLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime =3D pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); =20 break; =20 --=20 2.34.1 From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CB7FA3741 for ; Fri, 28 Oct 2022 23:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbiJ1X0J (ORCPT ); Fri, 28 Oct 2022 19:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiJ1X0C (ORCPT ); Fri, 28 Oct 2022 19:26:02 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 882E4249D34 for ; Fri, 28 Oct 2022 16:25:58 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id b8so10203180ljf.0 for ; Fri, 28 Oct 2022 16:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AcB5arJjgHTmpFB6R7uRBbXiCMTfrnphl4x+/FnTYWg=; b=ZdEheupuC7eW84gzXs4cszBRDoiL2GzGNF96hEjGCKRUKS3ZSS9Wm7cPujCljd4xXf XrKjnhV7b52mVjTCTgeiW+ykR/gcDKLhx7dPK1j072/3r9XPGkgRH1LbZR9S8y/MFN6b xdMgLEpLRP1E5RAKKAJcPL15kM6m3Pq8YXl0SEPx2S+7N8y+8v/LIZk6j8kbmiNmrgZe 2eDztlFu2dReoaNM3yQnwReCPGfEORab0tden6JB+7Z0Q1e5WQhdui7HCibaLRkhIAdq 4OcPJxIpbWoAx6bYonWseIGG8gb+Xkb9b9tV5KvXYTRMqkGm7KGFwu8DDn+jDOX5PLzo 9YDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AcB5arJjgHTmpFB6R7uRBbXiCMTfrnphl4x+/FnTYWg=; b=hILW0MxOlRKTmV+LMsZRN3pfGx/HYYZMtKrAnTud9IRwUM6NAqChZs0CuUpCVqURKB uPxus6KQx7N/QrXhcLv6tpoa80Uwgz0hFhyk4bHKDgXMFpmMclhZh/XpsKB1ofqgEhZM DRobQjVPLDfuDvNeO1rmzkyNB9KwimtZXj1p+65KlE5RZgE+g9EoL/0nIQPtpLwfkSrO 8Jptd8iJBdjRdpMjY08IJkCWySS0oZv/zjaiXTDaMyrDKBtYpK03bpNpa6vvoKOOBlmX m5/8XaFEA3yYp7m+h2cIzVKaRhQOthS47B6Qsqow7feWOA6kdhbfJP20QS3asThNluWK J30Q== X-Gm-Message-State: ACrzQf1xR75Uls+YyfEY3WohIvboxsnzaRzCm1J5WQ8MdSJMi/BVxN8K P8BoT8jzxQNcSYEWbVpZ89I= X-Google-Smtp-Source: AMsMyM7+xjkTeq/qAJLRJ7Di51tF5DnyAPmwlqM+/XX2wUFekDijfdlhEOUC15Dhxak5gWKOLOfpuw== X-Received: by 2002:a2e:b88b:0:b0:26f:d03c:8d74 with SMTP id r11-20020a2eb88b000000b0026fd03c8d74mr689502ljp.285.1666999556899; Fri, 28 Oct 2022 16:25:56 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:25:56 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 3/6] staging: vt6655: split long lines of code in s_uFillDataHead Date: Fri, 28 Oct 2022 23:23:24 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Increase code visibility by splitting long lines of code in the function: s_uFillDataHead Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 97 ++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 8e56a7ee8035..7b6571ba7c36 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -481,19 +481,28 @@ static __le16 s_uFillDataHead(struct vnt_private *pDe= vice, } else { /* Get Duration and TimeStamp */ buf->duration_a =3D - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, - byPktType, wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, + byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->duration_b =3D - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, - PK_TYPE_11B, pDevice->byTopCCKBasicRate, - bNeedAck, uFragIdx, cbLastFragmentSize, - uMACfragNum, byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, + cbFrameLength, + PK_TYPE_11B, + pDevice->byTopCCKBasicRate, + bNeedAck, uFragIdx, + cbLastFragmentSize, + uMACfragNum, + byFBOption)); } =20 buf->time_stamp_off_a =3D vnt_time_stamp_off(pDevice, wCurrentRate); - buf->time_stamp_off_b =3D vnt_time_stamp_off(pDevice, pDevice->byTopCCK= BasicRate); + buf->time_stamp_off_b =3D vnt_time_stamp_off(pDevice, + pDevice->byTopCCKBasicRate); =20 return buf->duration_a; } @@ -506,14 +515,29 @@ static __le16 s_uFillDataHead(struct vnt_private *pDe= vice, pDevice->byTopCCKBasicRate, PK_TYPE_11B, &buf->b); /* Get Duration and TimeStamp */ - buf->duration_a =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR= _A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfr= agNum, byFBOption)); - buf->duration_b =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR= _B, cbFrameLength, PK_TYPE_11B, - pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragm= entSize, uMACfragNum, byFBOption)); - buf->duration_a_f0 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATA= DUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragN= um, byFBOption)); - buf->duration_a_f1 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATA= DUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNu= m, byFBOption)); + buf->duration_a =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR= _A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_b =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR= _B, + cbFrameLength, PK_TYPE_11B, + pDevice->byTopCCKBasicRate, + bNeedAck, uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f0 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATA= DUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f1 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATA= DUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); =20 buf->time_stamp_off_a =3D vnt_time_stamp_off(pDevice, wCurrentRate); buf->time_stamp_off_b =3D vnt_time_stamp_off(pDevice, pDevice->byTopCCKB= asicRate); @@ -531,12 +555,24 @@ static __le16 s_uFillDataHead(struct vnt_private *pDe= vice, byPktType, &buf->a); =20 /* Get Duration and TimeStampOff */ - buf->duration =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_= A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfra= gNum, byFBOption)); - buf->duration_f0 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATAD= UR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMAC= fragNum, byFBOption)); - buf->duration_f1 =3D cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATAD= UR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNu= m, byFBOption)); + buf->duration =3D + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f0 =3D + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f1 =3D + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->time_stamp_off =3D vnt_time_stamp_off(pDevice, wCurrentRate); return buf->duration; } @@ -552,10 +588,11 @@ static __le16 s_uFillDataHead(struct vnt_private *pDe= vice, } else { /* Get Duration and TimeStampOff */ buf->duration =3D - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength,= byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); } =20 buf->time_stamp_off =3D vnt_time_stamp_off(pDevice, wCurrentRate); @@ -573,10 +610,10 @@ static __le16 s_uFillDataHead(struct vnt_private *pDe= vice, } else { /* Get Duration and TimeStampOff */ buf->duration =3D - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, = byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, + byPktType, wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); } =20 buf->time_stamp_off =3D vnt_time_stamp_off(pDevice, wCurrentRate); --=20 2.34.1 From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7368FC38A02 for ; Fri, 28 Oct 2022 23:26:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbiJ1X0U (ORCPT ); Fri, 28 Oct 2022 19:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbiJ1X0M (ORCPT ); Fri, 28 Oct 2022 19:26:12 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6828A1DC82A for ; Fri, 28 Oct 2022 16:26:05 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g7so10634661lfv.5 for ; Fri, 28 Oct 2022 16:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UklhJgGoyZGLy7w3immveIEsxPRlB+UWC/kvGVYWMME=; b=XflN1pJrFMvDtNQ0wg9hNRmYteseb1LBOr+PAnniO3oY9YRe1Npb6kfpF3GxLubpqK bPabpIptyS561e3a05MdycHZJBSE/clD79xLgM2rARfFaose6HLAolFRQsHLYldWO9bc aDpMGWc7iKBW40Jl5o7nUxjGTTO03d8434ioTgvCWlf2nauBa1ny33lTMr0c2/0aewaC 6ydISlUwSWoViB0CX1q/fvKg5GiMAg5OueTAGgcXgK1qSzPQiFsGCo/JcAty2o/9iYeC R5fAl38dKb31Jv1z/dMtweZ+6oLc+yJtKZCQPv56+WKe4ArAQxU5H4vf6sHqYx4nMN6n F2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UklhJgGoyZGLy7w3immveIEsxPRlB+UWC/kvGVYWMME=; b=poTlK774qf/SWlzJGYM/+hlZa98bUi++t4tCP+RZVssYDEEOEeUGBoQkKM17sFuxvT xlIkrWBb9KIFKo2efV3H2Hs4G2OhPwM3joCtckLRsIEcvjryp0QGREfVCthEMqLJIrr9 kgVqznUfFZuAveZuB0dH1W8a0UzzMRQa8F1ah3cxo4LN5iv5qk3zJkOQlhu9ggsawsWc zlC3r4LvWmGF/cEDEO6LdAMF7pdHmbSYQHD05XepB/F+xb6Q0u91JqfzF3qpTWy81izQ PienUrv7nfSqWOz7VAhAp3Q1j8DGatu4zDNXS4bJIPZYmFuBS1LP8EDWf8opuUaMTjh3 3ewg== X-Gm-Message-State: ACrzQf2ySuoObgSSmAWWfEYZssvw7+HEWeWUdxRM32OoSfoJabBBzsG/ zZDbAmt2nRagb6u5GLwgtBM= X-Google-Smtp-Source: AMsMyM5i560QonZi8jQXp/cgxFjwULSLdJrUE6UMJEfXDEMeXG41LiYPqQLae5kYiWe+PUxcM597Ew== X-Received: by 2002:ac2:5dd4:0:b0:4af:fbde:bca4 with SMTP id x20-20020ac25dd4000000b004affbdebca4mr592331lfq.387.1666999563735; Fri, 28 Oct 2022 16:26:03 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:26:03 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 4/6] staging: vt6655: split long lines of code in s_vGenerateTxParamete Date: Fri, 28 Oct 2022 23:23:25 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Increase code visibility by splitting long lines of code in the function: s_vGenerateTxParameter Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 68 ++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 7b6571ba7c36..475526b73e1a 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -834,7 +834,9 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, } =20 if (byPktType =3D=3D PK_TYPE_11GB || byPktType =3D=3D PK_TYPE_11GA) { - if (byFBOption !=3D AUTO_FB_NONE && uDMAIdx !=3D TYPE_ATIMDMA && uDMAIdx= !=3D TYPE_BEACONDMA) { + if (byFBOption !=3D AUTO_FB_NONE && + uDMAIdx !=3D TYPE_ATIMDMA && + uDMAIdx !=3D TYPE_BEACONDMA) { /* Auto Fall back */ struct vnt_cts_fb *buf =3D pvCTS; /* Get SignalField, ServiceField & Length */ @@ -873,7 +875,11 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, =20 ether_addr_copy(buf->data.ra, pDevice->abyCurrentNetAddr); - } else { /* if (byFBOption !=3D AUTO_FB_NONE && uDMAIdx !=3D TYPE_ATIMDM= A && uDMAIdx !=3D TYPE_BEACONDMA) */ + } else { + /* if (byFBOption !=3D AUTO_FB_NONE && + * uDMAIdx !=3D TYPE_ATIMDMA && + * uDMAIdx !=3D TYPE_BEACONDMA) + */ struct vnt_cts *buf =3D pvCTS; /* Get SignalField, ServiceField & Length */ vnt_get_phy_field(pDevice, uCTSFrameLen, @@ -959,50 +965,70 @@ static void s_vGenerateTxParameter(struct vnt_private= *pDevice, /* Fill RsvTime */ struct vnt_rrv_time_rts *buf =3D pvRrvTime; =20 - buf->rts_rrv_time_aa =3D get_rtscts_time(pDevice, 2, byPktType, cbFrame= Size, wCurrentRate); - buf->rts_rrv_time_ba =3D get_rtscts_time(pDevice, 1, byPktType, cbFrame= Size, wCurrentRate); - buf->rts_rrv_time_bb =3D get_rtscts_time(pDevice, 0, byPktType, cbFrame= Size, wCurrentRate); - buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSi= ze, wCurrentRate, bNeedACK); - buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrame= Size, pDevice->byTopCCKBasicRate, bNeedACK); - - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, psEthHeader, wCurrentRate, byFBOption); + buf->rts_rrv_time_aa =3D get_rtscts_time(pDevice, 2, byPktType, cbFrame= Size, + wCurrentRate); + buf->rts_rrv_time_ba =3D get_rtscts_time(pDevice, 1, byPktType, cbFrame= Size, + wCurrentRate); + buf->rts_rrv_time_bb =3D get_rtscts_time(pDevice, 0, byPktType, cbFrame= Size, + wCurrentRate); + buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSi= ze, + wCurrentRate, bNeedACK); + buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrame= Size, + pDevice->byTopCCKBasicRate, + bNeedACK); + + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, + psEthHeader, wCurrentRate, byFBOption); } else {/* RTS_needless, PCF mode */ struct vnt_rrv_time_cts *buf =3D pvRrvTime; =20 - buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSi= ze, wCurrentRate, bNeedACK); - buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrame= Size, pDevice->byTopCCKBasicRate, bNeedACK); - buf->cts_rrv_time_ba =3D get_rtscts_time(pDevice, 3, byPktType, cbFrame= Size, wCurrentRate); + buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSi= ze, + wCurrentRate, bNeedACK); + buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrame= Size, + pDevice->byTopCCKBasicRate, + bNeedACK); + buf->cts_rrv_time_ba =3D get_rtscts_time(pDevice, 3, byPktType, cbFrame= Size, + wCurrentRate); =20 /* Fill CTS */ - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedAC= K, bDisCRC, wCurrentRate, byFBOption); + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedAC= K, + bDisCRC, wCurrentRate, byFBOption); } } else if (byPktType =3D=3D PK_TYPE_11A) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf =3D pvRrvTime; =20 - buf->rts_rrv_time =3D get_rtscts_time(pDevice, 2, byPktType, cbFrameSiz= e, wCurrentRate); - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize= , wCurrentRate, bNeedACK); + buf->rts_rrv_time =3D get_rtscts_time(pDevice, 2, byPktType, cbFrameSiz= e, + wCurrentRate); + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); =20 /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, + psEthHeader, wCurrentRate, byFBOption); } else if (!pvRTS) {/* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf =3D pvRrvTime; =20 - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSi= ze, wCurrentRate, bNeedACK); + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSi= ze, + wCurrentRate, bNeedACK); } } else if (byPktType =3D=3D PK_TYPE_11B) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf =3D pvRrvTime; =20 - buf->rts_rrv_time =3D get_rtscts_time(pDevice, 0, byPktType, cbFrameSiz= e, wCurrentRate); - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSi= ze, wCurrentRate, bNeedACK); + buf->rts_rrv_time =3D get_rtscts_time(pDevice, 0, byPktType, cbFrameSiz= e, + wCurrentRate); + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSi= ze, + wCurrentRate, bNeedACK); =20 /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCR= C, + psEthHeader, wCurrentRate, byFBOption); } else { /* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf =3D pvRrvTime; =20 - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSi= ze, wCurrentRate, bNeedACK); + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSi= ze, + wCurrentRate, bNeedACK); } } } --=20 2.34.1 From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 578AFFA3741 for ; Fri, 28 Oct 2022 23:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbiJ1X03 (ORCPT ); Fri, 28 Oct 2022 19:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbiJ1X0R (ORCPT ); Fri, 28 Oct 2022 19:26:17 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61CD0249D06 for ; Fri, 28 Oct 2022 16:26:09 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id o12so10608066lfq.9 for ; Fri, 28 Oct 2022 16:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=12SvF3m9yP7YwQVdd6wLC8qgaOMohgTgyWxZ/jOVajE=; b=RTmzy6V/UkswfF4xtEgeW7nv7M1a062nRzgJCUqqSArPIFdeWx7m1zWfG08gP5zIzK raFU9sXrWSfJZcX7cxZpufiYRqHNh80MrI7V3V8ULv1x7XjDSFfI6sP3kBfYiDWlU1T1 2Z1BzgCABTx9Pbjv212DKiCCfE9pzp9B/ph7T2yS5TT5sMgS8DGx9KcMRKPELIzuf74Y asCskkICxOXbIhnMhYiU4ivRNJSsN6V3KxMEWBk6KW14x2nJ31QppzAqFffYUnQLCy7o QH/1bMz4itWQ3jMgcCe26ZPz5mVj03Dq3TaJyzAGWAqLVzFOkxxKNBN1VdEHewd2DbfO zxIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=12SvF3m9yP7YwQVdd6wLC8qgaOMohgTgyWxZ/jOVajE=; b=i6zLjK8OjfnJhwr0+q6fmGWnn2TfwXLLSrcP8F3qo04GKmX6wx9QI+SYwmLEsTWMjx J9Wvg42xYhIAd+Pt/B+X27S3ZaNeaIPHp+m81ogKHsfcszAgUDVxthVvfjhX9c32NPJX 16y5t5qUFNp/UVzW7+nEcKpnIMTnMbTImfcqs8AB6rytduaKsV0U8CqHFeHCNMHD9Q/n AXc00aKSMA/a3SRv211Y0gi528mt7QK3YW9xsFNxYBkCNVwJNrrp1YHC/pQGmUDGnBWE u6y0BDCSjSd/r11X7EOjUQ6Ra6ZjQo+gFMF70qQ9gnCvvRGOHlirzSDoX9ZQeXXk4tn2 bvuQ== X-Gm-Message-State: ACrzQf0JfhCVtQE/5+XpeIX3InD20tzUV8iU/UoP49Vq2LfGuhaYJ1od Dl/PTc8EnDCww2NHQnd8blc= X-Google-Smtp-Source: AMsMyM7KdwQhOAUrENZAYgJ5jpYKSpQRjFHoYfkti9vNvhJiIERSdp4uRhMQ5bSKnRk6pqHGQ90//w== X-Received: by 2002:ac2:47fa:0:b0:4a2:361d:da19 with SMTP id b26-20020ac247fa000000b004a2361dda19mr620969lfp.548.1666999567712; Fri, 28 Oct 2022 16:26:07 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:26:07 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 5/6] staging: vt6655: split long lines of code in file Date: Fri, 28 Oct 2022 23:23:26 +0000 Message-Id: <71c411a68c9c54b20e7fa687f736acac50b33b5e.1666995639.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" increase code visibility by splitting long lines of code in the file Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 86 +++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 475526b73e1a..6a4fcb16b674 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1102,44 +1102,59 @@ static unsigned int s_cbFillTxBufHead(struct vnt_pr= ivate *pDevice, if (byFBOption =3D=3D AUTO_FB_NONE) { if (bRTS) {/* RTS_need */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_rts)); - pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rr= v_time_rts) + cbMICHDR); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS =3D NULL; - pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct v= nt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g)); + pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + + cbMICHDR + sizeof(struct vnt_rts_g)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g) + sizeof(struct vnt_tx_datahead_g); } else { /* RTS_needless */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_cts)); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS =3D NULL; - pvCTS =3D (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_r= rv_time_cts) + cbMICHDR); + pvCTS =3D (void *) (pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts)); + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + + sizeof(struct vnt_cts)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - cbMICHDR + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g= ); + cbMICHDR + sizeof(struct vnt_cts) + + sizeof(struct vnt_tx_datahead_g); } } else { /* Auto Fall Back */ if (bRTS) {/* RTS_need */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_rts)); - pvRTS =3D (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_r= rv_time_rts) + cbMICHDR); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS =3D NULL; - pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct v= nt_rrv_time_rts) + + pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g_fb)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g_fb) + sizeof(struct vnt_tx_datahea= d_g_fb); + cbMICHDR + sizeof(struct vnt_rts_g_fb) + + sizeof(struct vnt_tx_datahead_g_fb); } else { /* RTS_needless */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_cts)); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS =3D NULL; - pvCTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rr= v_time_cts) + cbMICHDR); - pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct = vnt_rrv_time_cts) + + pvCTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); + pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts_fb)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - cbMICHDR + sizeof(struct vnt_cts_fb) + sizeof(struct vnt_tx_datahead_= g_fb); + cbMICHDR + sizeof(struct vnt_cts_fb) + + sizeof(struct vnt_tx_datahead_g_fb); } } /* Auto Fall Back */ } else {/* 802.11a/b packet */ @@ -1147,19 +1162,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_pr= ivate *pDevice, if (byFBOption =3D=3D AUTO_FB_NONE) { if (bRTS) { pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_ab)); - pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rr= v_time_ab) + cbMICHDR); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS =3D NULL; pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_ab)= ); + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + + sizeof(struct vnt_rts_ab)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_ab) + - cbMICHDR + sizeof(struct vnt_rts_ab) + sizeof(struct vnt_tx_datahead_= ab); + cbMICHDR + sizeof(struct vnt_rts_ab) + + sizeof(struct vnt_tx_datahead_ab); } else { /* RTS_needless, need MICHDR */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_ab)); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS =3D NULL; pvCTS =3D NULL; - pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct v= nt_rrv_time_ab) + cbMICHDR); + pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_tx_datahead_ab); } @@ -1167,19 +1188,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_pr= ivate *pDevice, /* Auto Fall Back */ if (bRTS) { /* RTS_need */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_ab)); - pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rr= v_time_ab) + cbMICHDR); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS =3D NULL; pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_a_f= b)); + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + + sizeof(struct vnt_rts_a_fb)); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_ab) + - cbMICHDR + sizeof(struct vnt_rts_a_fb) + sizeof(struct vnt_tx_datahea= d_a_fb); + cbMICHDR + sizeof(struct vnt_rts_a_fb) + + sizeof(struct vnt_tx_datahead_a_fb); } else { /* RTS_needless */ pvRrvTime =3D (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + size= of(struct vnt_rrv_time_ab)); + pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS =3D NULL; pvCTS =3D NULL; - pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct v= nt_rrv_time_ab) + cbMICHDR); + pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_tx_datahead_a_fb); } @@ -1195,7 +1222,8 @@ static unsigned int s_cbFillTxBufHead(struct vnt_priv= ate *pDevice, cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); /* Fill DataHead */ uDuration =3D s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize= , uDMAIdx, bNeedACK, - 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll); + 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, + is_pspoll); =20 hdr->duration_id =3D uDuration; =20 --=20 2.34.1 From nobody Wed Apr 8 19:54:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CE61FA3741 for ; Fri, 28 Oct 2022 23:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbiJ1X0i (ORCPT ); Fri, 28 Oct 2022 19:26:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbiJ1X0S (ORCPT ); Fri, 28 Oct 2022 19:26:18 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2927E24F7A3 for ; Fri, 28 Oct 2022 16:26:12 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id h12so3403917ljg.9 for ; Fri, 28 Oct 2022 16:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bQe+2hHBmcm3Iek0E2MIyCyrx7Z86fYMUFGwOxoXr6Q=; b=ePqdSGl8r9FllmjwNWoh573XDSnzK5I4nCmlEZgthvcPl3/jmS+uN51B35UUNj5mA5 HEDLMpcgrrnXIPwv+nVDySujRXnKdJF9g/A2/z+5xXf2xfqof6IB7YPPhirTBwspK5rp XkF+4EhniTIsTYYripf+Tu+xezvx2TGpj9mBCR8QCjwhC7ZV7tV7UstssQ13nDD21+Ae nuW++XfYTYKdl9IGzGJDF4fLMKjvaVR5AXtUKtePoU1f4uIj5pjTs1+DantKZSI/WeqO IMRbbH1OvPu2Mqm+QglDWI+oKFVF0nOfdOa4Vf1L8ViVMLEIynbaoBynd4i2HJ8trcB4 IsSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bQe+2hHBmcm3Iek0E2MIyCyrx7Z86fYMUFGwOxoXr6Q=; b=ODAId5UqVFEhxbf4NC4/GhCnl7lDhgT6/ZMT0DbIw1Or1YKEi6aGh/mW0uljqgj0zm OJvw4rPRg7d2r0ADYJGKNn03ADJ7E62Scz2zksczZN4IY1N5ZYHyebvHDQB38toItzth xy001iBt78gOxzbgCCvy6MyrptG68d14prNpjJOzbItS9mm2t1EzmDwgom3CrHnaDsJP JQNc0AJ687WGFlqsfTb77JVW8yWLi+9nXErN5VIGOaQBhL5Cs4Cv18t/glr2k7gEm7EZ Cf8hxQKavJLfkCvYn4s+iP7PBAZ0xJfzoqKtYeXUMbQZYd0Ds3ajX927gw3sWHHbnEPk uqUg== X-Gm-Message-State: ACrzQf0Ov5pPMVr6Fn81T6ElpNpOdFpZ+X2cgmgV4jCmEVHWGs3+1XnT 9ShkRef2SG/KIMXxynXenr1BPsRXUqqYMA== X-Google-Smtp-Source: AMsMyM5LWqv2r3+h4McwbMrvVf2OYT2+ybq+d8uGTOBfnHdoFM7as9mEJe8wgtBxk23YuZbKZdW+9w== X-Received: by 2002:a05:651c:511:b0:26f:dfb2:eeef with SMTP id o17-20020a05651c051100b0026fdfb2eeefmr654174ljp.343.1666999570400; Fri, 28 Oct 2022 16:26:10 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s2-20020a056512202200b0049aa20af00fsm7064lfs.21.2022.10.28.16.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 16:26:10 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v9 6/6] staging: vt6655: fix lines of code ending in a '(' Date: Fri, 28 Oct 2022 23:23:27 +0000 Message-Id: <45d10b850cef8ed5db7042311dbe19bcba185396.1666995639.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" fix checkpatch errors related to lines ending with a '('=20 by joining some lines of code and indenting properly to improve visibility Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 6a4fcb16b674..d585435520b3 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1118,7 +1118,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_priv= ate *pDevice, pMICHDR =3D (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); pvRTS =3D NULL; - pvCTS =3D (void *) (pbyTxBufferAddr + wTxBufSize + + pvCTS =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd =3D (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + @@ -1296,10 +1296,8 @@ static void vnt_fill_txkey(struct ieee80211_hdr *hdr= , u8 *key_buffer, ether_addr_copy(mic_hdr->addr2, hdr->addr2); ether_addr_copy(mic_hdr->addr3, hdr->addr3); =20 - mic_hdr->frame_control =3D cpu_to_le16( - le16_to_cpu(hdr->frame_control) & 0xc78f); - mic_hdr->seq_ctrl =3D cpu_to_le16( - le16_to_cpu(hdr->seq_ctrl) & 0xf); + mic_hdr->frame_control =3D cpu_to_le16(le16_to_cpu(hdr->frame_control) &= 0xc78f); + mic_hdr->seq_ctrl =3D cpu_to_le16(le16_to_cpu(hdr->seq_ctrl) & 0xf); =20 if (ieee80211_has_a4(hdr->frame_control)) ether_addr_copy(mic_hdr->addr4, hdr->addr4); @@ -1470,9 +1468,9 @@ static int vnt_beacon_xmit(struct vnt_private *priv, =20 /* Get Duration and TimeStampOff */ short_head->duration =3D - cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, - frame_size, PK_TYPE_11A, current_rate, - false, 0, 0, 1, AUTO_FB_NONE)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, frame_size, + PK_TYPE_11A, current_rate, false, + 0, 0, 1, AUTO_FB_NONE)); =20 short_head->time_stamp_off =3D vnt_time_stamp_off(priv, current_rate); @@ -1486,9 +1484,9 @@ static int vnt_beacon_xmit(struct vnt_private *priv, =20 /* Get Duration and TimeStampOff */ short_head->duration =3D - cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, - frame_size, PK_TYPE_11B, current_rate, - false, 0, 0, 1, AUTO_FB_NONE)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, frame_size, + PK_TYPE_11B, current_rate, false, + 0, 0, 1, AUTO_FB_NONE)); =20 short_head->time_stamp_off =3D vnt_time_stamp_off(priv, current_rate); --=20 2.34.1