public inbox for [email protected]
 help / color / mirror / Atom feed
From: Xinghui Li <[email protected]>
To: Jens Axboe <[email protected]>, <[email protected]>
Cc: <[email protected]>, <[email protected]>,
	Xinghui Li <[email protected]>,
	kernel test robot <[email protected]>
Subject: Re: [PATCH v2] io_uring: fix two assignments in if conditions
Date: Thu, 03 Nov 2022 10:50:32 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>



在 2022/11/2 22:19,“Jens Axboe”<[email protected]> 写入:

>    On 11/2/22 2:25 AM, [email protected] wrote:
>    > From: Xinghui Li <[email protected]>
>    > 
>    > 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.



  reply	other threads:[~2022-11-03  2:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  8:25 [PATCH v2] io_uring: fix two assignments in if conditions korantwork
2022-11-02 14:19 ` Jens Axboe
2022-11-03  2:50   ` Xinghui Li [this message]
2022-11-05 15:29     ` Jens Axboe
2022-11-05 15:31 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox