mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
nvdimm/pfn_dev: Avoid unnecessary endian conversion
use the local variable that already have the converted values. No functional change in this patch. Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Link: https://lore.kernel.org/r/20230809053512.350660-2-aneesh.kumar@linux.ibm.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
parent
e96d9a938e
commit
feb72e9b20
@ -601,14 +601,12 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!IS_ALIGNED(res->start + le32_to_cpu(pfn_sb->start_pad),
|
||||
memremap_compat_align())) {
|
||||
if (!IS_ALIGNED(res->start + start_pad, memremap_compat_align())) {
|
||||
dev_err(&nd_pfn->dev, "resource start misaligned\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!IS_ALIGNED(res->end + 1 - le32_to_cpu(pfn_sb->end_trunc),
|
||||
memremap_compat_align())) {
|
||||
if (!IS_ALIGNED(res->end + 1 - end_trunc, memremap_compat_align())) {
|
||||
dev_err(&nd_pfn->dev, "resource end misaligned\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user