mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-03 21:01:50 +00:00
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>
This commit is contained in:
parent
7953e44cef
commit
5948ae27fb
3 changed files with 4 additions and 2 deletions
|
@ -600,6 +600,7 @@ struct x86_cpu_id {
|
|||
#define X86_MODEL_ANY 0
|
||||
#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
|
||||
|
||||
#define IPACK_ANY_FORMAT 0xff
|
||||
#define IPACK_ANY_ID (~0)
|
||||
struct ipack_device_id {
|
||||
__u8 format; /* Format version or IPACK_ANY_ID */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue