From patchwork Fri Oct 21 10:33:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 6625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp621837wrr; Fri, 21 Oct 2022 03:42:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5573IT4dfek+GuUg3/TNe8TG3+j9Yvd/YXSeSdxxSnj4kuj8OyugysPss14BlHNuB7KRmG X-Received: by 2002:a17:906:dac8:b0:741:545b:796a with SMTP id xi8-20020a170906dac800b00741545b796amr14605143ejb.240.1666348928210; Fri, 21 Oct 2022 03:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348928; cv=none; d=google.com; s=arc-20160816; b=Vp4lNQYRPad4FUbNaHZzRAangO4qwPqhq3wrpok9TpHrbwxQg1yF24Qpr8sibfVSj2 MyaTfWL2VUpPC2rkaZoFsUZbbQL77rcmH+o7fcSGo8u3n+goc5HCYW5HzlHAEJcFyaXK Rvw3xGY1Ngi3ObkhTsM8RzVzkLWOM7T1DxOwliZv/AfenYkk1EvN+DU3Qpf9ZtBJSi7a OUb3mp060XQwRfR0h59A4IF1uT9JRU493fCA36HDnqGCaoSI4XfmE81Tjj1ZzqbT4tN6 mFUAKJ/ZWtzC+B3vH64DrF2KeR8ubSHWbrpLCazwAwIupCLVgsNnDD8CMNx0RICDfJ1t tmGA== 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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=m6NW0nYYzkerVobK8m86hIWLSupgqmKMvycUNOGcyp+20TnMxYBUJo9PE8tLew8/cQ 73o9PksYC502nM0U6qtiT+oh1ve9f9rMrMF6J7U8WbWKGVuVskg0EHGgOGPWOxLzIdr8 Ekrz0FfuYmqy/G5/KFlA1MlZjIYwDeCbB2Lxrzc7qw+P13WPR3hWw+Kd0V6SQjU651AI NHa5I/NXF/yj7hjB9Zce0TMuHzl1a/I/B52jFWD3CEcuOXLzfuucRjxpjzOWPn99RZmO Oj406epV/KwyzOFIwzm218XsZtg/sPaiqroxM890KvpfZZgqPg4cuntcMOyxwgXmjiVj dpPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oXKd4wDB; 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 o7-20020a056402038700b00458bbd3a0d2si16972314edv.602.2022.10.21.03.41.43; Fri, 21 Oct 2022 03:42:08 -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=oXKd4wDB; 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 S229854AbiJUKd6 (ORCPT + 99 others); Fri, 21 Oct 2022 06:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiJUKdz (ORCPT ); Fri, 21 Oct 2022 06:33:55 -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 5A4A825E083 for ; Fri, 21 Oct 2022 03:33:53 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id c22so3107526lja.6 for ; Fri, 21 Oct 2022 03:33: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=4maC1ewmpW31x1+/ZutwiTXSSsedpc4aQ1ME2Ogiqcg=; b=oXKd4wDB4DD/B7gLaHv7Sl4KmCGo/s7JNBHPkGWeTn1KXyppLpoDNeyh81FZ/S+KBP iHnLMTZfX8VFAlqzAqRCa+qdkQASbBnPF/BxeE7Axd/8k2/8QkRl5RmrE2seoIDqtyYS NkhUtf092/lbBTYj1NbLpvEjvtuBgm/MtFqxJsr2jbesiph08v7Glk/k4bqludHQPoGC 6yrTdWsSohuuwLSzGFaw7V8UDNhl2DQbIAR6p86fnmmQgk3PcbNARsUdnWp3BvxJU7gP u9UDbwEGnzikWQg/QLSEN7GdlzlXFTAr6ranmxWm1ElSdAuK0cEEqIZucl9IuMNs2q13 /kDQ== 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=x2Mh++Fc1G8ZvlW1QCNXhxOsJ93Xj86OUXPtzPUDE//gr/wjKGWOWmITivBX6J1KiQ 9+xalTu58MZAycNVK9XWKGTXtwSeo0wxpgFVQqzel13KSjjtMUUNcLhJXJNM/s8RK+8s ISBbPBsoxIZzaeGtK8RycvDLFSwWHBQsh/jR/y/MRYJIAtaiauoJQxnYFf0K0h30Wtv4 dd71m+4VL9nfoJQdUHnCp9CKa0TO/+vX7i77gh9eY4xxQgdvFdqPeBYDHG71ApT5FtHK GbXJ4xA5tmhggyeD+js4naE+qfa40PF7xKM/ZUYj6PvB73XZ1l9wQAPLlIaLu0IIYAIs txbg== X-Gm-Message-State: ACrzQf14McsS/lKBdTHuRXEM4hwvzXytIIkRZUJvrBRGwS/3wJAjvmgQ wawenwoKgPAEdmCbCkNV7iI= X-Received: by 2002:a2e:4c12:0:b0:26e:8e13:9378 with SMTP id z18-20020a2e4c12000000b0026e8e139378mr6358920lja.336.1666348431661; Fri, 21 Oct 2022 03:33:51 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:33:51 -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 v2 1/6] staging: vt6655: fix lines ending in a '(' Date: Fri, 21 Oct 2022 10:33:05 +0000 Message-Id: <46a2791fc89f4dc299162418ab304ab821e494fa.1666347511.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293493555304681?= X-GMAIL-MSGID: =?utf-8?q?1747293493555304681?= 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; @@ -215,19 +213,16 @@ static __le16 get_rtscts_time(struct vnt_private *priv, /* 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 = false; unsigned int uAckTime = 0, uNextPktTime = 0, len; @@ -316,17 +311,13 @@ s_uGetDataDuration( } /* byFreqType: 0=>5GHZ 1=>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 = 0, uDurTime = 0; @@ -409,22 +400,18 @@ s_uGetRTSCTSDuration( return cpu_to_le16((u16)uDurTime); } -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 = pTxDataHead; @@ -555,19 +542,15 @@ s_uFillDataHead( return buf->duration; } -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 = 20; @@ -752,17 +735,15 @@ s_vFillRTSHead( 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 = 14; @@ -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 = le16_to_cpu(tx_buffer_head->fifo_ctl); bool bDisCRC = false; From patchwork Fri Oct 21 10:33:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 6627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp621863wrr; Fri, 21 Oct 2022 03:42:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7gsi70dcDYe6ObgEQkB7FMUK+2RCYXMpoBvhQCramh1x5OHPCxyZC+RiymQx/sWCnSDP6g X-Received: by 2002:a17:907:3d91:b0:78e:11cc:3bc7 with SMTP id he17-20020a1709073d9100b0078e11cc3bc7mr14982278ejc.655.1666348931271; Fri, 21 Oct 2022 03:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348931; cv=none; d=google.com; s=arc-20160816; b=UdjvUigC7NvXKqELoX/N4W5Bv1A40eiQGIjJZaK3//LebtZAMUISvdto7OnhS1h69W UGhdOJxuV8P/MwRHtcf+HcXdWmM1grSFDzTodH8rIR1WYRFqA607RuKPtBQBqhYv2pbx df80TMbkt38czvuZgygSeF3re2DZwaTvpNQpFiQBssSRvOIQJQw/c9aryIcxJyz/+OpV XB3cQq69sUKSYPZAq25PeJfnkWArP/+za8OGMBVpI8nFW3rpnCX8itpWMi2SRjMbgGp8 CA6w8f9zb5SCJFdBVqQAIICyqlASvbY7YxZhs9U7dHPYqLeIzisET58SHXjOTOgsnVCJ Jb8A== 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=Pok2LECBNlMvrqXKyrI6aFwHhW7o05S9x0G8ryNfPC0=; b=LXuKN2pOmuTMm7A/Lq5AvLWiGZ6Bf89b0Q2M+8minmX8CmwvYRbv6IjXm4Jxtv7KEa aTCAJ1z0KhkNo64UmFK8CKE2tCvjV2u/fRkgeOaPFTi1vr9uSrs3A43rSzNKdrUFC+LT IO+pBqxfpEYxmz2/wwRVNYSsCcG2pOuHI0eWFI1bgXogusYngo0KjD0gyw63wZ0e8mn/ vHSC9NjCt2ePWri+SujSbImkGWfaDYIUt2GUQwgVSQs2IUkwLaZ3YwM+dJd/FF7vvKJm cGyVnN0DnAp+mkrCkym2VjGozyeuuX35HHKKO/QFybC0ZMBD6l6epTeJiAhRzUy6uVln p/TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E3Z59MDW; 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 qf38-20020a1709077f2600b007823754ecd5si21399889ejc.43.2022.10.21.03.41.46; Fri, 21 Oct 2022 03:42: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=E3Z59MDW; 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 S230127AbiJUKeL (ORCPT + 99 others); Fri, 21 Oct 2022 06:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230425AbiJUKeG (ORCPT ); Fri, 21 Oct 2022 06:34:06 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8125D25DAFB for ; Fri, 21 Oct 2022 03:34:04 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id a29so4413661lfo.1 for ; Fri, 21 Oct 2022 03:34:04 -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=E3Z59MDWCWG8EIeMNPYPfUZFC9KrMXJ6vTSWKJu0MqfDasGd5y4C5sfz2MMW7j4dEq 00Z3TP/21X4YEJnYWUGed3b1kp7G8fSlzj2T9lYllHm8oxmChagxzAE3JOWcocBvYDbi rMMVEh63dIlpJ4vzT1Bsrz+E4+KsOge/S7oj3RbEjMETR/j3fW22Ut0TNVz7AzB53bXm l84ZvAPycghw4efp9wr23fBLKJLTwbxPXyt1Ud90oQbwidh17pwJE1PumT51zT4q2D0u rE++TpnsafWK6yj4XncUMoZTZOi1oiqFbBAeibu2/A16Hqsq+OJoBzfKrpSGT7RoTzAV pyMQ== 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=lNmn0g5cVNliLwFJmM226FgD14JoTkeOGCchfeUrEgQO4CQb2KmMbFRnU2d5Cv8mcT P/g8WmhhoSzyVXZaTmKYQQ2ZNE5+byaTTCpdxazwNmdGhUkcdkyiL6dUKXsvG4c1X6V2 p2ytZZ7J4GA+RAiglcsaNVfA23Ig6qmRJ2n/RwzgClJ2ssTvKY2d3UpFpdA/kMaA1a8U tby56R9PYEQi5lNt6OAxqMtqyMGUVPDbk7mMuHnuiBHWN86yn/5hA1HPMUsv/OYm5LXY EAghe3Qd5zNLQAfo8u/9oPOk2FMk2I6eEnqav25fcOeR9gBKU0NjGa1L+M4SgOwuHj9t uYtw== X-Gm-Message-State: ACrzQf1jUN4CurLbs26xvxxchp4NQfuGz+DRr+UlFbsxlQDalulJYjv9 W4xy0Lq/egEHisVTVxqMJ+A= X-Received: by 2002:a05:6512:689:b0:4a2:5bb2:a990 with SMTP id t9-20020a056512068900b004a25bb2a990mr7109987lfe.619.1666348442785; Fri, 21 Oct 2022 03:34:02 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:34:02 -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 v2 2/6] staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration Date: Fri, 21 Oct 2022 10:33:06 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293497156147986?= X-GMAIL-MSGID: =?utf-8?q?1747293497156147986?= 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 *priv, data_time = bb_get_frame_time(priv->preamble_type, pkt_type, frame_length, current_rate); if (rts_rsvtype == 0) { /* RTSTxRrvTime_bb */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); cts_time = ack_time; } else if (rts_rsvtype == 1) { /* RTSTxRrvTime_ba, only in 2.4GHZ */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopCCKBasicRate); - cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopCCKBasicRate); + cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); } else if (rts_rsvtype == 2) { /* RTSTxRrvTime_aa */ - rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, priv->byTopOFDMBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + rts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 20, + priv->byTopOFDMBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); cts_time = ack_time; } else if (rts_rsvtype == 3) { /* CTSTxRrvTime_ba, only in 2.4GHZ */ - cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopCCKBasicRate); - ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, priv->byTopOFDMBasicRate); + cts_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopCCKBasicRate); + ack_time = bb_get_frame_time(priv->preamble_type, pkt_type, 14, + priv->byTopOFDMBasicRate); rrv_time = 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_private *pDevice, switch (byDurType) { case RTSDUR_BB: /* RTSDuration_bb */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case RTSDUR_BA: /* RTSDuration_ba */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case RTSDUR_AA: /* RTSDuration_aa */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); break; case CTSDUR_BA: /* CTSDuration_ba */ - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); + uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, + cbFrameLength, wRate, bNeedAck); break; case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopCCKBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */ - uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopOFDMBasicRate); + uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, + pDevice->byTopOFDMBasicRate); if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = uCTSTime + 2 * pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = uCTSTime + 2 * pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */ if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck); break; case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */ if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck); else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M)) - uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); + uDurTime = pDevice->uSIFS + + s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, + wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck); break; From patchwork Fri Oct 21 10:33:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 6629 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp622081wrr; Fri, 21 Oct 2022 03:42:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6p6r/PXPfSqkmp/iGQFyRZIH7oymLbEVE16kNHqIpLaUbY7KnWEzfBZPn0OcAlPsIQ57Xs X-Received: by 2002:a17:906:5dce:b0:78d:ec48:6a58 with SMTP id p14-20020a1709065dce00b0078dec486a58mr15062809ejv.209.1666348959242; Fri, 21 Oct 2022 03:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348959; cv=none; d=google.com; s=arc-20160816; b=KZjXJ6UX6VTwBVAKW5+wOUr+ZPVZrKkgZ3kGG6d2UoEio999a92BDXzYoAnBll5AQR DEIBqSzvrtF0kB8Qx5K/DB/b1YakQ1foMgFgVhwkJ7gxhAog/xYVJa+Blq2eYYHmKi89 uxWN0tRQQ3GJVEuRQl0HkbGtObKM5jqN7FoA72XKJwUDLXGWq87//U9FhTTOS4RnJKEU InW568nHdSY/1REIy/6wYo0WxTXLftfhjY4iomlfVUlfWylaJLn++15kbj5Rok39L7F1 x79NaTtL+kdd/Nx/WHA/YCqvqfh3ZRx/eghYEOwIkbR1dUpw9mkPYEo1Imx8cCrgdn0+ 8ktQ== 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=PlA8BBf4CXbTAT4cpOUzk9T1DyRv/G18Unrm64GbCBWm+J2uqb6ufbPk2Szuzfswo2 nH7ZHJbkMAle68siGZ0jdNZpfiAvI3Vb7FWTaMqcG3a/nbN509qLsEPdefD2Mkgy4jMU qhqPlfBzjd/NL4qTREN2g16IBK1Dha3rmrjQiOBIV70RUvSOHXUtmc6X6Urx58vLQbwT 2HmlUGBBwTcxux/Ubx69N3iRqDCXDiHKVuP7bMNKeovaFhnR5y6NPAPBn/iSV9Vj4t6z Tf+IIfoMiT7zyIsh+Va4zUqPdTevUIgdMFAlzERZTKn22wqBU6XWvGog7h4TBFhLUGh3 jasQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S7F2cpHr; 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 gt11-20020a1709072d8b00b00783d5a873dcsi21601976ejc.341.2022.10.21.03.42.13; Fri, 21 Oct 2022 03:42:39 -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=S7F2cpHr; 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 S230201AbiJUKeO (ORCPT + 99 others); Fri, 21 Oct 2022 06:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbiJUKeM (ORCPT ); Fri, 21 Oct 2022 06:34:12 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 188F525E088 for ; Fri, 21 Oct 2022 03:34:10 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id b1so4345727lfs.7 for ; Fri, 21 Oct 2022 03:34:10 -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=S7F2cpHrcxjbXzstbQBwT79Kaeiw/BkOKqB5Z8Aj+Cn8xbti7DOXrBPve27zsiv4sw IUyOhUFP+mSEVM6aPwW/a0E/vxlKDTNXJPuifAfSkzm6Sc8VqwT7GO4si/GRbHPv6rOm 8Z6Jq+Yjw8w7PFznjbjjn6n0k+4NyvKeMhStwCxCpC2iQHlFh/YrRRWMRF2iZ5+PDpwT Pt8DEdCNrdyE8ak4HGwepb000qwYiXbFoWh/i94JjfUk7pf+C4EcrgQJVHbztHhxN9f0 yLjc4uaj+/WxAqoa2dlPuYlgtDFFUQFX2wj05e5wQAmdRPMlJhA35UEzJJ0eDXpq/4lA 6alg== 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=h9MHwrlJtiqIWicG3GGPqxwCEN0HVLfAcu55FpnNosJMzn0Nj0pLlCbF6hWuuB+g3F f6Epz4lDWk/UsSigBCPTsHXmMDdUHkoGXh26FZVY2YhN9GGgEyXoP/a/evrcxWLjlWj/ b/I4v2MHowaX8zhbgybNudLSdxHFpsYT2JAMqEDSySfhxqeYTalIvrUsNsbL9IgiUuE0 dl4uiJ7fluiL5kK+CzHAmQV5Kft6mu3p2JbMHbAxFvmowvYhetxy3SCX4f/mIm+ILJZN 8ouuQ1LLyNvo/sOFagoTagBbNV1nDApkWF57t/wKSpBNLEJRNpb04OFoTPz0Wxmlqh3t 88hA== X-Gm-Message-State: ACrzQf27REyh+MS+92sBlokxTHcxuZZPIkZ/NF3AiKKl8q8W7yZY0i9t pyDlAEDFNZOLMoBFfG9p1hY= X-Received: by 2002:ac2:551c:0:b0:4a2:3c32:aff5 with SMTP id j28-20020ac2551c000000b004a23c32aff5mr7080829lfk.31.1666348447862; Fri, 21 Oct 2022 03:34:07 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:34:07 -0700 (PDT) From: Tanjuate Brunostar To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev, Tanjuate Brunostar Subject: [PATCH v2 3/6] staging: vt6655: refactor long lines of code in s_uFillDataHead Date: Fri, 21 Oct 2022 10:33:07 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293526317986045?= X-GMAIL-MSGID: =?utf-8?q?1747293526317986045?= 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); From patchwork Fri Oct 21 10:33:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 6628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp621917wrr; Fri, 21 Oct 2022 03:42:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61UHUYd8+IY2XlL2/0R3nicbU1pnQDCKl0sg458hiPaa7Rpgo/4v6us8/yHsFetZov04sO X-Received: by 2002:a05:6402:2035:b0:461:5ccf:9875 with SMTP id ay21-20020a056402203500b004615ccf9875mr257237edb.264.1666348937820; Fri, 21 Oct 2022 03:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348937; cv=none; d=google.com; s=arc-20160816; b=twKLvO4MbcWv8vc3G6x6SD/AiP6uuUiLCVDB4vkbXc3qV3Othph6obKuupK7DlYHLm LvzdFjjmpkqI9BFseM7+Phr9WjwVXVNzGGMY/V6weHXyxPFoQwipbh5yb/JfcJNk2FUe dIDvlNJOfX2wFO7ne03UOpD6ONHXrckgODWpJszQiDg8dfWaDhtF4HMTm7kyCFKHhFAz fhpPQ5xPcgtLzj/aB0tTwHci0IFaiJPU7MjN+Cn7sMjOOtbmydaZLD1YL6GT3wlso3eq S3zBUCMFNRsUjD8Gf1obEy4nVBZJ2tS+X993mlDa8nSlElFbBm1RfbQqZXfyWSMH9J1a iAww== 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=s10DD2bi79V+xICsKZzl2wJQlQcRDXrwKveFEEfHFNU=; b=M76oROdQXsKEVJf+lFl9h+t3rSdym2e5ZXwaN1A9XSw6UpLH+vo95j3LGRWOdfWqr4 Sc79dmD7zV2zIN3Cyi0TuS8NaQoQjuoAVTld1Ea7iZkMdiwsbPH98+Z3BMuvCcM2v4kV Ci4vm9vCZIk5yfOCVheQI8uZJLlTTMq4iIv8Mnxym56uPMX5ZiN7ojip285MBkWmACDn SRnC8AL4JsdB86d9/L1Lw9ajsnMCKozb95Ii42fohdzB8weNTOGxjZ8FoZIXjwN/3maS jEk1JIbiHL0cdOYEJqmLaSFq5LBWxF5D92ryAvG09x1WNvGVBnBtTYKucGp8ZV9rXQ5w UcjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="oCRO/gXu"; 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 j9-20020a05640211c900b0045db850a506si12058426edw.46.2022.10.21.03.41.52; Fri, 21 Oct 2022 03:42:17 -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="oCRO/gXu"; 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 S230036AbiJUKea (ORCPT + 99 others); Fri, 21 Oct 2022 06:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbiJUKe1 (ORCPT ); Fri, 21 Oct 2022 06:34:27 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B874C25E09D for ; Fri, 21 Oct 2022 03:34:15 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id x18so3145598ljm.1 for ; Fri, 21 Oct 2022 03:34:15 -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=oCRO/gXukTuEN7c92C9uy2Bol2LZLb6cXCD9TX7r34pSE87lDOU86/UgNV9SCSU+OR Z8z7NoSFahJwYIt1C9osmWfJSQEPabCoayUekxGvJgFkDTmY0tqx50pzdOUUuW8bBDwq P3An/BjfZgYXMfomSYKzm13Gj6fodLxj1mWP7EoQ/he7e3sLxY2tuWf1WNiK1wHq03WZ NKj/bSBM4dZssgcYSxYYh3Fm+OEk/xhJL9tiZxsbo/8TZgSdQWY6m9PxDvlaN1u4bw4M H0DO3OMtzAgmlgXfTnKC4S/mi8Bjapw626HFBRcjfDAw+lK6lEnglz84JVT4Lc9U9QWW eIYg== 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=bKYW30SPksAEybTnhIQvhC9t1m8h475BY4TQF0WPYsanGcSDj9J7W2TUQhhj79rH5P OWM0kYdkyC6bgUC4Qk+UWGuSOZ+TZ0mDSL/gm/HuqN3mohGZoMidZm8SItI4tGlf/NsD mw4u1r55JL1jTmwpGoWCsXpyQlncFe/M+6NIgDKBBW+NgwBJCUfUG3sUuBGoNqCqwoet w2K40mkLiXLWB0FC9KAQ+vwtNQTujxRwIQC1MXsIoBRkc9sZcAREaoJ1OqmOjOoWP3+a I8HPbuHMPHmkCgRluUHQeE/Qq/eEt/AlY4zT2rwkZcxaJRAzFSl7/VXUMasDmaroUtYk RTGw== X-Gm-Message-State: ACrzQf2R9jflClkoRbJf0Dx0BT92PeFO85sp5wyP5lbWAh6TV/BdqI8U rIb8vJrjSBIKRiWJ6HGsKFg= X-Received: by 2002:a05:651c:502:b0:26f:de48:7df3 with SMTP id o2-20020a05651c050200b0026fde487df3mr6264192ljp.93.1666348453920; Fri, 21 Oct 2022 03:34:13 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:34:13 -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 v2 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter Date: Fri, 21 Oct 2022 10:33:08 +0000 Message-Id: <03dd39114b1e5c029cd8022245403a079ff03ae7.1666347511.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293503851243110?= X-GMAIL-MSGID: =?utf-8?q?1747293503851243110?= 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, } 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 */ @@ -878,7 +879,10 @@ 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, @@ -964,50 +968,72 @@ 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; + struct vnt_rrv_time_ab *buf = pvRrvT + ime; - 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); } } } From patchwork Fri Oct 21 10:33: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: 6630 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp622403wrr; Fri, 21 Oct 2022 03:43:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XP4m1YpV6PRuDi03TjSLCQ9IrferuWX3d17deliZDEBOLR2gA2r8wp3VeXj8NV2puN+W2 X-Received: by 2002:a17:902:64c1:b0:186:827e:a0da with SMTP id y1-20020a17090264c100b00186827ea0damr757848pli.94.1666348996676; Fri, 21 Oct 2022 03:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348996; cv=none; d=google.com; s=arc-20160816; b=adwLlRoxWmwRwIyXugi87uTXvqj34IEmRHoTcYjNB0tyB/Mmfanzgvr6sp6DStS+F3 uPKJPESpsEO8Gb1EVvLoEsi61k/F/WR+Mm80DfL+/Zf6l7fVoi+mwM33oAqICR3kFe/s TvSIm7jJJrhaxVDc0CBMl5RoHMmGTB4l3ZV4Di9jgi6gybjmNcgATqgWw4dhFYkQL6w+ 35wWdPQT7f4IK7KcSozT/kbw2fvSWRskzucU1IcxYjIONuHGkg3eZkyxXO7E8KsHSEqC cKZGppuu/aeSTWnZd4LnegPGtKhzy1oY98Ol5T9WbVVkhH3TNBf3O5+rqx2d8+wvQQVa YRNw== 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=H7IxJfQYGufvahI+8q4Dz6LMvBxctykZ1GGtydHvATw=; b=hoUxQqnlwz5LKl/x9QNXGmFy5D4UQkAWPAbZOMpVguc73SH5eacZharJxuT4wRrTCx kkPKfkktfuhVr5ZNEpVTofiKgs8gfpPXwSsBGcKaQFHnXvAswW0SAseMX3FCSH8pLgX5 45kW/D5H21qxAa6B5EAhHegtQCXaMmWiWK8vwfvRnDnVgPs4APMr5mk01+9s72ymfJzn 3UEIpwUlfSY6hZs344Z3pB/iyUKzWoFw3xi0lHx076wIrBiZAW1tsmUkb8X6KkMnPTw8 JhZYiAEzPedx47ZZMNUyAUCGRUZKpqOdee1Q3M8cKrMofo/vZzX4Cq+sQMC55NnnJqLz h5hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NMqJ7Xfr; 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 bf5-20020a170902b90500b001842f55e713si22763670plb.321.2022.10.21.03.43.03; Fri, 21 Oct 2022 03:43:16 -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=NMqJ7Xfr; 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 S230197AbiJUKet (ORCPT + 99 others); Fri, 21 Oct 2022 06:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiJUKem (ORCPT ); Fri, 21 Oct 2022 06:34:42 -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 70CBB21B2 for ; Fri, 21 Oct 2022 03:34:22 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id x18so3145920ljm.1 for ; Fri, 21 Oct 2022 03:34:22 -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=NMqJ7XfrYa7gz+vw/ku8k5Nv3t0uXlxUeeURasPRHE0OgOjjgfOIohuRFPLqOd3DKU cyjdVx1RQ1sD620kvbDStFnClKW/tKk2YZaC43SajFysBdWzVp1B2e8wyAuPmAE+ux64 2XyAQYkab52fYMpQ5gjUMw9sdR3FBgE1V/JhYXc65O+CKQuNLE90cXFY58VzJQDVnzHH 0O8edZaWjgkYrTyq5zh+ilYSS7vKpSiHTKjXV6Q5eOo4lLYa3XFX2wEJ3oyM4SMcq/E/ DJB0uqNWYKTEKJZz0w90cvSt9QWc6J8Y/TRdl7PHmiNZs+ISWzNHHakCnIsgcY8j23Mj dCJg== 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=hxMfCwXf8wAgb3AwY1hFB5PXDMvwpHSzwYDjTII5+mJwXhYj+QbrsPUkkzaRxbqJiC K6oxFJo0uTbs4bgLKh/1fm7Ex6Db7VfwMNLQRX0lcZUEG9/HnlpiksJD+Cl23fRrJzj7 FKArKr3xWe1fIHWvTUMGOIEHxyWnWgGrTw1WvnKhP4/wrnHdx55yH+3s0LmUIt5kUct0 mcrPZ+F8lzKF1rNB8JT8F+C8FQCMc0Bx1x6DqYRF3cA9Ql2sBLe1Ac6PopW8hIDreodC LqEyKmhDzyVPw7mZ/7Adh5u3KywSDEzz+WPEHh8nhFknPgymKVyNcSfciEWfLaL8q0gj shng== X-Gm-Message-State: ACrzQf1Lp+7jzZCwSGnwmMNkVPY+bahdZJdfvwAh4AvnuTfAMnIZuUd6 +aH7cqfOqR0rveG7S/aKKy92yBT4A5pZYHU3 X-Received: by 2002:a2e:8186:0:b0:26e:8893:fef with SMTP id e6-20020a2e8186000000b0026e88930fefmr6770768ljg.377.1666348460515; Fri, 21 Oct 2022 03:34:20 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:34:20 -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 v2 5/6] staging: vt6655: refactor long lines of code in the rest of the file Date: Fri, 21 Oct 2022 10:33:09 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293565996378397?= X-GMAIL-MSGID: =?utf-8?q?1747293565996378397?= 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, unsigned char byPktType, if (byFBOption == AUTO_FB_NONE) { if (bRTS) {/* RTS_need */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g)); - cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g) + - sizeof(struct vnt_tx_datahead_g); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + + cbMICHDR + sizeof(struct vnt_rts_g)); + cbHeaderLength = + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + + cbMICHDR + sizeof(struct vnt_rts_g) + + sizeof(struct vnt_tx_datahead_g); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); + pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd = (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 = 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 = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts)); - pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g_fb)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + - cbMICHDR + sizeof(struct vnt_rts_g_fb) + sizeof(struct vnt_tx_datahead_g_fb); + cbMICHDR + sizeof(struct vnt_rts_g_fb) + + sizeof(struct vnt_tx_datahead_g_fb); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - cbMICHDR + sizeof(struct vnt_cts_fb)); + pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_cts) + + cbMICHDR + sizeof(struct vnt_cts_fb)); cbHeaderLength = 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, unsigned char byPktType, if (byFBOption == AUTO_FB_NONE) { if (bRTS) { pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS = NULL; pvTxDataHd = (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 = 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 = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS = NULL; pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_tx_datahead_ab); } @@ -1171,19 +1193,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, /* Auto Fall Back */ if (bRTS) { /* RTS_need */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); - pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); + pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); pvCTS = NULL; pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_a_fb)); + sizeof(struct vnt_rrv_time_ab) + cbMICHDR + + sizeof(struct vnt_rts_a_fb)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + - cbMICHDR + sizeof(struct vnt_rts_a_fb) + sizeof(struct vnt_tx_datahead_a_fb); + cbMICHDR + sizeof(struct vnt_rts_a_fb) + + sizeof(struct vnt_tx_datahead_a_fb); } else { /* RTS_needless */ pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize); - pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab)); + pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab)); pvRTS = NULL; pvCTS = NULL; - pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); + pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + + sizeof(struct vnt_rrv_time_ab) + cbMICHDR); cbHeaderLength = 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, unsigned char byPktType, s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS, cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate); /* Fill DataHead */ - uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, - 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll); + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, + uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption, + pDevice->wCurrentRate, is_pspoll); hdr->duration_id = uDuration; @@ -1447,8 +1476,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv, /* Get Duration and TimeStampOff */ short_head->duration = 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)); short_head->time_stamp_off = 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 = 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)); short_head->time_stamp_off = vnt_time_stamp_off(priv, current_rate); From patchwork Fri Oct 21 10:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 6626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp621859wrr; Fri, 21 Oct 2022 03:42:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6xSM1vbZtu/d6tut+b4jRtQL55qG6d34xtL8emzlSkbMAhN7mwLCqJdO2WXkqm5AMH38X+ X-Received: by 2002:a17:90b:1e0c:b0:20f:bcbf:ab5 with SMTP id pg12-20020a17090b1e0c00b0020fbcbf0ab5mr19722964pjb.187.1666348930982; Fri, 21 Oct 2022 03:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666348930; cv=none; d=google.com; s=arc-20160816; b=0qhMPycWIV/9QRt7UlJ/Vkj29m1Ln+gL0SlocrXw9vPI0X0Q4JsYxrYzseTEUc42WP v8EVgwoTJRgIGPS8FR5furBTsf/wx/WYhvze1TuBMNa2nP1DAsTBZAPUKLmAJtpHjSE1 v5t0NG+DpvD6N2ORqUDn7sA5g3Y8VeShd3IsxWPYSUX+QpOGE6G7evQ/v9NJ8UUxVk2o fsizHXGv73EaSws8YyDyiCVKkNwEcYhOg2vjCJNRZbOcsCv9SnCUeuPZ4S2lB59R4Tm4 RVKXgvCy8o7/eSn+i1oqB97GAChc6q5klqC9s7hixID05NkVZ1NRvz5AIhLTtrL5UljJ tvVw== 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=ZWh3t522ptergEdRtDg24Vu5gqW3co9XQ8DD7IBqLdo=; b=DP8QaIzt0eJLIwpaW74GFYgn3ZakMsQRX5/+60NF+9w8C3429CLJiKId8+TgXExhYJ MU/iJDkOS1h+GUTVdHDclGU43ZU8WLpWedXL4oKh5nxVwkExv1a7lzvzk3Kx7ZVMG3V6 4idcxUPmOttNjYrVen9HQYHh256LL5aJucMmu9dHuj30SZIQtTtDHRnwxmiSRhZNBXVh syC+YUUIwNhDKuMrDy+oEoqJsx0RYuzeHkBcZ3blcf97FmBujIN37Xe+D5Do3vnI8Ujn CEnIiLZDWbyid8INPNJTBESuvtAMsvyJzh3NhsZV0b098EvX4uAibN282NEi2ud78SOQ CPAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Ayne00Q/"; 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 oj5-20020a17090b4d8500b0020aaa5f4c89si8682593pjb.148.2022.10.21.03.41.58; Fri, 21 Oct 2022 03:42:10 -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="Ayne00Q/"; 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 S229880AbiJUKe5 (ORCPT + 99 others); Fri, 21 Oct 2022 06:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbiJUKev (ORCPT ); Fri, 21 Oct 2022 06:34:51 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD9D21A040 for ; Fri, 21 Oct 2022 03:34:28 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id x18so3146199ljm.1 for ; Fri, 21 Oct 2022 03:34:28 -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=Ayne00Q/waYSFrW3Y0zxKIZOglh4N8AHXw2NBZq4ILol0bck11j+D2UC31M7jFMS9F PbQ0ORyqtasaYwRUEKF2iDl4B4H0cq3AZ22pSDvP254//UZ4ZfeeorpfMqGLfqvQ//AG dXn7eEXIFbOubGFqGVW3bwg2zv732/0/5dd5FEi1iJpPx5WVN5WXtKd8GIJhCh5JvjUb Wg27zfVib1mPD392i0s3RIzYzRGKnHM/6xlgG648jvC8rWG3gymhYrMgPszyWIxNz5Cn NxOALG5wpRpk7s3GVVP31BK3ywtHjw1dfhOfnP8umuA05lyxceEhpiTyORCPd/MVuWvP oBYQ== 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=aMd+7bP1GhTL4nQdzfLNf3lo61Y7kDTudxbmhVkTFPDph2dCsHdPY8lZuCow1sHaIM KBxWfgRQ3AMnGpnwcGbCFNCBnPAAV/+sCIs3DXIRiWaiPTLJfKtq3t90sgUHkI4qWnVT +xf6RdbJz7H47xe6nuICbOTrmYikneH1uI5qzEa2xZUw1tApJ3wXZZ1c2HXGCa7tadqd 6V0cBAXpnEk4oNF7IyP6nlP0O4IWndqrVdY7z4HOe7S862IzNEzRck9NclsE7HK+BOLs /zdFJ0tgRT/PbU44mdKxutSRRTLFHeG5hTcFtuTmXeO3W/u4y2f3t+i4TWV2wHmv9ACi 51FA== X-Gm-Message-State: ACrzQf3PrBqtGIx1Xle6I//BnjFdeW9bL7cTXk7Kgo38uKsNI3pauGWt AmeahsBy61FljVXMyoXvbEo= X-Received: by 2002:a2e:8697:0:b0:26f:b795:8b39 with SMTP id l23-20020a2e8697000000b0026fb7958b39mr6699546lji.218.1666348466460; Fri, 21 Oct 2022 03:34:26 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id u12-20020ac258cc000000b00492d7a7b4e3sm3119775lfo.4.2022.10.21.03.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:34:26 -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 v2 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Date: Fri, 21 Oct 2022 10:33:10 +0000 Message-Id: <3df55cf2362694891a311692eb63cc19913abf01.1666347511.git.tanjubrunostar0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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?1747293496311540938?= X-GMAIL-MSGID: =?utf-8?q?1747293496311540938?= 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); - mic_hdr->frame_control = cpu_to_le16( - le16_to_cpu(hdr->frame_control) & 0xc78f); - mic_hdr->seq_ctrl = cpu_to_le16( - le16_to_cpu(hdr->seq_ctrl) & 0xf); + mic_hdr->frame_control = cpu_to_le16(le16_to_cpu(hdr->frame_control) & 0xc78f); + mic_hdr->seq_ctrl = cpu_to_le16(le16_to_cpu(hdr->seq_ctrl) & 0xf); if (ieee80211_has_a4(hdr->frame_control)) ether_addr_copy(mic_hdr->addr4, hdr->addr4);