From nobody Wed Apr 8 21:17:05 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