Samuel Zou
18e643cd6c
vdpasim: Fix some coccinelle warnings
...
Fix below warnings reported by coccicheck:
drivers/vdpa/vdpa_sim/vdpa_sim.c:104:1-10: WARNING: Assignment of 0/1 to bool variable
drivers/vdpa/vdpa_sim/vdpa_sim.c:164:7-11: WARNING: Unsigned expression compared with zero: read <= 0
drivers/vdpa/vdpa_sim/vdpa_sim.c:169:7-12: WARNING: Unsigned expression compared with zero: write <= 0
1. The 'ready' variable in vdpasim_virtqueue struct is bool type.
It is better to initialize vq->ready to false
2. Modify 'read' and 'write' variables type from size_t to ssize_t.
And preserve the reverse christmas tree ordering of local variables.
Fixes: 2c53d0f64c ("vdpasim: vDPA device simulator")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Samuel Zou <zou_wei@huawei.com >
Link: https://lore.kernel.org/r/1588990802-28451-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2020-06-04 15:36:52 -04:00
..
2020-05-18 13:15:13 +02:00
2020-04-28 17:44:34 +02:00
2020-03-23 07:59:38 +01:00
2020-04-23 09:59:30 -06:00
2020-03-25 11:50:48 +01:00
2020-03-23 07:59:38 +01:00
2020-05-21 10:54:32 +02:00
2020-05-22 11:10:42 -07:00
2020-03-16 08:57:40 +01:00
2020-05-15 16:32:20 +02:00
2020-02-24 15:06:07 -05:00
2020-05-17 16:07:30 -07:00
2020-05-26 17:15:06 -07:00
2020-04-05 09:24:58 +02:00
2020-04-19 17:50:00 +01:00
2020-04-27 10:30:11 +02:00
2020-04-10 11:32:22 +02:00
2020-06-04 15:36:51 -04:00
2020-05-23 10:26:31 -07:00
2020-03-25 08:35:03 +09:00
2020-03-09 11:12:19 +01:00
2020-05-19 22:26:01 +05:30
2020-04-30 19:47:39 +05:30
2020-03-30 16:40:08 -07:00
2020-03-25 11:50:48 +01:00
2020-04-03 13:22:40 -07:00
2020-05-22 20:06:25 +02:00
2020-03-30 20:45:30 -07:00
2020-05-29 14:01:49 +02:00
2020-05-29 12:32:46 -07:00
2020-05-04 11:24:58 +02:00
2020-04-27 13:28:27 -07:00
2020-05-13 10:06:09 -07:00
2020-03-25 22:30:46 -07:00
2020-05-15 16:32:20 +02:00
2020-05-15 11:23:49 +02:00
2020-03-29 10:35:50 +02:00
2020-04-04 18:07:59 -07:00
2020-03-30 16:40:08 -07:00
2020-05-10 10:53:36 +01:00
2020-05-27 21:14:09 -03:00
2020-05-28 12:41:11 -07:00
2020-04-29 13:11:44 +02:00
2020-05-29 15:27:50 +02:00
2020-05-15 16:32:20 +02:00
2020-04-17 08:59:55 +01:00
2020-04-16 13:52:31 -07:00
2020-04-06 23:12:08 +02:00
2020-03-30 11:43:51 -07:00
2020-04-03 13:22:40 -07:00
2020-03-19 23:04:32 -05:00
2020-04-30 16:45:08 -07:00
2020-03-30 15:05:01 -07:00
2020-04-03 15:05:35 -07:00
2020-03-26 22:40:47 -04:00
2020-03-30 07:35:28 +01:00
2020-06-02 02:45:13 -04:00
2020-05-25 10:45:17 +02:00
2020-04-28 15:04:09 +02:00
2020-05-20 13:23:55 -07:00
2020-06-02 02:45:13 -04:00
2020-05-29 17:04:14 -07:00
2020-04-03 14:25:02 -07:00
2020-04-08 21:03:40 -07:00
2020-05-27 20:32:56 +02:00
2020-03-25 19:23:49 +01:00
2020-04-17 08:31:34 -05:00
2020-04-13 16:14:55 +05:30
2020-04-05 22:05:23 +02:00
2020-04-14 19:16:51 -05:00
2020-03-31 18:48:22 +02:00
2020-03-31 10:05:01 -07:00
2020-04-30 12:10:49 +05:30
2020-05-12 14:29:29 +02:00
2020-05-06 16:40:14 -07:00
2020-04-10 15:36:22 -07:00
2020-03-30 16:40:08 -07:00
2020-04-03 00:09:59 +11:00
2020-04-21 15:45:32 -07:00
2020-04-03 21:41:42 +02:00
2020-05-23 10:26:31 -07:00
2020-04-29 19:57:45 +02:00
2020-04-23 09:28:15 -07:00
2020-04-17 06:05:29 -04:00
2020-04-07 19:48:52 -07:00
2020-05-13 12:14:51 -07:00
2020-03-18 12:27:04 +01:00
2020-05-11 19:43:25 -04:00
2020-03-12 16:51:15 +01:00
2020-05-16 19:55:50 +02:00
2020-04-03 13:22:40 -07:00
2020-04-02 15:50:04 -07:00
2020-03-12 15:44:12 +02:00
2020-05-15 16:04:24 +02:00
2020-05-14 20:27:05 -04:00
2020-04-03 15:05:35 -07:00
2020-04-07 20:00:16 -07:00
2020-04-28 19:00:59 +02:00
2020-05-15 14:55:10 +02:00
2020-03-18 12:34:10 +01:00
2020-05-15 15:42:17 +02:00
2020-06-04 15:36:52 -04:00
2020-04-23 12:10:01 -06:00
2020-06-04 15:36:51 -04:00
2020-04-07 20:24:34 -07:00
2020-03-19 07:41:03 +01:00
2020-06-04 15:36:51 -04:00
2020-04-08 11:18:38 +02:00
2020-04-17 10:35:17 -07:00
2020-04-03 13:12:26 -07:00
2020-04-08 10:51:53 -07:00
2020-04-08 10:51:53 -07:00