18e643cd6c
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:
|
||
---|---|---|
.. | ||
Makefile | ||
vdpa_sim.c |