With the current parsing of mhi_flags, the following statement always return false: eob = !!(flags & MHI_EOB); This is due to the fact that 'enum mhi_flags' starts with index 0 and we are using direct AND operation to extract each bit. Fix this by using BIT() macros for defining the flags so that the reset of the code need not be touched.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -53,9 +53,9 @@ enum mhi_callback { · 52 unmodified lines | |||
| 53 | * @MHI_CHAIN: Linked transfer | 53 | * @MHI_CHAIN: Linked transfer |
| 54 | */ | 54 | */ |
| 55 | enum mhi_flags { | 55 | enum mhi_flags { |
| 56 | MHI_EOB, | 56 | MHI_EOB = BIT(0), |
| 57 | MHI_EOT, | 57 | MHI_EOT = BIT(1), |
| 58 | MHI_CHAIN, | 58 | MHI_CHAIN = BIT(2), |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | /** | 61 | /** |