Commit 5cae0aa7 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer
Browse files

dm ioctl: have constant on the right side of the test

parent a6ba79c0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1835,8 +1835,8 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
	if (copy_from_user(version, user->version, sizeof(version)))
	if (copy_from_user(version, user->version, sizeof(version)))
		return -EFAULT;
		return -EFAULT;


	if ((DM_VERSION_MAJOR != version[0]) ||
	if ((version[0] != DM_VERSION_MAJOR) ||
	    (DM_VERSION_MINOR < version[1])) {
	    (version[1] > DM_VERSION_MINOR)) {
		DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
		DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
		      DM_VERSION_MAJOR, DM_VERSION_MINOR,
		      DM_VERSION_MAJOR, DM_VERSION_MINOR,
		      DM_VERSION_PATCHLEVEL,
		      DM_VERSION_PATCHLEVEL,