From patchwork Sat Oct 22 07:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 7131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1087058wrr; Sat, 22 Oct 2022 00:35:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4B/Em1+XLXxupQcdmaK5SN2L5SUp2Ey3jmUBKSy9clByoAXsKghTmWd8dhnCpWJDzMd0u7 X-Received: by 2002:a17:907:980e:b0:78d:b6d5:661e with SMTP id ji14-20020a170907980e00b0078db6d5661emr19141476ejc.46.1666424111353; Sat, 22 Oct 2022 00:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424111; cv=none; d=google.com; s=arc-20160816; b=0iSf3BF/v5V7OO+0b/OEA8HE0ssU2P2LgHIp8dNks030jy+Ea0tVUyeR2+PN2PjhG8 mRt6feW1X/opSGPdkZcFcG7MfdlV1Fkils5Heu0ELZoivtTrY14b/81X4ERFBUVUqF+4 sgYNWsnJ2TxWanURGrXMGl4NfRegavG7RzzJTKKfuevLhXZG4FRmKduKsZxxRoxHrce1 /lLXu5nSEgFi3Kxc0nRR2ESzq6YVpi9ABENRQlL/QmH5536AgYF20CuKMFp0NCQ7h3bZ +Q/Z8rRhiGR79B7rdNqgcUoAXjrbp461GNEIMfDL2X5zvi8EDeXvy1aoKwZFnAUloPU3 tBvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0vK0LqI42j1feZQYGTo54nlQs1yB+CHMNY80qJ318mw=; b=lPhbKWBH9VTSmtxuOevs14Cg0fgDIATnD4lBPyjq7LNVqHvB8Q/BQGkympcDwOqjLu wnRwxuiXD4MtQIS1QGyfN2lw8MjazA+Sk2W33oDkR+v5jEPqRFfQmG2v64KFsQk3TWCZ LunwwyXpwYabiizr6vljyXHgIYVvn1dRkud2wmgrSIsEodbifdKhZeSdXcyxb+x2wRQC GDbiBDKGqcu7ZF9T3E4q0eCvJVW6srG+fYr1W1IsS7lGS+eSViCF/fd4xkCzwsfow8zv inZpG5kx2WIh4OCiinkNsARMVNBIgaKS26PbHF4fsy4KdZ6EajrDQQmif5WklEO8+cXS J9dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kFa016fe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc11-20020a170907168b00b007269ef1872esi25863586ejc.897.2022.10.22.00.34.47; Sat, 22 Oct 2022 00:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kFa016fe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229810AbiJVHHM (ORCPT + 99 others); Sat, 22 Oct 2022 03:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbiJVHHK (ORCPT ); Sat, 22 Oct 2022 03:07:10 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9686193EA for ; Sat, 22 Oct 2022 00:07:03 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id a25so6573769ljk.0 for ; Sat, 22 Oct 2022 00:07:03 -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=kFa016feSfxQ/pXKCHTLhFHzwa3i0Is7n1NUFuyHq43xYdEhm8BbN3uUIjK0xVh1D9 l4uYGFd0lXS2Mjrl6MJ7jtxuzS0qC3kgbK1CNWiZGq9zMw/sLQMAqt8+w8pvRkIgZkl6 2Z7jd1dLoGOS+JZsfZglvJiCmHXxYPTcQRApjWnugeEmFRyCEH9ChA7nPratv+gwtuEa Oom04WnQ9DWqrnNh70hC/XLKqZ8lu2CRIyc3P0PExqgCas2mmTIfQ2uFTX2yh6yS9kmp l3/FMuVUTSqkK7APUeRYh/Ds66WfDRwo3FKIbUCKcrBtmhkTEF2GzfYxB115gmQbcCIi YaXw== 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=z0N6eE9Vj1vkUYirjJb1DBRquhqYruE1L+OMWJTEdw0MXu1hmr82AnjKpwYEETEZNd PF+0W2XTM1yJ6IB8MiUTj8mfRcryEzb7C1XAtf/Kesae2l79w+kABi0eM8POSJ14NFa8 SOBrHMW/CuGOI+sH1u0jblN1eRxhBWM8nDe99dSLSWyZ5tIItFK5iH/e/5v2RT7m4eRN yFKqxB+faRk18djW6tdu7YCRjKQxB/6Rooba1sUrTKYGR0Bh6k9yXOYVaXouP5b5E1q3 9EKkKGOR0q/cxKDF4Ba24XV2mbK6RjeM/vnpjVxl1vCSMF2aAvMeRHcg//DrqEMwb1jA /+Sw== X-Gm-Message-State: ACrzQf0l6OHaZV93T/d62HIsnT5lmwwgKwqQ/okATqBJIcJfPzbmYgNk ppPBXmRG4Dt1JdKpyQxfY81TLnlgPyrgbwPz X-Received: by 2002:a2e:a591:0:b0:26f:c3c7:be64 with SMTP id m17-20020a2ea591000000b0026fc3c7be64mr7932444ljp.97.1666422421619; Sat, 22 Oct 2022 00:07:01 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s5-20020a2e1505000000b00276d2537921sm390404ljd.59.2022.10.22.00.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 00:07:01 -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 v3 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Date: Sat, 22 Oct 2022 07:06:09 +0000 Message-Id: <20221022070612.13009-4-tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022070612.13009-1-tanjubrunostar0@gmail.com> References: <20221022070612.13009-1-tanjubrunostar0@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747372329103196933?= X-GMAIL-MSGID: =?utf-8?q?1747372329103196933?= 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 *pDevice, } else { /* Get Duration and TimeStamp */ buf->duration_a = - 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 = - 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)); } buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); - buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); + buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, + pDevice->byTopCCKBasicRate); return buf->duration_a; } @@ -509,14 +518,29 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, pDevice->byTopCCKBasicRate, PK_TYPE_11B, &buf->b); /* Get Duration and TimeStamp */ - buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, - pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, + cbFrameLength, PK_TYPE_11B, + pDevice->byTopCCKBasicRate, + bNeedAck, uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, + cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); @@ -534,12 +558,24 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, byPktType, &buf->a); /* Get Duration and TimeStampOff */ - buf->duration = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f0 = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); + buf->duration_f1 = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, + cbFrameLength, byPktType, + wCurrentRate, bNeedAck, + uFragIdx, cbLastFragmentSize, + uMACfragNum, byFBOption)); buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); return buf->duration; } @@ -555,10 +591,11 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, } else { /* Get Duration and TimeStampOff */ buf->duration = - 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)); } buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); @@ -576,10 +613,10 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice, } else { /* Get Duration and TimeStampOff */ buf->duration = - 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)); } buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate);