From patchwork Thu Oct 27 06:01:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11577 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp51813wru; Wed, 26 Oct 2022 23:03:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wDtI/fPA59ubGjmTcgo11pkGfL1aFH7/sXNWMp1tOEkaOcn2gUdGU6eH478qStubz9mLA X-Received: by 2002:a17:903:1209:b0:179:d027:66e6 with SMTP id l9-20020a170903120900b00179d02766e6mr48436915plh.67.1666850576468; Wed, 26 Oct 2022 23:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850576; cv=none; d=google.com; s=arc-20160816; b=1K7KAIhmDPQ3WmnnE+bTzDITd50LneIcBKQfv4JDbVNpF3h1lqCRnkUFlJK6HI2m6d HrsY/htr99t7xA/nVNuhXzcQ2R3GgHN2lSC74kg2K6cvECrk/hF+vfoYG6R2GlquH4ch nVGM2C7zhRgDNCRkk4zQXbef4Q7xf8LITO2DGKujLrMaYEQtR2/A9/G/hAZGjitULbB0 L1ZNrePyTQyEWz2sSTceaykw+aQ+yW3zh9S1cVDT4t5/BIlPsBL5PiWsDyLGngMziTOQ dmCbGEB44f4KfEU1Q1iZ7L6fa1+GwTrNQiDTXD35FS1exgDGIJsivCjSujN3W9QAO3qo hJHg== 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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=YDm6J0imQiyFdK24XbcYTvuaxY3bZxmld8QwI4X4hFg1C1k/gVk5K8W3TFiew1tQvz oavkdM22WpxFZLMRC9CWz1E3Rv0Toh/+w9UiWKFGswfKPExv6gRWKHUgM7MVB0nAOcv3 moPPsFXLFnWzIb/vjDtwXdO6OcEu0Mu1WfLzJTepoRaEZ7N4PqcusoqanJ7zEQxMG2le SmojRBq2L3Ak4gMg3KvorMYmXmOL+NYk/ZKzGvEEaX3kA2U/I6y4dHts93JSYxU/2znp fDq9HZmQLLw9/VU6ZqBF8Q8AQHSO92BVxgKe3oJUsvy8xR6ut0KxIqyWmtwB7h3c5W5c HGAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LN5VNnCu; 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 ay5-20020a1709028b8500b0018128753b25si493477plb.271.2022.10.26.23.02.42; Wed, 26 Oct 2022 23:02:56 -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=LN5VNnCu; 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 S234248AbiJ0GBv (ORCPT + 99 others); Thu, 27 Oct 2022 02:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234193AbiJ0GBs (ORCPT ); Thu, 27 Oct 2022 02:01:48 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2217AB38 for ; Wed, 26 Oct 2022 23:01:46 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id k19so472080lji.2 for ; Wed, 26 Oct 2022 23:01:46 -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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=LN5VNnCu1kBAQRLTdvN+9Jdx0VY9f1UrI24J/M53d1qe2NzB2UkkwmaO5D086EY2vJ +BhGIaR6UU3apn5mtqkQd9SaHOAShENsLDDBs+PInBtLvUhc79ElEq9/gPsporHjhfJp oJs2r4kCvQV2jseTuXsqPa/UPJ1Kza2dqJr6a0YvJNhUpeAy/00bJYuG6NEk1AWNt3jI 2ny08rLPB5w9AlNlNvaE5i+qi4ThMKn9Fs4ddXFjzN4qrpjfx/I8x9HZllUYb/ct+wXY qV6A/0jDsKvtrlJu7Vvm8VnSlNlaU96qEumq2O/Moda5UyBb84F9qDJhUqgDxyNEC8Wb kTfA== 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=5iA9FQCCsPWBm44+xNI1z9eJC+PJ5gHzpB5ZmyGrAxc=; b=3sv9qeBlRz+HpOqCR4BlllxggB+7pCe/ratz6nKsJ/reJuN7NYA/Hlzrly7dtDH0JD WO+rXOuZ5QC545gUFWjvUHi3T0x/zRkS+O2l1DhVL8KSt68L00vodMnN3HvEoYT4mYjc XyW6eUVR9eXfqd0Ogbf2J+QCxuzYJXJLQY7xPOxM9DQ/TqmU4JvphYWIWMPXKOIe3C1q m1TZfa++efvWl9k2/HoTqHRW9APi7Vmt+e9momSmSuKVAK9DWH7Vt/moJULrMYkpjeQr xdGJ9DXqV0eMmdny3HBGsE6LK/0iMQ0EaSYCKO8ApuHVRDSmOiFtzVvTsJJpBLkRTx35 D4ZQ== X-Gm-Message-State: ACrzQf1gCu7R8YNAv7VDVjOsyruent/SAcm3EpfDNtHfWQi9xRg5SfSo 2hXTknpgZjPIqwiJQcYyR6E= X-Received: by 2002:a2e:509:0:b0:277:44d:569c with SMTP id 9-20020a2e0509000000b00277044d569cmr9633146ljf.88.1666850505198; Wed, 26 Oct 2022 23:01:45 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:01:44 -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 v5 1/6] staging: vt6655: fix lines ending in a '(' Date: Thu, 27 Oct 2022 06:01:25 +0000 Message-Id: <6742e42999e05ddf09318a0a3bda9ce23b6ae562.1666849707.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?1747819510070369810?= X-GMAIL-MSGID: =?utf-8?q?1747819510070369810?= 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 | 165 ++++++++++++++-------------------- 1 file changed, 69 insertions(+), 96 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e5036121665..7eb7c6eb5cf0 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -139,15 +139,11 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate) * PK_TYPE_11GB 2 * PK_TYPE_11GA 3 */ -static -unsigned int -s_uGetTxRsvTime( - struct vnt_private *pDevice, - unsigned char byPktType, - unsigned int cbFrameLength, - unsigned short wRate, - bool bNeedAck -) +static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned int cbFrameLength, + unsigned short wRate, + bool bNeedAck) { unsigned int uDataTime, uAckTime; @@ -214,20 +210,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 -) +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) { bool bLastFrag = false; unsigned int uAckTime = 0, uNextPktTime = 0, len; @@ -316,17 +308,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 +397,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 +539,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; @@ -750,19 +730,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 -) +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) { unsigned int uCTSFrameLen = 14; @@ -868,21 +844,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; @@ -954,11 +926,12 @@ s_vGenerateTxParameter( } } -static unsigned int -s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType, - unsigned char *pbyTxBufferAddr, - unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD, - unsigned int is_pspoll) +static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, + unsigned char byPktType, + unsigned char *pbyTxBufferAddr, + unsigned int uDMAIdx, + struct vnt_tx_desc *pHeadTD, + unsigned int is_pspoll) { struct vnt_td_info *td_info = pHeadTD->td_info; struct sk_buff *skb = td_info->skb; From patchwork Thu Oct 27 06:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp51866wru; Wed, 26 Oct 2022 23:03:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YdL+YmAsT+2zZBFcLfVmzoFYS/AUWGVHM4IWBlIoiIh5gpT0NjjfuKJ9mw7d5hBa9zeVr X-Received: by 2002:aa7:8ec1:0:b0:56b:fa67:1f6c with SMTP id b1-20020aa78ec1000000b0056bfa671f6cmr16321998pfr.69.1666850593371; Wed, 26 Oct 2022 23:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850593; cv=none; d=google.com; s=arc-20160816; b=wQ6tXY37vliRCgktXN33Dy+PUvpSil0A8fseJNc5HOAd03doGQzn/mdNFiwX6+Na+b w1WRNMYtIyGYIj5yeHzwSaUJvvYfMoW90M4tK3bjqb9eSB4Q0UtvDTfCCbstdzvIBA4e 4QrKc4T1ii3HzfXkX7OA617WFEYLEqVhKlY63Q7g7JcH0dC25tw15Mcdq84tNgQY9LZE NlAV9V7LusIRfXBm0pKITt0rVd7dzGpnGsqqfI7+g33aPW6WtdzHTAHbZCl6Pw15aWRk 1J5OdUBZP2jTJ88zbNGwutyNiDJqsMZ4TUn9+DkPIYLBhB50PEGlmTbi8hqYobKwJ5HB R+mA== 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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=weY/MDY4tjwdX11Rw7GyFq3kDBefQ3V8mYodV/QZkhI2mDX/qOkzQn0DQMHNGqb3vG /DEaHBTsTt91IsQn+JDBzPZTprFn0rOOIvVhY0SMmNPLxzSMZT/FV7mb+Ow9VVLGG/uG qtq9q+yZ7r726NfdQH0xpXeQfuF6AIT5MnfGO/0h5PLeDKg5GEOvvlImdG+2T+77FyGl 3ErlA1CycCRePxUI7FOAnDAibeF0y/3kTElXoT1sS1Tg0rCRW7rin7jAQlufDCQ6403c rblZbR+tPeGhsE7Whacjex75HKY/cZz8G7M9w3Lg0Alw12eoZKp+h3RWsgNKh+ngjHzl 4URQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=epubHOv8; 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 t6-20020a17090ad50600b001fac102fdeesi656473pju.95.2022.10.26.23.02.59; Wed, 26 Oct 2022 23:03:13 -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=epubHOv8; 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 S234296AbiJ0GB6 (ORCPT + 99 others); Thu, 27 Oct 2022 02:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234289AbiJ0GBw (ORCPT ); Thu, 27 Oct 2022 02:01:52 -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 E5C617B78D for ; Wed, 26 Oct 2022 23:01:49 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id r14so745243lfm.2 for ; Wed, 26 Oct 2022 23:01:49 -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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=epubHOv83f5/f8xAdZoDTXtycL2znfToDchq4JSDlVcmLHTtt+gl2B5kGHbf+qDOJ3 vhZ3Wg2h1kcjamRRKJNIqsL7dla7UMEmPb/i0GyFJymrj82ehybB4f5+ioNnTAVV0mZn NWO9ecPsqrQuzMMbH9XS8ViP1ULulkjr+stmZjr1LIzcGaM06Lcgnr8uD+3swnOwEowx 8x7FfiHtDCVcj3EWNXithyQUM8KNdw/QiAKARmyFcgKqsnNGpUm1je1PfKFsf6N1Hkl8 ACBr/3dWbZGFvzhiw2ynauw8PmyiH5b41E/ZuQFFT6ic/zCZHiZ3BIU0XglhQzdYZoSu F4Iw== 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=GisTkrXG4tQARuScMo9w+It1weHIQ73W/nVCSWIv2to=; b=shoy18pQo9Fcc5c+8T7mMHdTRoHi3DojLbsahc571LDm+Yiw1ZotCeYsM+4aMKGd+Q fTmNMlqzK/Sf2TEFr5Keqz/DAWN9D4GmHi7LZJFD0vJTG/JlsiU2gOIXmjqwFkaKcHCd A48qnfky/5bUVWsLTa9E7ZWrAAPn7ifg80j/RMzbhaX8+0TW2zuA2HLgs1YuIFNUV0uC FQsnuLCz1rmO6hUPQ3lE7/bz43PTECWlmE2Xj7t3YfyGWBo6tELR7Tq+wdDLIZXU9QwR TitB8afZkquGs+t2P6fglIw3NvySJrRy3fXltuU2A/5w4Y86dEbhfkSuD1vWbng8Nmv5 BaFQ== X-Gm-Message-State: ACrzQf3G1e35KSqcvnbMVsfJ+9cXXMilvm1h8D3UBJ+ZMAiDFHGbqkII N2h7nS6KPLXuseuqfWpCzTM= X-Received: by 2002:a19:6918:0:b0:4ac:c698:b20b with SMTP id e24-20020a196918000000b004acc698b20bmr6382971lfc.56.1666850508254; Wed, 26 Oct 2022 23:01:48 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:01:47 -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 v5 2/6] staging: vt6655: refactor code in s_uGetRTSCTSDuration Date: Thu, 27 Oct 2022 06:01:26 +0000 Message-Id: <0e6a307052d3a354a850a502e509f46baccdbe1e.1666849707.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?1747819527772403184?= X-GMAIL-MSGID: =?utf-8?q?1747819527772403184?= 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 7eb7c6eb5cf0..8e56a7ee8035 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -186,20 +186,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); } @@ -320,73 +329,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 Thu Oct 27 06:01:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11579 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp51920wru; Wed, 26 Oct 2022 23:03:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fPuuCeCYYCX5Iklq9K/JnQ7KXfN4JMBMLVWoAgSMUAJ3p9LOAth2KqFntz/alnQ6Srqif X-Received: by 2002:a63:81c8:0:b0:462:953a:8534 with SMTP id t191-20020a6381c8000000b00462953a8534mr39862056pgd.69.1666850605251; Wed, 26 Oct 2022 23:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850605; cv=none; d=google.com; s=arc-20160816; b=b5mVVBHmt8JqdPXX99lfGPfdgZ9n72+CpIkomlgM9FIN/6O9X1feEDJX8LQfBH1OQ2 DHCZ8cyr0yw/T9dRrY8nqR4qIo2NNrhyIe7AhNVMqTSIhqszxhvkuViQxslhpyHSpoiN LpZXckHI8gA9iqO72jyz4DMWoOkicd6P2bMxIxmWihNof3R61QmFefq5dR621kftjbyY 0DdEumUuJgCwTYw40B/3URhdrcEXilHKwh7QHxFmdHjkkWqMOxN233Z62O1E69ZzZ8AI xAIyLp4Ibe15i9Sm12LwO+N/CnMwYrgX036/PHaBtyS80iqiq/nVLu9XngLsXGhkMIqI /LAQ== 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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=E/4YuUHJHqCRGX7sO570Ssc846OOYvQ6d+KPSyZKLIAZWa6hyMRM9C8QtJ7WmSGjw2 qpShrjtLFsCru3bW9TlrXkSZKa5Hg/81q+uh8RMs282dSQRGjqZz8UnRiK087AyDnfaZ 7fIBoqkmSM8evshWLVOvid18qv2dxusK9X500k7D0JnXfUW454ibHByrwSNWOYCrC0Ve ROnP32a0Ur82AzU9z78GR6FawTpAbGHcFU/JDOZQc9r345o55EWnqO8Hp0y7kdKZtnHr WOdttvnsyjdRqLQ0JUP3sEJ00ucCm1iOmWn2aVPqVQsI4VEO6cWGQifNyAaOqdbCMqZe MzNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZjHoPw+i; 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 o186-20020a625ac3000000b0054d5253e7d7si730089pfb.190.2022.10.26.23.03.11; Wed, 26 Oct 2022 23:03:25 -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=ZjHoPw+i; 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 S234225AbiJ0GCG (ORCPT + 99 others); Thu, 27 Oct 2022 02:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234290AbiJ0GBy (ORCPT ); Thu, 27 Oct 2022 02:01:54 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B7A37CA80 for ; Wed, 26 Oct 2022 23:01:52 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id u2so843460ljl.3 for ; Wed, 26 Oct 2022 23:01:52 -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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=ZjHoPw+if37X9gDnaT+FhKICLRbsHByghkoJqnE2lPRJniVdoE25wHTHnyx02snUJZ nVyARZD7c7lxwF5QOi2/Q8L2CGL5imorD0borhbLmMhtikd6Cu02Os/Sz2d9Vlip88NE BwqOFxQXW/xEx1Dmcayu6qHYb/FlVMMs04IwR8p7o4+00S1sHmJYa01i/LE74/XYagRU gKD+lpTjRmeDqCqZTIlGPEMr/xPavfq/pOAiPbdbTPW2gHnAw2WrO0BwrHNX6WeM+yg+ NW+i4QCXSi4zju5k5ji99qOLJsaLL3Ge1Dcf+qcu22dp+E8s6hi/4pu3CCVLAMY1+Du5 d1qQ== 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=8Mcq4XElldK8n+d5RjVbZo8PZpT7nLSBwi7AAq7x+9Q=; b=tyh6oBl3e1SjN7SVmBidp/7nGtV6OFo+j3QP+DpScyQGrLahllQIoiKetKOCOiQf40 bVcWUdt2EXRDoncFpoGyxfJ0RoXEf6wJlnZbX6Qfzfik44V5/01oDOXd2HPJrbkw2h4M Qzf86I2Hmi7S55BfSCXJVVEeJVDpl+G+GTPb94nDOS0vVvb2y7c403qOkJv19F7lrA18 wFEPnxTu2Bpkj5BghkWjMfgboqNqcNnptY2UZVZYKTWBhj7aCocAYMOMFIxGBDKBcdre Prqhs/jbG/EWSWuGOnnrjJoZqzlCzVd4yXWu6dh5nCNSKBz23bO3b6JLN2AGDbOex+Ok hByA== X-Gm-Message-State: ACrzQf3WecVfvpjREd25q1l7J3v8BcVvl1DIuODO5hx4YSQ14d2M3/rE ZZFZQj+fGFVmvl00HZZO33cTn/6NdY8y/Q== X-Received: by 2002:a2e:9648:0:b0:277:ae8:7512 with SMTP id z8-20020a2e9648000000b002770ae87512mr7645747ljh.244.1666850510547; Wed, 26 Oct 2022 23:01:50 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:01:50 -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 v5 3/6] staging: vt6655: refactor code in s_uFillDataHead Date: Thu, 27 Oct 2022 06:01:27 +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?1747819540136512340?= X-GMAIL-MSGID: =?utf-8?q?1747819540136512340?= 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 8e56a7ee8035..7b6571ba7c36 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -481,19 +481,28 @@ static __le16 s_uFillDataHead(struct vnt_private *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; } @@ -506,14 +515,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); @@ -531,12 +555,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; } @@ -552,10 +588,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); @@ -573,10 +610,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 Thu Oct 27 06:01:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11584 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp52435wru; Wed, 26 Oct 2022 23:04:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4rbKOdkXkCtnb4BgjFbQpY10uwzqlOSGm/77cs+TfL6FHia7QUWg6FqrklStMFLmbChfJX X-Received: by 2002:a17:907:2d2c:b0:78d:d289:7efd with SMTP id gs44-20020a1709072d2c00b0078dd2897efdmr40576277ejc.166.1666850668268; Wed, 26 Oct 2022 23:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850668; cv=none; d=google.com; s=arc-20160816; b=WFtOtV9wjux0S1xWY6zEY1O9WCR9Ev0sE2cnveP722f9cMQGSHzZgznJK9A5lP6WId vTEDK3tQUFo6Yl0gEAcg48DsmJSF1S8yS05iCr5BO7Jq+ijyX/SFU3epVS0mVTZwgG19 GJta82gxK04LqHTOkaSaCme7HJNMz9Uj6hrJvuZ+SA6S3+EmqKN6Ffnp5V4DsHzW3pX0 WmzUcBgFLiCMVqcix4Rn8Jwv9FZlBYIeAHYAEiIPUYrxIcPYMPbe8cg2ETSrEAot021m iEEuWzOvupBrGm6ABSQagrZI4Gs8STJWQGnehu7u151cAn6GOg8TuNj/cnoX/I3863OE K0iw== 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=SScOqvOl5aHLImkW/UOja4fBFGH7Sh8OGD7IgvTe4SUmiEPb9az7BleYDPB2P9SU44 bUbAbp9XTAQzaaJLMjgLNHAShg6fCP3j7GWMSgTiqyMzOHg4oIg/cGukeeIRs0tuLs0H SK0ADYjjhI/ntENOYKu62b+DMUzinST/TlWx/dLQ54lsH5PX73uhRCz+s8lZHS0vWwQo F2p0U6Nvxr2ROn++8eGJapfJggW6QLMgzOygNxK//sMqgyv9vxmgLPCAUXHCQNDJzCmo E0LAT5sW0DOGamo10Wij+wrEJJuvddtPLjeyQbfKMK+U7hTqULzk8iK1Zf2NoRL2P2WH czMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JMZAloMR; 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 mp41-20020a1709071b2900b00781c229eee4si618204ejc.936.2022.10.26.23.04.04; Wed, 26 Oct 2022 23:04:28 -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=JMZAloMR; 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 S234509AbiJ0GCi (ORCPT + 99 others); Thu, 27 Oct 2022 02:02:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234370AbiJ0GCI (ORCPT ); Thu, 27 Oct 2022 02:02:08 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D093615B136 for ; Wed, 26 Oct 2022 23:01:57 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id r12so754490lfp.1 for ; Wed, 26 Oct 2022 23:01:57 -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=JMZAloMRk2by2rzB7NUmodf0Q8FsWdDH9nNKiIiePzMYEfaWDVcea6FldIpZX/UWYf sRKM8rAolEc99Jp+inw+wJxfrXUFwRO0vcyTAxCsUv0vbs+z4TLcuC6bVGHyZVFuZDZL auP8/B64qtgHauoaho4zT6M/CIfKBIF7oCAKrr4AQlY3EQ/aOEJYqGMcL0BOVLNFLydq Yqp6kPn2z/nqBCwetzeorKGq+69xemGQofS2iN1Nf2PuGxlY4pXiLDWd22s4Z4IB0+KO oQdvoV2RRwZA/LIBZZkz4XEGeSIAYIXVX/N7OY3GF8RRN7Ymft0OOxJCLGxgCF6Zxev3 p3oA== 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=kERYAOsW5NJU7pNnXqL1lg29C8RUW+jXkgrS9eONdf0RP3KQMLcTjvzejH1jdgwXgP 4oDjM8bWyWSgGYLbc5KGCqcsPkmrpHs/tVPJRwK+7YRqFBJwuVbkZhPij/sWe5OcrQfZ lZK1MrIjOtUewqtmYI+DV3dwRl5BmIIPLQsc7dyB6hS1HQXj0mOFjrpo/kOAU0IBfZGU TVvh6GS7pK6W27VukDRdUleOiC1EUeDLliCTm8f4m9efuwmuDYfAh2Y/M+hCuvqaeEqW +okc0fpcIDQRty+JB8t9TjxBR6AOgy8T2cCUIcsVlgaevfVsNu0yD3ey7363z6Tf3r3+ G8BA== X-Gm-Message-State: ACrzQf2sA25AI/8tsdjHPB1k7wI/FBJj7cvXwsFUgUgDb8NuOrYPrJus OEj/M0WqQetKLCBJrN5OpAU= X-Received: by 2002:a05:6512:3d1d:b0:4a2:588b:d78 with SMTP id d29-20020a0565123d1d00b004a2588b0d78mr19387598lfv.375.1666850515468; Wed, 26 Oct 2022 23:01:55 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:01:55 -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 v5 4/6] staging: vt6655: refactor code in s_vGenerateTxParameter Date: Thu, 27 Oct 2022 06:01:28 +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?1747819606322566526?= X-GMAIL-MSGID: =?utf-8?q?1747819606322566526?= 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); } } } From patchwork Thu Oct 27 06:01:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11582 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp52294wru; Wed, 26 Oct 2022 23:04:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YZDYmGN1QikqOP3j4/D4RC6fHz2AfYoxC9uAIraj4iPn5x/VUkFPIlqT8B8ffQ82Kcjv3 X-Received: by 2002:a05:6a00:198d:b0:56b:fa7b:56ed with SMTP id d13-20020a056a00198d00b0056bfa7b56edmr16241095pfl.81.1666850657696; Wed, 26 Oct 2022 23:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850657; cv=none; d=google.com; s=arc-20160816; b=OYBH+bm7dNIJQEzhdsaifF+V2iQEy3If+sb2D1ExwRbbHi0kurI0DG873zzxHFq73a wfjk4uzgrsFsTvjn7CelNUN4u9tNEZ9N+3TIT8+oMCMYY+l6SfDWGCRXfZ9dy4FfJQ/p UyLbprgrzbSA1JmLn5d6AABzE3n8ySpARY6w/IyU3OdAUuS0iOQEr9f7t8rpvCSM/APQ kUjg6kfQgR9KQVjUilAWQxRJ4PN/o9IJaeTefwtwmciUFVW1xXF0ubL7FH1iKFSmcoPK 0ax3vJvoOuhREozKGIKKmvWnC0g6/GDB9tGBBpsG5cn38ALGLhxdzNwtJhJg1+b2Ur4A l+Iw== 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=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=d3BOvc/ZuPHFvNMmMYxYcJgsXL9LA12WG4XUw7Li5eTs+R6BP4awQcWTViQC0hk2RV 2sHFBj8SUjaF+EHCNnYKbBYthGx71gq2GgIww2YFaSX3qzNsuppZBwxr2IR15BQ+qan8 lco6DYFjmmACArJ0eF9Ym6Pmu+9wtF7eG/z00Hk3ixbhZbe8U+ClqV54vXBZRq/MW4yG BYcUzJgtXvm7z1bel6gg5/kD2e2ExDBU+FWpBdvBxLH9nquJo37ZdT+WlUxBKJvBqYgC HdTrEg5AUiLdO62+RSOoW2RJPxzOE3tsyFn4bLhpkoC73OXqDFf1set0ciwpgvsI9aqX 2WEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BLM+CC9r; 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 l69-20020a638848000000b0046ece301e82si494704pgd.756.2022.10.26.23.04.05; Wed, 26 Oct 2022 23:04: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=BLM+CC9r; 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 S234519AbiJ0GCm (ORCPT + 99 others); Thu, 27 Oct 2022 02:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234377AbiJ0GCR (ORCPT ); Thu, 27 Oct 2022 02:02:17 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C955715B330 for ; Wed, 26 Oct 2022 23:01:59 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id d25so308749lfb.7 for ; Wed, 26 Oct 2022 23:01:59 -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=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=BLM+CC9ryv+pmz0fuvP2L9QgQi6F+mPrirVX63lbgdCr8yZpqmVtLDVcpjqtCQ2tnl uoH0cveOsJ9ZV7tUmTFVkzgVubFz6GNttsdLlUDU5kbJABdXwtfk6TQKvVKqXBXndnD0 zipD16wvGp72CjAiUBYEZFAMdADH7N9VGR2uq0hkUZJt3S5rxnxQufnuGcZLzxxFVBKu YI5tgQxT2H2rtOckOcDUWMVgZAirjlQyuEpYxWRyeuCX6F019SR9qUiYp1zSQZG5Tasr yyIuq9ajFWtwrDBkWNLGwVs74z48ymOgHRYlO4Uhy79D8JG27vDsvvFSTllEmXf+7ikh +ecQ== 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=mk+TiPiUxsPwinI95K1okpiLhPr3fYQEuz6nvFqNMpk=; b=KnYio5lUVPcORZSWbGBUc2xLD9At+WyZwgMXYy50IZ67nP+KqwCrsyFBKMxf6BtITw nqchmuMb9jZkd6oD87EiR9IHAp9OHrePpc7EgX9ao+GTWn7j5k1oq8kZs70DLJT2L/IG oWdahHuoIsOn5V/ZjqlSAuFPGIowGdyers7rM/7hGzcSBOfqCMb9YA9VN8CwgbLwOn3+ SX7OTHeD+nTy7erPE30YfoKptGKc7Ex4TDQD4TVH7t+nXQF2Vjkmj+vHfvKnNJmAhIvg xIcvkwPfcXfjSTgOpbh/piSCpYK6r7GBTlOTLoel72b2c5HuUxPuVmdrP/dck6UAfkhm +O1w== X-Gm-Message-State: ACrzQf11R5uE07lczfpvGVGU3m62XwXgYwjj/vTdZ/yMAmHTbI+HxXot +50L+oC4fjt6FoiMY0zPxEQ= X-Received: by 2002:a05:6512:10ce:b0:4a4:2c69:743b with SMTP id k14-20020a05651210ce00b004a42c69743bmr18698767lfg.211.1666850518067; Wed, 26 Oct 2022 23:01:58 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.01.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:01:57 -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 v5 5/6] staging: vt6655: refactor code in the rest of the file Date: Thu, 27 Oct 2022 06:01:29 +0000 Message-Id: <71c411a68c9c54b20e7fa687f736acac50b33b5e.1666849707.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?1747819595114621467?= X-GMAIL-MSGID: =?utf-8?q?1747819595114621467?= 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 | 86 +++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 475526b73e1a..6a4fcb16b674 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1102,44 +1102,59 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, 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)); + 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) + + 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 */ @@ -1147,19 +1162,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, 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); } @@ -1167,19 +1188,25 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, /* 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); } @@ -1195,7 +1222,8 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, 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); + 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, + is_pspoll); hdr->duration_id = uDuration; From patchwork Thu Oct 27 06:01:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 11583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp52297wru; Wed, 26 Oct 2022 23:04:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6QssbX8AR2ZQiA1DBbXS/sRMUy8dvOS5NQbv5+56W/D+vFMd8ExhR5w2/KjjVexYp6GmFZ X-Received: by 2002:a17:902:e84e:b0:186:b699:d4ab with SMTP id t14-20020a170902e84e00b00186b699d4abmr15918057plg.116.1666850658379; Wed, 26 Oct 2022 23:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666850658; cv=none; d=google.com; s=arc-20160816; b=ZU4kkjhur7Ola3vuIx9LckOf8maVHs3z2SOgzfpxWtxlUUV+3ZaI4wZu0D4KOGMy8d /8i283eY42a7d7JuimBfj0g8RQzBAQeQCzXa1VMo5Fj6k7Q5FkTThVse5gZNPxoV2ciw hf1wak9cw5qUhjYvKxRd+oMVZvy6gR/FNkjuLcFP9/OdYRaKUTpkfKyKgcyfpPhL5eNP DNWeYPvrG5GWCjKJnVJ+XpEkhIJiontYAwHe3hB5D+iUWkgI/Afh3MgE/uRVfT9CNjde 3KuZu/ZlMwHU3gZzJfHErZeHm+igOjuZ1yRXN0ahMOCJ53JVSsxaz30ZxJ3ngDmj2yK8 laLQ== 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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=KLoU/JmOkvRaAwwUxN0HWP7628i6Q5hovI2bFP3uKttYZYEkOvamIy9jHvlFuPWRY8 qXTq3o6rHbVs0YfJ15szkJkQGackEe/k881iDemMCg+HNcDI+LSQqRzIfRX2t6/p0LvT aCnaFlLCScFhBTgPDUGztDJ7oS1HgIro84aMKkm2dQhjAyezNOkm8LNDYfGBOZ2dYKx2 g+1GNdlpzFBb4+r2JUedYGVxSuCjw43ANpKTd8uzKJGHtHqEgPSvlPO+vjvyoxeJ/X22 UDawJe94xzmVty3TDDA1NbZslvfKUL2ZB3nPpQPDa36jglKgNWHm8wzfPiJFoeNF3TrT kqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JrIngGNL; 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 q14-20020a170902dace00b00183d1436ef0si682765plx.33.2022.10.26.23.04.05; Wed, 26 Oct 2022 23:04:18 -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=JrIngGNL; 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 S234336AbiJ0GCp (ORCPT + 99 others); Thu, 27 Oct 2022 02:02:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234417AbiJ0GCV (ORCPT ); Thu, 27 Oct 2022 02:02:21 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 269E515CB25 for ; Wed, 26 Oct 2022 23:02:03 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id f37so704554lfv.8 for ; Wed, 26 Oct 2022 23:02: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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=JrIngGNLTSa5y2Ea1pkwxz9x7/jlr0UHMb3FGDAZd0XQ8OOXPeS6y0lYGZ1FERn5vH xmgybQxf8Q/PUfR+QBr1EhiQUomvqH7+nXwhdqybHT8JTcEZ/YVdsqRfD+OiK6nGrEyU OYtoj657ZFrSvh0cy0RGyhten8uybTNTMMsc7RoTU2hV1O9Y21XnTMItkvbRKFxP12qg 1ZEh19NFhZok2D2ejrNTxIB8rbyW2VYWYUWtaXbyITjAGa70bHZfY72O/zAM8rS+n0xz NyeAnEm/lyloVkQGsOL3G6TNW3WYgRqw3HibWh6bJ57vBqEXYKMWtpfW1nexrCQfyhpd AkZg== 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=qUjB/LIeIaF8ms/g2Nbld44QrRlq9IWMpRhgl/Fq6KI=; b=ucy22efSCQVa6j8UBKLMsXmo2mzA4i2n7Ah2OmszcM73wuvXNSEXmDJAlooMLUO5/i VldFqeDgaYV94DmkZpKHWh8N5ospzp+QDDed7NENclZLZcbs19vDIczdFUTBTgdkIiHf 3YH79SUt8s9QzqQvykHtMK69l8Y1JAfqxM9+zJss7OC/FF4oJjgJtgIeBaLNMis6OgCW 7zVWGIgnR58AVnJvi0vZvRNcgQ8XhqLmyPR0ZM93ARuD6xOKpdqT4XaLy8dBDZ7Bl+6V eS+YIw/mOlxkYefpMY0ULUAJR1tK9fR8jEUxSRojBr5UBcSRYDBsKMlV0/Ymn7Ifiloi 214A== X-Gm-Message-State: ACrzQf0JxolbjogVhuXpQKEgTMIoZHEXs8iYSIGbY3E2+Pt6QQ6cMKd4 5GH1yjb7fhfRA1d1v4tlswDmfxZecYjnTA== X-Received: by 2002:ac2:5f58:0:b0:4ab:8f05:7bf2 with SMTP id 24-20020ac25f58000000b004ab8f057bf2mr8214098lfz.537.1666850521348; Wed, 26 Oct 2022 23:02:01 -0700 (PDT) Received: from elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net ([20.240.130.248]) by smtp.googlemail.com with ESMTPSA id j3-20020a056512344300b0049fff3f645esm61537lfr.70.2022.10.26.23.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 23:02: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 v5 6/6] staging: vt6655: refactor code to avoid a line ending in '(' Date: Thu, 27 Oct 2022 06:01:30 +0000 Message-Id: <43693eef6afe24973ed28f8b26e2d5117f5d35f1.1666849707.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?1747819595900149653?= X-GMAIL-MSGID: =?utf-8?q?1747819595900149653?= join unnecessary split lines to avoid them ending in '(' Signed-off-by: Tanjuate Brunostar --- drivers/staging/vt6655/rxtx.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 6a4fcb16b674..d585435520b3 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1118,7 +1118,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice, pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); pvRTS = NULL; - pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + + pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + @@ -1296,10 +1296,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); @@ -1470,9 +1468,9 @@ 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)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, 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); @@ -1486,9 +1484,9 @@ 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)); + cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B, 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);