Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6579041rwi; Mon, 24 Oct 2022 03:27:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6OYCWM0e3CXopl5zyi1ol+NZyAm/33XvQ3u61Md5lVJc5/67tntkL5gL8ug2yc0pBvBJVz X-Received: by 2002:a17:907:d03:b0:7a2:d213:de18 with SMTP id gn3-20020a1709070d0300b007a2d213de18mr7910230ejc.124.1666607268289; Mon, 24 Oct 2022 03:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666607268; cv=none; d=google.com; s=arc-20160816; b=mn7BMITdGrrZ4SytpjJTWo1V5uvuqMCBpn8dPuxw+2wmh2QsmHN/fCKw9DuXv63yR0 B4DpcFKQzFjfzNjJ4sXXIBmhR7OuvDck7CS6xO4Xo5AycsYxYvWbMf6cmQEGKJfqfGPN yN2DN1vfmwYkQK2v0dNbhWR5y36URaZhtaEjD3D4SMHpd9Bx5OZ0DGNRv1mFwWBgeT/v BoQfIGKZ/MU6L0VuZEXW2XOmvrZlaboKnTau1LOA2tuxmDI1dZ9w1T90ccCmOCvyqmY/ GLA2fNe6Ez9AxbyvwNNOPrkrG9EOCsHvyiSwRlC0ohqip1Qu+/tOAqkXSqxy1IBpDOZE 4ubA== 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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=nYa5lpyF0eN6lPlgZavkFI67eReBLdGg1Ga7j3wdhjYF16Q7kcZ+WJcmBxF0ts2EhL vmaYsqthY2YqiH9X//9jyYGxkkADiMiYCIG0zb13APQawzEnh/vkFxRkVwIVsdwTOIEe /YDTkj4DzbSRscQ9Ehr/+xPpxquyVQSFh2FHkU/d8MQHQT2cDqm0gk0SmeKy68NsQRSt W/Ke7xSk6oPwS98sWejuI8JZ594oYWbKinDn/eJTF9RlkN/1kPh5jGaNESuGayYFji0C F7pZ/MKvnn/KvGX166u+QaLWaAvjpk6QysbafWJFWug9h++NJb/5ay9g8MUWPvjlD9tf z8MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LyD7DulQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa44-20020a17090786ac00b0078a10c159b4si27895434ejc.290.2022.10.24.03.27.23; Mon, 24 Oct 2022 03:27:48 -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=LyD7DulQ; 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 S230398AbiJXKCl (ORCPT + 99 others); Mon, 24 Oct 2022 06:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiJXKC0 (ORCPT ); Mon, 24 Oct 2022 06:02:26 -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 7658A5A144 for ; Mon, 24 Oct 2022 03:02:24 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g12so5331193lfh.3 for ; Mon, 24 Oct 2022 03:02:24 -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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=LyD7DulQtLdUdHohPQKOb++7jgZC7o1sGM7lrig+76akqITG0iDH7FAP3HkCdQlzT1 iTJMlw2vI61xH4z7Bc6fglS78X6RdvkVHvKmXDR6gkwaVuTkw7Ux3NrJb3T9f/ABOiLN e8PakEHHEJkZSw4tZo3TwsM4Ns/DMufyTMcsBAUGVG5MppUie9kUbuVgxJBYR13oYOk4 XsmpO7N07jxqeyNAAedz5MlmlYn1Ic6ELmri0ySxcnL2ZYEqSCKLpvZrS7vyYIMkNYoO nRi7i53jS4oxBPa6OcQHApRUno8R2HvAS3U1E4hWdptm4qjQl1yeyDj4i0TtyPEd6dck SuIg== 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=c9xsV8c/rBmZYI1wjay++VlFqX2UEzreuAkhbJUXoYI=; b=I/OezysgSi/jxd6rZVH7txyJjJMsgO69QFgXAkSaWyp+Z7SvlawxJmaa+/rWyvzZzC 9gGdHElsIFfBz0u57Htv9jGurAE3iZ2shylrByRG1S+JO4FWMn/mPwwgLtfNFkVzb7Bf RetJesUSniCqmuenlBENxvifHinOD6L71jOFSSWV0HVFeR/3Et/2ZiFTxS6Snf5CmvBw JaO163e6u/jWfQQ9pT2a32CljPcaCQBZ24g9KoY5XuuCMvOWWcpyoi/SadZPe4a4MgC1 r5EB6o/M0CrFpoAEUCaqXfl5xLhkc28JQmMyUCc1lMftbZEVDc0jl1xLb+xvXe2mVLMq imgA== X-Gm-Message-State: ACrzQf1LhTMdooWj1SqCjknhySq8CIXvB2eFwQi/SncU54f8MKKKbNci SWcbPfK1+9I6YjkNNXGkq1Y= X-Received: by 2002:a05:6512:108b:b0:4a2:a253:5a90 with SMTP id j11-20020a056512108b00b004a2a2535a90mr11868424lfg.593.1666605743714; Mon, 24 Oct 2022 03:02:23 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id s9-20020a2eb629000000b0026dfbdfc1ddsm4896832ljn.11.2022.10.24.03.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 03:02:23 -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 v4 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParamete Date: Mon, 24 Oct 2022 10:01:50 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 fix checkpatch errors by refactoring 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, } if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { + if (byFBOption != AUTO_FB_NONE && + uDMAIdx != TYPE_ATIMDMA && + uDMAIdx != TYPE_BEACONDMA) { /* Auto Fall back */ struct vnt_cts_fb *buf = pvCTS; /* Get SignalField, ServiceField & Length */ @@ -873,7 +875,11 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, ether_addr_copy(buf->data.ra, pDevice->abyCurrentNetAddr); - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */ + } else { + /* if (byFBOption != AUTO_FB_NONE && + * uDMAIdx != TYPE_ATIMDMA && + * uDMAIdx != TYPE_BEACONDMA) + */ struct vnt_cts *buf = 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 = pvRrvTime; - buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate); - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, + wCurrentRate); + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, + bNeedACK); + + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else {/* RTS_needless, PCF mode */ struct vnt_rrv_time_cts *buf = pvRrvTime; - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate); + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); + buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + pDevice->byTopCCKBasicRate, + bNeedACK); + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, + wCurrentRate); /* Fill CTS */ - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, + bDisCRC, wCurrentRate, byFBOption); } } else if (byPktType == PK_TYPE_11A) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else if (!pvRTS) {/* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize, + wCurrentRate, bNeedACK); } } else if (byPktType == PK_TYPE_11B) { if (pvRTS) {/* RTS_need, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate); - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, + wCurrentRate); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); /* Fill RTS */ - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, + psEthHeader, wCurrentRate, byFBOption); } else { /* RTS_needless, non PCF mode */ struct vnt_rrv_time_ab *buf = pvRrvTime; - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, + wCurrentRate, bNeedACK); } } } -- 2.34.1