Message ID | ZKP/01ECsgmdBFf2@fedora |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1194177vqx; Tue, 4 Jul 2023 05:46:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLe0RXj/c5mTEx+LXoQB4b1TmSyas1tC2hgvBVNeX2RSRSF9po08h9XPkeSRyz4Qe3jFPg X-Received: by 2002:a05:6870:3325:b0:1b0:653a:af92 with SMTP id x37-20020a056870332500b001b0653aaf92mr15061428oae.8.1688474812389; Tue, 04 Jul 2023 05:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688474812; cv=none; d=google.com; s=arc-20160816; b=xcv7uubIrN87/KS9bXQLISIlvdoyMjrnnkDqnh9T0aMA5LfMbijfykrhM6kFhfbrVJ 0BON9l5yQkj1qKwUy3yTQELkNJQUPkL4NfQMdQZEnS+T/V/7TJfRlBFgQ1xkgk0Ht3yK R1Vk0w73DQFgORFjeFgZ8XKr1Ow0pRHi9dSH6bIMgxsPUOIs8FrPB+5LJgMso8MxFHnl vJ+nriql5y5YlRV+1QVwgQcBgikvlqiSxseW3lsvZLe4esc+lSbGCuAQSfR1QNfh9z8g f4MqDJ9QYFMo1RkC1TOfU3/aaDFDyd4UyO6kt44PFzvCTVE/vn5lSfMmGLamna0crFZ9 UoRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=7cq+KauCTvjHDZs7jeFozZdeko+ieq0oUZRTMQyZuz8=; fh=eMdFCFkwwJRPoGE4xgwGI1AKfuvgCdL1BM5RpWlypVY=; b=bFuJnyrkPRSHmehXHCfK4z2a7dIh4hG3oe+FeVHNXGPnPmDTJARVDw4ic0JL2RQRvN C3GOsM01AyQ880jNlRK8ONYYniZVjqoMioIwClZ9/doCnUmmxlKFhPyXiWA66/75vo1s ssWaWCEbeJVHeVaIZz/r8lE3CeTDIiM0xDQ4elonUiSf9k7Pl/rmyCA1w+6ZFZ7QNZa8 MrPUDfLze8FocYOJYLaewiiJehf+cheO/gNc3OzGZP2KuoBfsZmeTo4DpHdWjfdXL9T5 iJ9hY9QMZ4f6tZzMYPplAXgiIQ5T4WNWcImmc6SD1KlyNm6UQLGBv55VH/U0rs2WjR2b 7ayw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a17090a004800b0025baa49fa95si20399537pjb.1.2023.07.04.05.46.39; Tue, 04 Jul 2023 05:46:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbjGDMgT (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 4 Jul 2023 08:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231436AbjGDMgR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 4 Jul 2023 08:36:17 -0400 X-Greylist: delayed 1193 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 04 Jul 2023 05:36:14 PDT Received: from wxsgout04.xfusion.com (wxsgout04.xfusion.com [36.139.87.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8ABE7E for <linux-kernel@vger.kernel.org>; Tue, 4 Jul 2023 05:36:14 -0700 (PDT) Received: from wuxshcsitd00602.xfusion.com (unknown [10.32.132.250]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4QwMF80sf5z9xk0G; Tue, 4 Jul 2023 20:15:24 +0800 (CST) Received: from wuxshcsitd00600.xfusion.com (10.32.133.213) by wuxshcsitd00602.xfusion.com (10.32.132.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 4 Jul 2023 20:15:57 +0800 Received: from wuxshcsitd00600.xfusion.com ([fe80::6811:d152:496c:4db9]) by wuxshcsitd00600.xfusion.com ([fe80::6811:d152:496c:4db9%6]) with mapi id 15.01.2507.023; Tue, 4 Jul 2023 20:15:57 +0800 From: wangjinchao <wangjinchao@xfusion.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "outreachy@lists.linux.dev" <outreachy@lists.linux.dev> CC: xulei <stone.xulei@xfusion.com> Subject: [PATCH] staging: rtl8192u: Fix assignment in if condition Thread-Topic: [PATCH] staging: rtl8192u: Fix assignment in if condition Thread-Index: AQHZrmkySezXLmADBkO4wJdvqf1PeQ== Date: Tue, 4 Jul 2023 12:15:57 +0000 Message-ID: <ZKP/01ECsgmdBFf2@fedora> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-imapappendstamp: wuxshcsitd00600.xfusion.com (15.01.2507.023) x-originating-ip: [10.81.18.204] Content-Type: text/plain; charset="gb2312" Content-ID: <CCA9E587FFE6854982C83B7CB9B21800@xfusion.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770494164572374779?= X-GMAIL-MSGID: =?utf-8?q?1770494164572374779?= |
Series |
staging: rtl8192u: Fix assignment in if condition
|
|
Commit Message
Wang Jinchao
July 4, 2023, 12:15 p.m. UTC
I just participated in Outreachy of KernelNewbies and fixed one
'ERROR: do not use assignment in if condition' issue reported by
checkpatch.pl on drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c.
Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.40.0
Comments
On Tue, Jul 04, 2023 at 12:15:57PM +0000, wangjinchao wrote: > I just participated in Outreachy of KernelNewbies and fixed one > 'ERROR: do not use assignment in if condition' issue reported by > checkpatch.pl on drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c. > > Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com> > --- > drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c > index ca09367005e1..52ff9e62ec08 100644 > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c > @@ -1121,8 +1121,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, > > /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ > > + keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt); > if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && > - (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) { > + keyidx < 0) { > netdev_dbg(ieee->dev, "decrypt frame error\n"); > goto rx_dropped; > } > -- > 2.40.0 > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what a proper Subject: line should look like. - It looks like you did not use your "real" name for the patch on either the Signed-off-by: line, or the From: line (both of which have to match). Please read the kernel file, Documentation/process/submitting-patches.rst for how to do this correctly. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index ca09367005e1..52ff9e62ec08 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -1121,8 +1121,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ + keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt); if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && - (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) { + keyidx < 0) { netdev_dbg(ieee->dev, "decrypt frame error\n"); goto rx_dropped; }