Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp2589636rwl; Sat, 5 Nov 2022 08:43:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Zxo7CeI6uc2mgKqWcTh3pUTsIVbDz4+8Ctz+jHtwk94DXFMAdXCP4umrijh3cwMW2RZwr X-Received: by 2002:a17:907:3207:b0:741:3a59:738d with SMTP id xg7-20020a170907320700b007413a59738dmr39075408ejb.110.1667663023631; Sat, 05 Nov 2022 08:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667663023; cv=none; d=google.com; s=arc-20160816; b=POhMEW4oghJdgiWPl3XqRQfHvf+GEnPEjSrEDqR3VUbQcBXyEPnpy8/4G+MwQSa4gS YorjG4hUYs2gP6SeW2TSKDdxyPMi8UbwqATkaIfwAVK8K2gvWOHWLdchzODl+mjSHHB2 shITZWHTIbH4bGfzmsnNQM8tlgMmml/Ld0FOUdemGSrh0WhtOqpipgMXEeILxGdqTpPA oxOzXmkDbgznVNEdtoTMp1OAoef2ch6zdnFs7PG+8HWH+crWAcOOjLdZHRPfdwgQBVDj FG6cRuGPdZwPmgxIWifqwn4CvFnEc2RyFf7mmKzVE48h6uuDHXEf7wlEnsnxTjMSAuvo ICoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=00DgZK523D85M1Nxb+SV9yF5Q1ORrXLgMLtTtYVrNsc=; b=0vTNSuS+12KSq+Pppzk2cxVkhmApVQSMmp9c7+rqbObm+Fo5iCIOux8Yg0I4j8gbgr MXCoPlZqlc+WJQWH+GGnieEdSVU99q4yFJ0cHh5C+x3/qQs3lj0v4/myfA1zlzprWIvI 9qOdNPxdhJa83WGLNECjS6gdyLdt3jvvK55uJsxI4pQ99irloD0QN53h5YsB1p10VEjT ypn+ZWZX5YlQ9g8T3GuL42iN8FMwhCf6m8e8qME+7kS3ZVVsI6VZawBSE4gwin2uCSmW PlSk0dvmn6km7mwEGnBWbWdxf/FUVjfHvnfor2cgMln/imcoXQU/EmRAKATA0NL27FXA mMuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=6uxrNprQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb34-20020a1709071ca200b007a1084820f6si2849524ejc.230.2022.11.05.08.43.20; Sat, 05 Nov 2022 08:43:43 -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=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=6uxrNprQ; 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 S229971AbiKEP30 (ORCPT + 96 others); Sat, 5 Nov 2022 11:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbiKEP3X (ORCPT ); Sat, 5 Nov 2022 11:29:23 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8201219F for ; Sat, 5 Nov 2022 08:29:21 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id m6-20020a17090a5a4600b00212f8dffec9so6914881pji.0 for ; Sat, 05 Nov 2022 08:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=00DgZK523D85M1Nxb+SV9yF5Q1ORrXLgMLtTtYVrNsc=; b=6uxrNprQAkuiiFB+406C419VH5INIIfvNDj+0MqFaUi+WS0bfJgqoBYFjp/BvqcgYs 3KyAMG4ai1oAeSeRh8JCqJgXSyRgpXYDvxZs23oqTmjeXAQ+F/kpFBwJM4TpnLDwmUvd LQ0InLZ6YtKG8mE1LQE4bn5R5gCo00u5byrQZxR8Yl3D4IepfHVRSnL8DH4vewkjmK7j MwwQceHcI/j2cCI1vMY1uluMC0+/k2rQuTOHU6XUAoZFTQzSONMW5SMbJhmJFtKCjM2a R8ng9u805xB03aqZYObr7HVChXTqa4NGdAifdLG0qDronSPr1muWorpl2u3xbyI+8fjV fhvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=00DgZK523D85M1Nxb+SV9yF5Q1ORrXLgMLtTtYVrNsc=; b=C0/LSuvXbBJnGJXXuilGj5nT6pdR/Wd8MJYgP5kIn2cBFwnv6tZhhJwVmJTLVThyoq AHHVvgG+nq2ooCWokUsk5MWLDvXjLnaaeESc4byImneb1WknUx1q/B/J9T7tUTr6ylVh Rd0kDa0rJXCYdFJ433KraeHq6UbQJEeLba6w5jmNgHv/Gimh7tzRBJGqaFWYkOHqVRfV 1c1On3h7MZA9Qc/aiBnmNiAadqPyt5GjJb1+kiHa6wxynQHDSdZCnkYeqP9a699X3Adj lhYmIzSn1o0SSHUMOfxraw8bmlwhwop9T5o9J6pqtsLH5x+LhCB6ksGMzdwcYtVdB+6M ma4w== X-Gm-Message-State: ACrzQf3slDOL+K4iIEKI1dV4vbAdPGwMCNxAB9IM0iVeHW9mvhlYgxzq f9ZtrjOYNNbTYSeKxk4wPe7sPg== X-Received: by 2002:a17:90a:c691:b0:212:fd5f:1ab8 with SMTP id n17-20020a17090ac69100b00212fd5f1ab8mr58076257pjt.11.1667662161211; Sat, 05 Nov 2022 08:29:21 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id u9-20020a17090341c900b001754064ac31sm1799451ple.280.2022.11.05.08.29.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Nov 2022 08:29:20 -0700 (PDT) Message-ID: Date: Sat, 5 Nov 2022 09:29:19 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v2] io_uring: fix two assignments in if conditions Content-Language: en-US To: Xinghui Li , asml.silence@gmail.com Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, Xinghui Li , kernel test robot References: <20221102082503.32236-1-korantwork@gmail.com> <630269a9-29a3-6b75-0a67-449ec36e7e5e@kernel.dk> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,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 11/2/22 8:50 PM, Xinghui Li wrote: > > > ?? 2022/11/2 22:19??Jens Axboe? ??: > >> On 11/2/22 2:25 AM, korantwork@gmail.com wrote: >> > From: Xinghui Li >> > >> > Fixs two error: >> > >> > "ERROR: do not use assignment in if condition >> > 130: FILE: io_uring/net.c:130: >> > + if (!(issue_flags & IO_URING_F_UNLOCKED) && >> > >> > ERROR: do not use assignment in if condition >> > 599: FILE: io_uring/poll.c:599: >> > + } else if (!(issue_flags & IO_URING_F_UNLOCKED) &&" >> > reported by checkpatch.pl in net.c and poll.c . >> >> I'm not super excited about this patch as the previous one >> wasn't even compiled? Did you test this one, compile and runtime? >> > > First of all, I'm really really really SORRY for the last stupid > warning and my careless. But I did make kernel and install it in my > device. Also, I did the fio test with polling. However, there is no > warning be reported by 'make' command. But when I check the patch code > with 'smatch', I did find that warning. I realized how stupid that > mistake was.... So, in addition to compiling and installing this > kernel, I also checked the code using the static analysis tool this > time. There is no new error or warning. > " > make -j64 CHECK="~/workspace/smatch/smatch" C=1 > DESCEND objtool > CALL scripts/checksyscalls.sh > CC io_uring/net.o > CC io_uring/poll.o > CHECK io_uring/poll.c > io_uring/poll.c: note: in included file (through io_uring/io_uring.h): > io_uring/slist.h:138:29: warning: no newline at end of file > CHECK io_uring/net.c > io_uring/poll.c: note: in included file (through include/trace/events/io_uring.h): > ./include/linux/io_uring_types.h:151:37: warning: array of flexible structures > io_uring/net.c: note: in included file (through io_uring/io_uring.h): > io_uring/slist.h:138:29: warning: no newline at end of file > io_uring/net.c: note: in included file (through io_uring/io_uring.h): > ./include/linux/io_uring_types.h:151:37: warning: array of flexible structures > ... > BUILD arch/x86/boot/bzImage > Kernel: arch/x86/boot/bzImage is ready (#10) > " > > Again, I am ashamed of the previous mistake. And I totally understand > if you reject this one. All good, thanks for doing the due diligence this time around for v2. I'll get it applied for 6.2, thanks. -- Jens Axboe