Merge tag 'kbuild-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux-block.git] / drivers / net / ethernet / mellanox / mlx5 / core / main.c
index 2f2c352f301e452c9afe188242df4311cbbdd5e2..c568896cfb231c01c6939ee2140fdac21ce47cd4 100644 (file)
@@ -237,8 +237,8 @@ static void mlx5_set_driver_version(struct mlx5_core_dev *dev)
        remaining_size = max_t(int, 0, driver_ver_sz - strlen(string));
 
        snprintf(string + strlen(string), remaining_size, "%u.%u.%u",
-                (u8)((LINUX_VERSION_CODE >> 16) & 0xff), (u8)((LINUX_VERSION_CODE >> 8) & 0xff),
-                (u16)(LINUX_VERSION_CODE & 0xffff));
+               LINUX_VERSION_MAJOR, LINUX_VERSION_PATCHLEVEL,
+               LINUX_VERSION_SUBLEVEL);
 
        /*Send the command*/
        MLX5_SET(set_driver_version_in, in, opcode,