staging/ipack: Fix bug introduced by IPack device matching
~0 can not be casted to u8. Instead of using the IPACK_ANY_ID for the format
field we introduce a new IPACK_ANY_FORMAT specifically for that field and
defined as 0xff.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 3c22bda..df4fc23 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -973,7 +973,7 @@
id->vendor = TO_NATIVE(id->vendor);
id->device = TO_NATIVE(id->device);
strcpy(alias, "ipack:");
- ADD(alias, "f", id->format != IPACK_ANY_ID, id->format);
+ ADD(alias, "f", id->format != IPACK_ANY_FORMAT, id->format);
ADD(alias, "v", id->vendor != IPACK_ANY_ID, id->vendor);
ADD(alias, "d", id->device != IPACK_ANY_ID, id->device);
add_wildcard(alias);