mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 11:56:45 +07:00
9ef9b20bd0
Fix these warnings: drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default] drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int] drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default] And this build error: ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined! Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 lines
451 B
C
16 lines
451 B
C
#include <linux/bio.h>
|
|
#include <linux/io.h>
|
|
#include <linux/export.h>
|
|
#include <xen/page.h>
|
|
|
|
bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
|
|
const struct bio_vec *vec2)
|
|
{
|
|
unsigned long mfn1 = pfn_to_mfn(page_to_pfn(vec1->bv_page));
|
|
unsigned long mfn2 = pfn_to_mfn(page_to_pfn(vec2->bv_page));
|
|
|
|
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) &&
|
|
((mfn1 == mfn2) || ((mfn1+1) == mfn2));
|
|
}
|
|
EXPORT_SYMBOL(xen_biovec_phys_mergeable);
|