Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3098782rwi; Fri, 21 Oct 2022 11:29:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56LC5H6MJ/3sU7JZNNZQNgo0U3AxbPWPcoUvx/VEBh2XCipSHDMtOCuE1tI5NoJQ/UlkEq X-Received: by 2002:a65:6955:0:b0:439:a99b:bca5 with SMTP id w21-20020a656955000000b00439a99bbca5mr17387803pgq.80.1666376997357; Fri, 21 Oct 2022 11:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666376997; cv=none; d=google.com; s=arc-20160816; b=LtS7iFkXhLRuHaNYp8qxgmMXWc1mo+9yycyA8izZ4wh/dqdEC9/jqAMdE1MTjOu44b hfmF7lShPxho5TU/42RMpvGhlUb/6dQURUjZmakB+ht4IHNvGgyZ7B7etoEhFgfhQ+8s /y2OHmSP+eDLxXSWPCZL5BUxIkgqNUfWca+TDvCES5MGcdX+iE345qDiG0ye9bn+Ew57 uBVxASAcEhPNylFQlQt1qVZBfsdsa+0u4U2/3ZU85GzKuon5fvWazrZ/pv2c4WsQouhI 0AK7SZKUl41RBwC8zSulcPNVUuGfmXnRnZwkcG609eeNxWH3M2T8m/l/+ixzrq3qVUhn mXUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gRIaVA7IbW37xMjt4UyIoi28oEObcp55eUOuloap5Tw=; b=omFgXkEkL+ZKOJQS1HVzyW11cIFwsbEKhOvQG9v7rlxzlf3xbGTlpD6paiZgVP/8ct qGNKEjbjPBgBL3DBSOccNqKMSTgu3d6XhJrEIqGfWlwumwr5cwZvo5plGIZeFD2wVkfY T/T3dcnmutVRwyq8kB41RTI3fsFe+tnEXj+t9JxmPm/SbmGeHMD3gHuCbQ40oPhQNdLZ gNxBTs6FNI474JuebCO29ZisrRrgae+HGta2JnTYkXo/FqhL3IyJ0ykkWR69iSXYRK6r e6G1wdiD0i9ac4ud9A8IQMF/2Dm1U8F2ahHf7h7xWesiU+sLMPvudLEZRqkVNLLNyTb4 rLlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qMAwsEPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a17090a9f0600b00202fd098892si5966098pjp.190.2022.10.21.11.29.43; Fri, 21 Oct 2022 11:29:57 -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=qMAwsEPV; 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 S230096AbiJUSOu (ORCPT + 99 others); Fri, 21 Oct 2022 14:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiJUSOr (ORCPT ); Fri, 21 Oct 2022 14:14:47 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFBD03207B for ; Fri, 21 Oct 2022 11:14:41 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id z30so2522538qkz.13 for ; Fri, 21 Oct 2022 11:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gRIaVA7IbW37xMjt4UyIoi28oEObcp55eUOuloap5Tw=; b=qMAwsEPVkK5iLMOkgHAlLTC38guT9l7ljuUpTvRrwgxRPDg0eUZTeO/NICq8KVjkte AmVHEvueKRFUg1AZjsIs76spu1UveR0u6BARgWX+lyguZ+o+DURe2t+Zs2M+SfL9nGuR DzCEczS0fPgd0szccqg+Ug2K0O1qtEJcZe7QVYIwvskBLpLFiDME0BYLBTTK6CdQOiL5 qF/YlQfNb4nHtVUPCOC0UAaJkXDso5MU6BOih8gai6Q9ftzTwyKnKyHKA84m016bXt2K 7qa9nYl05sD4uJ+QMgNkjMWxWW+ZV5Ai7Q8DA/UxeeGZLzrmJ3g1o9OZ30lzODFTwiqg afeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gRIaVA7IbW37xMjt4UyIoi28oEObcp55eUOuloap5Tw=; b=FX/Iol4wOSDhNIOUO8e/R3oHtVnzRAOAcUpt/QeQURp/qVYIElR8piAIf+b1PObjQn TbLBXblxylpu+n5MGrG3AODMrhqnciL0z0zEVHVRaAq4aiTQ2UOsv/3PYYbDw/FFqmHF YQUzar7q9r74HNanC1O0Wg8WXuDLtSuaY4dAvnizC+ax1pStkYZBGKvgKPFAf7evnqT4 HO6H4vDO25uBbUOegl8hirdmDoevsCmOkdZRbQ9Mad8kdpkZoYowh90XgZuresJHkCB4 SNuBZ57wFFyrMXICLkn9kuX4ZmUOJsfnyIls1/6ktF1R6ohrhlmZ8qkibg4BTl2NMYyV OhSQ== X-Gm-Message-State: ACrzQf1xWbCATpSj6gD1107M4NayBdx7wc9ftuO5OWXsBBb7fMR354aZ UhkH6cMnel8RiHYw9ctgBqX72uid46Wuwqb8Gsk= X-Received: by 2002:a05:620a:2699:b0:6cf:3a7f:5fe6 with SMTP id c25-20020a05620a269900b006cf3a7f5fe6mr15246902qkp.103.1666376080464; Fri, 21 Oct 2022 11:14:40 -0700 (PDT) MIME-Version: 1.0 References: <03dd39114b1e5c029cd8022245403a079ff03ae7.1666347511.git.tanjubrunostar0@gmail.com> <02a45afb-f81d-639c-1cc6-6376e31351a6@gmail.com> In-Reply-To: From: Tanju Brunostar Date: Fri, 21 Oct 2022 19:14:28 +0100 Message-ID: Subject: Re: [PATCH v2 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter To: Philipp Hortmann Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Fri, Oct 21, 2022 at 7:08 PM Tanju Brunostar wrote: > > On Fri, Oct 21, 2022 at 5:52 PM Philipp Hortmann > wrote: > > > > On 10/21/22 12:33, Tanjuate Brunostar wrote: > > > fix checkpatch errors by refactoring long lines of code in the functi= on: 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/r= xtx.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 =3D=3D PK_TYPE_11GB || byPktType =3D=3D PK_TYPE_1= 1GA) { > > > - if (byFBOption !=3D AUTO_FB_NONE && uDMAIdx !=3D TYPE_A= TIMDMA && uDMAIdx !=3D TYPE_BEACONDMA) { > > > + if (byFBOption !=3D AUTO_FB_NONE && uDMAIdx !=3D > > > + TYPE_ATIMDMA && uDMAIdx !=3D TYPE_BEACONDMA) { > > > /* Auto Fall back */ > > > struct vnt_cts_fb *buf =3D 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 !=3D AUTO_FB_NONE && uDMAIdx= !=3D TYPE_ATIMDMA && uDMAIdx !=3D TYPE_BEACONDMA) */ > > > + } else { > > > + /* if (byFBOption !=3D AUTO_FB_NONE && uDMAIdx = !=3D TYPE_ATIMDMA && > > > + * uDMAIdx !=3D TYPE_BEACONDMA) > > > + */ > > > struct vnt_cts *buf =3D pvCTS; > > > /* Get SignalField, ServiceField & Length */ > > > vnt_get_phy_field(pDevice, uCTSFrameLen, > > > @@ -964,50 +968,72 @@ static void s_vGenerateTxParameter(struct vnt_p= rivate *pDevice, > > > /* Fill RsvTime */ > > > struct vnt_rrv_time_rts *buf =3D pvRrvTime; > > > > > > - buf->rts_rrv_time_aa =3D get_rtscts_time(pDevic= e, 2, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rts_rrv_time_ba =3D get_rtscts_time(pDevic= e, 1, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rts_rrv_time_bb =3D get_rtscts_time(pDevic= e, 0, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevi= ce, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > - buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevi= ce, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > > - > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + buf->rts_rrv_time_aa =3D get_rtscts_time(pDevic= e, 2, byPktType, cbFrameSize, > > > + wCurrent= Rate); > > > + buf->rts_rrv_time_ba =3D get_rtscts_time(pDevic= e, 1, byPktType, cbFrameSize, > > > + wCurrent= Rate); > > > + buf->rts_rrv_time_bb =3D get_rtscts_time(pDevic= e, 0, byPktType, cbFrameSize, > > > + wCurrent= Rate); > > > + buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevi= ce, byPktType, cbFrameSize, > > > + wCurren= tRate, bNeedACK); > > > + buf->rrv_time_b =3D > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_= 11B, cbFrameSize, > > > + pDevice->byTopCCK= BasicRate, bNeedACK); > > > + > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBO= ption); > > > } else {/* RTS_needless, PCF mode */ > > > struct vnt_rrv_time_cts *buf =3D pvRrvTime; > > > > > > - buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevi= ce, byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > - buf->rrv_time_b =3D vnt_rxtx_rsvtime_le16(pDevi= ce, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK); > > > - buf->cts_rrv_time_ba =3D get_rtscts_time(pDevic= e, 3, byPktType, cbFrameSize, wCurrentRate); > > > + buf->rrv_time_a =3D vnt_rxtx_rsvtime_le16(pDevi= ce, byPktType, cbFrameSize, > > > + wCurren= tRate, bNeedACK); > > > + buf->rrv_time_b =3D > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_= 11B, cbFrameSize, > > > + pDevice->byTopCCK= BasicRate, bNeedACK); > > > + buf->cts_rrv_time_ba =3D get_rtscts_time(pDevic= e, 3, byPktType, cbFrameSize, > > > + wCurrent= Rate); > > > > > > /* Fill CTS */ > > > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvC= TS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); > > > + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvC= TS, cbFrameSize, bNeedACK, > > > + bDisCRC, wCurrentRate, byFBOptio= n); > > > } > > > } else if (byPktType =3D=3D PK_TYPE_11A) { > > > if (pvRTS) {/* RTS_need, non PCF mode */ > > > - struct vnt_rrv_time_ab *buf =3D pvRrvTime; > > > > Error during compiliation in next line > > > > > + struct vnt_rrv_time_ab *buf =3D pvRrvT > > > + ime; > > > > make: Entering directory '/home/kernel/Documents/git/kernels/staging' > > CC [M] drivers/staging/vt6655/rxtx.o > > drivers/staging/vt6655/rxtx.c: In function =E2=80=98s_vGenerateTxParame= ter=E2=80=99: > > drivers/staging/vt6655/rxtx.c:1014:34: error: =E2=80=98pvRrvT=E2=80=99 = undeclared (first > > use in this function) > > 1014 | struct vnt_rrv_time_ab *buf =3D pvRrvT > > | ^~~~~~ > > drivers/staging/vt6655/rxtx.c:1014:34: note: each undeclared identifier > > is reported only once for each function it appears in > > drivers/staging/vt6655/rxtx.c:1015:5: error: expected =E2=80=98,=E2=80= =99 or =E2=80=98;=E2=80=99 before > > =E2=80=98ime=E2=80=99 > > 1015 | ime; > > | ^~~ > > make[1]: *** [scripts/Makefile.build:250: drivers/staging/vt6655/rxtx.o= ] > > Error 1 > > make: *** [Makefile:1992: drivers/staging/vt6655] Error 2 > > make: Leaving directory '/home/kernel/Documents/git/kernels/staging' > > > This error occured on the first version of this patch. I corrected it, > compiled the code and the error was gone before I sent this version. > please check again. You may have seen this error on the first version > and not this one. > thanks > > Tanju On the first patch, this error was detected by the kernel bot. This time around, the kernel bot did not detect it, meaning it was fixed. > > > > > > - buf->rts_rrv_time =3D get_rtscts_time(pDevice, = 2, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , byPktType, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rts_rrv_time =3D get_rtscts_time(pDevice, = 2, byPktType, cbFrameSize, > > > + wCurrentRat= e); > > > + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , byPktType, cbFrameSize, > > > + wCurrentR= ate, bNeedACK); > > > > > > /* Fill RTS */ > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBO= ption); > > > } else if (!pvRTS) {/* RTS_needless, non PCF mode */ > > > struct vnt_rrv_time_ab *buf =3D pvRrvTime; > > > > > > - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rrv_time =3D > > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_= 11A, cbFrameSize, > > > + wCurrentRate, bNe= edACK); > > > } > > > } else if (byPktType =3D=3D PK_TYPE_11B) { > > > if (pvRTS) {/* RTS_need, non PCF mode */ > > > struct vnt_rrv_time_ab *buf =3D pvRrvTime; > > > > > > - buf->rts_rrv_time =3D get_rtscts_time(pDevice, = 0, byPktType, cbFrameSize, wCurrentRate); > > > - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rts_rrv_time =3D get_rtscts_time(pDevice, = 0, byPktType, cbFrameSize, > > > + wCurrentRat= e); > > > + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , PK_TYPE_11B, cbFrameSize, > > > + wCurrentR= ate, bNeedACK); > > > > > > /* Fill RTS */ > > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); > > > + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFra= meSize, bNeedACK, bDisCRC, > > > + psEthHeader, wCurrentRate, byFBO= ption); > > > } else { /* RTS_needless, non PCF mode */ > > > struct vnt_rrv_time_ab *buf =3D pvRrvTime; > > > > > > - buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK); > > > + buf->rrv_time =3D vnt_rxtx_rsvtime_le16(pDevice= , PK_TYPE_11B, cbFrameSize, > > > + wCurrentR= ate, bNeedACK); > > > } > > > } > > > } > >