OSDN Git Service

xen/blkback: move blkif_get_x86_*_req() into blkback.c
authorJuergen Gross <jgross@suse.com>
Fri, 16 Dec 2022 13:49:18 +0000 (14:49 +0100)
committerJuergen Gross <jgross@suse.com>
Tue, 25 Apr 2023 09:09:30 +0000 (11:09 +0200)
commitcbfac7707ba16619006a4fd60faac46303fd2f3e
tree5435db2ca32d63cd8a7e957c2b121852dd2bf4de
parente7b4c07d4b42676691f3c815f05c1bbf071dc718
xen/blkback: move blkif_get_x86_*_req() into blkback.c

There is no need to have the functions blkif_get_x86_32_req() and
blkif_get_x86_64_req() in a header file, as they are used in one place
only.

So move them into the using source file and drop the inline qualifier.

While at it fix some style issues, and simplify the code by variable
reusing and using min() instead of open coding it.

Instead of using barrier() use READ_ONCE() for avoiding multiple reads
of nr_segments.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h