From nobody Tue Apr 7 23:57:53 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 A8CC2C433FE for ; Thu, 20 Oct 2022 18:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbiJTS3p (ORCPT ); Thu, 20 Oct 2022 14:29:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbiJTS3j (ORCPT ); Thu, 20 Oct 2022 14:29:39 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7110C2098F for ; Thu, 20 Oct 2022 11:29:37 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id j14so440406ljh.12 for ; Thu, 20 Oct 2022 11:29:37 -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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=FtxqJzLcXR1FeOlPf31YZrXtpSELfV5HY8UxhQLD+IFg9R7+253X+DwOTXu1QbcLKO 67zNMbCDnboKIimUUOZJIuhs2589aPmTbbkHjQ5MM7eTQjsT8ffuHeLN4h/AHh45dFQl /SQIdkchNXSpG7c1f0uv6wPy3Iq7taKXoNw301HRRXe4YpxqlKjvVQggBCokxUshVuj/ 4uVwWo2whzcv2CLp+URaqMPG+Mzwb0owY5AhTXkL6aBYQzByL66d8y2eN8zBbFwKF9tA RTZM1W7U7nc1j4Mz8vTOsUI75KG9gdfxrOJFzCZLPs4R0TyAvuNsPFiH9cZKOP86J/Vd JXZA== 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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=dtaW7L5BWkgP9YydAHt6gDOyOw9EkKim6nCePjr3yxSFoZF1Cm+6u/o6zTA4iN7wzh xTfMfM80uSPGBJLYIZL3ZXnuo5eKqyIwLEv5Z8oPJfLGWw5M40prr9zSEw3m03xrH5rv qE7sTSIOYEjyKWDYFMml5U6ZlWJkrOiROOq3GgYVqqnL68oGzdcf1/xgWr+XLDpeZGHV xdMCsgJxQVmvaxpgVBRiuifD279XQb9iKqcjsQmI7zp2Tj0ewYf1XlTGSpHBO4ZcCsbb 1gx1sDpBFRc8FHV6uBJ+5hul4fexQmHNGQcH7ieM5Kf85Ee2WKhxFNFSHjA/u+b0AC1o DwBA== X-Gm-Message-State: ACrzQf1Q+gI9x0mdnqCgfPCfay2nqx/2g9L8wq328mEYYI8sUkEAR0Ab 5yaMuqzzUGssPXTfkBQC4iIkzoCbIc3lRpJT X-Google-Smtp-Source: AMsMyM7obNymL36cxtLecuiPiPZRdathMnjWLsSvyKUT8oF3LeCTzUlLQ9KFzqo5Eo4+Ek81V3MSLg== X-Received: by 2002:a2e:3310:0:b0:26e:61d7:870b with SMTP id d16-20020a2e3310000000b0026e61d7870bmr5673224ljc.88.1666290575680; Thu, 20 Oct 2022 11:29:35 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:35 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 1/6] staging: vt6655: fix lines ending in a '(' Date: Thu, 20 Oct 2022 18:27:41 +0000 Message-Id: <46a2791fc89f4dc299162418ab304ab821e494fa.1666288416.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 serveral checkpatch errors related to lines ending with a '(' by refactoring the code lines Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 149 ++++++++++++++-------------------- 1 file changed, 63 insertions(+), 86 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e5036121665..f9d0b00d7cff 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -141,13 +141,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *= priv, u16 rate) */ static unsigned int -s_uGetTxRsvTime( - struct vnt_private *pDevice, - unsigned char byPktType, - unsigned int cbFrameLength, - unsigned short wRate, - bool bNeedAck -) +s_uGetTxRsvTime(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned int cbFrameLength, + unsigned short wRate, + bool bNeedAck) { unsigned int uDataTime, uAckTime; =20 @@ -215,19 +213,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 -) +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 +311,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 +400,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 +542,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 @@ -752,17 +735,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 -) +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 +849,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; --=20 2.34.1 From nobody Tue Apr 7 23:57:53 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 691D1C433FE for ; Thu, 20 Oct 2022 18:29:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbiJTS36 (ORCPT ); Thu, 20 Oct 2022 14:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbiJTS3o (ORCPT ); Thu, 20 Oct 2022 14:29:44 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463393B998 for ; Thu, 20 Oct 2022 11:29:40 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id m23so519099lji.2 for ; Thu, 20 Oct 2022 11:29:40 -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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=l8ymFiKj1kP/UjFBIEdasfBzNKRaUp4nsQr0RD6CqBJ3fY8i7gGAXZ1Wp8fh3LpCIs iijlSxtUdCfGqWetE6GfI19+/T98NOMgEllD+0Kmv9d3EKlWS5N1AOPP0gmGI5AI3Vwz wOJ7QYbLX10xtl5bI3NyCcWyaGkPS72nfms+5sVwm2dt8eEJghHWzM54cuiIfX96ENsz 7rcG2OEOgaaOE6utAb/qiD5eTZhtb0oQCIpv9zySvp+QNqzYPd1dKPbUoY+qo8JuKe+L rpOO8RC+4IVTsGPdjZTPbiWO+XEahSP5qPKH4xOUabNE255ou5HwmRNfY7GjprL4+cQG AEew== 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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=PjjXGlH5uFAJbTPsRs/ozsqY9JG7QJNgTIvsvbywBrGIycZsBh95osJXcXud9tiDeS X17o6exxDySJSIUTNEpOBLEkaF+dd++Gucq1Mr1ggKCZfpSwSOVT472srHmd7KFs9A7D bX5Vqd02i560edyOP+92si3OMFOvD+wb5B+Cnz4kQ0dYWsug1UvU1QBG1WwKSZdc4dH2 eBldHCh2wPyWK38ivvecMr8/AAhb8laXsqhScJKCT4TvLu8ngTfwmUFMDzax0yrKrlWo iTlEfFNVuWsEqfxrlf0qQ2Fu21WuyHQYBRMWzBePpjPjTH46f4ZlcsCje4nbRebNYTXo U6jA== X-Gm-Message-State: ACrzQf14484S1QvVFc4QWVR5sWJKq87BxWYvAqNkk7KRmt94dbtQ1u/1 NLwLZfTgw9kYxl5zSvRoQlA= X-Google-Smtp-Source: AMsMyM6j+quBbDwCyDVxQA3IeiyLmZ4JM4w+W5iObRCO1d4S23KJXTo+64fk2KDE5WOb14UqB5Y5Nw== X-Received: by 2002:a05:651c:222a:b0:26f:dc76:a5ee with SMTP id y42-20020a05651c222a00b0026fdc76a5eemr5767436ljq.242.1666290578508; Thu, 20 Oct 2022 11:29:38 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:38 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 2/6] staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration Date: Thu, 20 Oct 2022 18:27:42 +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" fix checkpatch errors by refactoring 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 f9d0b00d7cff..01e72999831b 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -188,20 +188,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); } @@ -323,73 +332,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 Tue Apr 7 23:57:53 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 A09B7C433FE for ; Thu, 20 Oct 2022 18:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbiJTS3v (ORCPT ); Thu, 20 Oct 2022 14:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbiJTS3o (ORCPT ); Thu, 20 Oct 2022 14:29:44 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A08220C3 for ; Thu, 20 Oct 2022 11:29:42 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id a6so500137ljq.5 for ; Thu, 20 Oct 2022 11:29:42 -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=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=V5uouJkpXo5YnGqGgm0X4G5fN6kZ5qa5JO5BKOHgyw6b6My3uSgebuqkfEtuyI9g8m MRl8i9djA2KT0N0JN3+AsL02bSHPuq/Fim1c/T50qdtFiESqbJ8ZGzplULQzxl1K9FOm cXgQvv8E7N1WztPCjaeUm2/6j4gwvotKrQSA5LvMq6mf6P9HFLZEWGf0OUSh2XktiLnI FBwaedOmH+c7qblmFCZKoMGsbZaZJNNp9hYfFoKQznQXrIWB+aPwt4VuAU7sLv31Ox+H Ri/28C21aMqlMefY+RRZY48aMVM4pfZBiO9IGvy0DDNKqb1lqQAhmTgE0T3D+sha6Jvl 0itg== 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=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=nIAL9c7qbpgPRCRNTPpOlC2foS9MH+PxJ3c5NnJi2oTz9Xp2hDpWPP4wE3GZOEpZYE edqUN8PJ3VSMVXfR3iNC2iuuQNj5s8cUYesSmBj8gwxrMfRSYXfSuN47WHYbaeRq2Zqb lNdVl5021M39IBKVgP/ko9WStww3qVYpGEbjpMksrRTMQ+h4rLo7p49B9eAYWzebb3Yj X7L+EG3BmhGX9TMYQxEMMi0oY3MmI/5IPOgGwmlOrtuW+IJ2+5NG21IiqUEp4+JDd1Z9 JMenN32e66Vfb+hau7PP3K3EygOfhCg4nC5rUqtb2lt98mNDSp4WD+FKTMN0QW9MneI0 MwpA== X-Gm-Message-State: ACrzQf1SFZWNiWrw7O5zV4xNIlW8+Xh6dINXYWTZpPFFT4hWG4a7bfHO nKfQM1A6HesfEJWsM+n3zD4= X-Google-Smtp-Source: AMsMyM6VwEgu16/pFiUhrpMANJF6xKbtWEFYS0CB5CzFpgoCmCg9Yj6V882nb8ISRVJm6nmUmDmFCA== X-Received: by 2002:a05:651c:a11:b0:26f:db4e:e7a6 with SMTP id k17-20020a05651c0a1100b0026fdb4ee7a6mr5468084ljq.361.1666290580639; Thu, 20 Oct 2022 11:29:40 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:40 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Date: Thu, 20 Oct 2022 18:27:43 +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" fix checkpatch errors by refactoring 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 01e72999831b..dc853b83459b 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -484,19 +484,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; } @@ -509,14 +518,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); @@ -534,12 +558,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; } @@ -555,10 +591,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); @@ -576,10 +613,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 Tue Apr 7 23:57:53 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 2C29CC4332F for ; Thu, 20 Oct 2022 18:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbiJTSaD (ORCPT ); Thu, 20 Oct 2022 14:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbiJTS3r (ORCPT ); Thu, 20 Oct 2022 14:29:47 -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 AD5CB220C3 for ; Thu, 20 Oct 2022 11:29:45 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id j4so1002426lfk.0 for ; Thu, 20 Oct 2022 11:29:45 -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=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=Qd5U4LiDXA6FuonSe3Y4QdQO30sUdfBCSDiezwfWqixsQ81peTxRnkcBkhgo18/HnS Fecne8UMUr8/wm/DVZgB5BqrxQaj/5K1+8Nk7oL8/YEP9FQTJF4BsEpESNdMgV/npoa9 3rlvBgyS3S/hvOrlrpempdjEQIzHA/JnXq243e1i05vt6GRClKGaVmmyPU0H6YzclNQu O1NFckB1dt/2WqEf47XvSWsTtppo2nsXfTvQYpU3jf1uvlp8S2+V8RAGqfyZAc3p2DbM goebqfokRduLAbW8SaoyF9r7xEnzFEry8x0oPQASP5mUX2SOKUcC80g1PZx5wpOlbr1i rjRw== 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=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=R2PgooDM577nd5Be8YmsfausPp0xbELvtXsTn59Eujd9c9gwXxbrnvnpvSOWU3RFdK sETtDUBZpdTGwaLtbIUT7Em6fYI1tj7bgn1ucx/HADFkrKgFd3ZvFTrekIJJQLIsSqCu 4qZAjGMe84hBHDf7Ys9UeziMISSSkYPTTCE9WakcTJJjaszy1NVfox3bcDAc7PIkRVii l9E5XzrfYmxpZLB40wmcM2IO4I1Ay2+KI6TxdSDHwjhLgou5FJotPSAXiiUnv2J9vEpV 37SI3qycOe9nSUodyMztd+SsQMOqqSdF+nfQv6hOCULVdV6AsboUoFf6L/VhCs7oosI7 p46g== X-Gm-Message-State: ACrzQf1WAC7quZgWXPfQi0Pd5c52RYQW7FsbU6BG6jwsLlf5s3OUeBh0 5giXblmasMndtLkL1lISzU/vRLH4tdrYgrQ5 X-Google-Smtp-Source: AMsMyM73Q8wIFXFHiDUNsnAoDrIilohOmQDGU70XZXMJFKoveJIa8SKAr4mAnY0rK6ny9g7ZEcUvHA== X-Received: by 2002:a05:6512:487:b0:4a2:2977:3a83 with SMTP id v7-20020a056512048700b004a229773a83mr5476069lfq.88.1666290584010; Thu, 20 Oct 2022 11:29:44 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:43 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter Date: Thu, 20 Oct 2022 18:27:44 +0000 Message-Id: <03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.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 by refactoring long lines of code in the function: s_= vGenerateTxParameter Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 22 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index dc853b83459b..42f4261293ba 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -839,7 +839,8 @@ 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 */ @@ -878,7 +879,10 @@ 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, @@ -964,50 +968,72 @@ 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, cbFrameSize, + 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, cbFrameSize, + 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; + struct vnt_rrv_time_ab *buf =3D pvRrvT + ime; =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, cbFrameSize, + 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 Tue Apr 7 23:57:53 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 0A3FEC433FE for ; Thu, 20 Oct 2022 18:30:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbiJTSaL (ORCPT ); Thu, 20 Oct 2022 14:30:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbiJTS3t (ORCPT ); Thu, 20 Oct 2022 14:29:49 -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 D484541502 for ; Thu, 20 Oct 2022 11:29:47 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id g1so821337lfu.12 for ; Thu, 20 Oct 2022 11:29:47 -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=H7IxJfQYGufvahI+8q4Dz6LMvBxctykZ1GGtydHvATw=; b=H7967F9S03AMlK7QJoC47R/2WJIfJoAexwxCmi3WndYfREI0b41xaKhbDKoUG9C464 I5Ws0NmJPdUV+IxMoASL68O2dORKinmBKaHwlu0tmD6GgvyUWNiKJcKTuKiUM3jgjnr5 F9VG1sJK7TyT/l5m0XaQrsA3StWc5d4hufaviC2FE8DcXiSZSVPXutt1O9JiMByz0rTG 7TdH56bdoQuLev5ANjGjhekLaO5CdSbpo3C0r/iCSDkgATSV0ognzKMhsZgvxpqkQX33 yEyAXCjPtlEZUu44Q0uP+dzrKsQuceq0QdG8G3PKmu9Q5LiPOoNxrUBXHh9XgcgOJ8ru Vx8g== 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=H7IxJfQYGufvahI+8q4Dz6LMvBxctykZ1GGtydHvATw=; b=GRY3C276KaSYj7zL/JBC0BUTjGRJnCnehIe+6YTewjHqPXsLELom30TLATVLwP/5Rq wn6eZ6NUQSU9EmF/jcBLQy/Q9XhN4r1wkSCgo1S8lbgk2GMuHJGDUetzEgyBB5HWNe0f tEfwGIzDx8lXicv2xEQe68MLdsyDN23hRbF3sLIcBnAlSiCa6a+3b4IijUrXG/WPher7 zw80CAGe3ELBZFiN+4lDdq9OUzDrRkQt0UaNTA0F8G4iJ4xrVxqZ2jJlroAg5P0Yj4/N oGHr2J82Bh44orYm7iMW0q89iVO+izOyl+6baH6Mwkbdj2zKYl/j60AK/RoFm3X/xvgt XaxA== X-Gm-Message-State: ACrzQf0jqXjWXlY2yhxm+0qI88ISOsHX/UFptCHoiI3Rqjm7cp2leDx1 mWoG1R+EfB6/THN4/s9nwmHBjYtjXbUxGZZp X-Google-Smtp-Source: AMsMyM7kJye3P2KI77EljgQUEw0IotfVBUMK0CBpL5EPAtdjGIvxOHJogv1N4zTIidIbDVlARN+7/Q== X-Received: by 2002:a19:a406:0:b0:4a5:feb1:af0d with SMTP id q6-20020a19a406000000b004a5feb1af0dmr3208221lfc.401.1666290586194; Thu, 20 Oct 2022 11:29:46 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:45 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 5/6] staging: vt6655: refactor long lines of code in the rest of the file Date: Thu, 20 Oct 2022 18:27:45 +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" fix checkpatch errors by refactoring long lines of code in the rest of the file Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 105 ++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 42f4261293ba..b8b21cd39534 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1106,44 +1106,60 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsi= gned char byPktType, 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)); - cbHeaderLength =3D wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g) + - sizeof(struct vnt_tx_datahead_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) + - cbMICHDR + sizeof(struct vnt_cts_fb)); + 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 */ @@ -1151,19 +1167,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsi= gned char byPktType, 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); } @@ -1171,19 +1193,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsi= gned char byPktType, /* 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); } @@ -1198,8 +1226,9 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsign= ed char byPktType, s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvR= TS, pvCTS, 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); + uDuration =3D s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, + uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption, + pDevice->wCurrentRate, is_pspoll); =20 hdr->duration_id =3D uDuration; =20 @@ -1447,8 +1476,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv, /* 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)); + 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); @@ -1463,8 +1492,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv, /* 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)); + 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 From nobody Tue Apr 7 23:57:53 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 0F495C4332F for ; Thu, 20 Oct 2022 18:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbiJTSaQ (ORCPT ); Thu, 20 Oct 2022 14:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiJTS3w (ORCPT ); Thu, 20 Oct 2022 14:29:52 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BABB50FAD for ; Thu, 20 Oct 2022 11:29:50 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id bp15so809900lfb.13 for ; Thu, 20 Oct 2022 11:29:50 -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=ZWh3t522ptergEdRtDg24Vu5gqW3co9XQ8DD7IBqLdo=; b=aYGnchK9a2xDJ1retDATpQXkztTjuwN+mKYEt2yPgGw4fdLK2AKdEdJnjt0IfVq9lz o9Kdat2oekIuT+8tcrkU24zxe/nMslCR+aF/VzEp1/4Ci3Bwn0Jdm+pc2VuMTc70LRim NJJQJ9nCEqaqMS55YdPODP9z7WHbt6u12hhOyZAVf78lf1yLxxA9iqYgJf8NNIHa9h+H p6UK1fO8voEXHlOYZGOZJQ4j/Nt+zFll7189p9D58H+Y/c7KMSPozukhX7vjnt7+Mf4u Ziqkuv48+9hTxyEZ8zLwMgom6+IPgD7phLtnikFpizk4TZVHPX2pTzJohtNw+uAWj3gX V26Q== 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=ZWh3t522ptergEdRtDg24Vu5gqW3co9XQ8DD7IBqLdo=; b=mJ0HrC6yutJSLJxSsip/8DIhEkvIlWGirSnh4zfiAAIiQmW1ZSep2QZKY6uRD2qmpI r8SBfzjJqSUjmtTuTF42vnSLI7hBOT2M4W9oJbU7bEYq75EfRZUGQ31uVmss8QngRRHm Jz+ynPxzCqAe4imrE8h/U4DMUO+iudJmOd9B3oK4jlNYRq2G4o8SEAVQisusCE5a+ZuY cTIXeUxUB1XI15MM/Um41S8V0y5pxMKBagj4HZAnjy1skx0SDG6dnRBWU/17eB9E6AaG K88ZcariN1/OnPley42rXsVKHyxufPb6Zfu7ecF6UcmcyfMvzUKJ+phI6VpcsjkIBEvq KpGA== X-Gm-Message-State: ACrzQf2p6MsMHrDUGxikqUsBBAuryxOTUyummBXvNfWTn2iDrCSJIGgY uCvGKLXDRyRAZJTuNnu+ThdSmvt7PoEhnU+4 X-Google-Smtp-Source: AMsMyM7p8zbGowZciMAA4I0/fu751l9NpSzMEqKdwhN1ku4x3a9Xw1lO4NgirZNwEk9OGwkvwl00Hw== X-Received: by 2002:a05:6512:3b13:b0:4a2:564e:6cea with SMTP id f19-20020a0565123b1300b004a2564e6ceamr5137022lfv.242.1666290588683; Thu, 20 Oct 2022 11:29:48 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:48 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Date: Thu, 20 Oct 2022 18:27:46 +0000 Message-Id: <3df55cf2362694891a311692eb63cc19913abf01.1666288416.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" join unnecessary split lines to avoid them ending in '(' Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index b8b21cd39534..d997002ee9ff 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1301,10 +1301,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); --=20 2.34.1 From nobody Tue Apr 7 23:57:53 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 823D0C433FE for ; Thu, 20 Oct 2022 18:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbiJTSaV (ORCPT ); Thu, 20 Oct 2022 14:30:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbiJTS3z (ORCPT ); Thu, 20 Oct 2022 14:29:55 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29B861B11 for ; Thu, 20 Oct 2022 11:29:53 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id c20so480583ljj.7 for ; Thu, 20 Oct 2022 11:29:53 -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=RswLkUQZgOX210lwrclExJv9Imy6Jbq5VPuyg8KfHoM=; b=ky4WgJ2sV1PKnE8V5sQnBnftORIfi49y4SjH4oUyu15+Z1iit3HvxuvXusNDPpkC/P 9d1d+8xdpZqzETTAoyoa5f9T2h7q+hFRwgvYnXJtNyh14QkZ6hLaki+k9bcSOsWR6oBh RMOMdLpKGbwWdpN0mIyTy1cNFDY4pfsF1IeM5IZP+uZxr/dincFH1s8x6EQ7Bt/PZz3F UZcIiJjlojYVBxPXAyC7Xljk771vVl5yfBf6PFncSz6y4qr1FzSE3TXZXSrBC6V4f3ZS zEVKicD4gUs5YRhi6DX6X63eyFOaex+IQhBDBVQvqCAC3+8nWZRg1SuzCDMl5rw4trh/ oZMw== 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=RswLkUQZgOX210lwrclExJv9Imy6Jbq5VPuyg8KfHoM=; b=Yz86uXKCiuD3X5ZFOT4J12lgaBVoP40VthnD3EU1tU4/K8ZcTnA9JtXatbbRJnilIU RjHH3b30CJ3yZNoTxSZuZDrj0N2TQ8DcBVO/q0mHR8hnUywNIqMw4vighKwzgP6uvjQb 5I0tw5+JS1FlrWVkAPUAfPaTJ50C7vyc/BlBcqc47wPt4/6Fz38xEHZYxJU7nZCVKoAS H4tdn32PtqN/mj8oc1lSKf7n9QKjoD/GkgeNZnDyKP6vl2CZTfZKdW7np93KDb4FNrTN RAZvrpAReYQqeExAtw/cjoacbr3/Vnkc5sD5I0Efw2pOCQr7N7V6sPVA6pqzrTTwHabj 3LMg== X-Gm-Message-State: ACrzQf3SO+AKroePCCdigk0wdjEoC6k3k6Wo8PRajlh0y6/LmVV5tCDi Ltz/mNsnjrU+BgzlNbmVXu8= X-Google-Smtp-Source: AMsMyM5HGU+/pes5W2kxsVEOQOmXCwax5PtNMYm1egRpzn5Dy8X2bInzQVHGLH2Y8GyAV92LNrl3vw== X-Received: by 2002:a2e:b0c3:0:b0:26e:6617:ed08 with SMTP id g3-20020a2eb0c3000000b0026e6617ed08mr5135924ljl.120.1666290592079; Thu, 20 Oct 2022 11:29:52 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id h10-20020a0565123c8a00b00497a3e11608sm2797216lfv.303.2022.10.20.11.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 11:29:51 -0700 (PDT) From: Tanjuate Brunostar To: forest@alittletooquiet.net Cc: greg@kroah.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v3] staging: vt6655: Fix Lines should not end with a '(' Date: Thu, 20 Oct 2022 18:27:47 +0000 Message-Id: <20221020182948.14982-1-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" Code style warnings reported by checkpatch. Improve the layout of a function header: Put the first parameter immediately after the '(' and align the other parameters underneath it. Signed-off-by: Tanjuate Brunostar --- v2: put static and void on the same line and adjusted the indentation as suggested by Greg KH --- drivers/staging/vt6655/rxtx.c | 78 +++++++++++++++-------------------- 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 5bdb5176772c..1e5036121665 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -85,35 +85,27 @@ static const unsigned short wFB_Opt1[2][5] =3D { #define DATADUR_A_F1 13 =20 /*--------------------- Static Functions --------------------------*/ -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_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 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_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); =20 static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, @@ -121,22 +113,18 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsign= ed char byPktType, unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD, unsigned int uNodeIndex); =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); =20 /*--------------------- Export Variables --------------------------*/ =20 --=20 2.34.1