* Converts a given depth value to its corresponding mask value. * * depth (IN) : range = 1 - 32 * mask (OUT) : 32bit mask */
| 83 | * mask (OUT) : 32bit mask |
| 84 | */ |
| 85 | static uint32_t __attribute__((pure)) |
| 86 | depth_to_mask(uint8_t depth) |
| 87 | { |
| 88 | VERIFY_DEPTH(depth); |
| 89 | |
| 90 | /* To calculate a mask start with a 1 on the left hand side and right |
| 91 | * shift while populating the left hand side with 1's |
| 92 | */ |
| 93 | return (int)0x80000000 >> (depth - 1); |
| 94 | } |
| 95 | |
| 96 | /* |
| 97 | * Converts given depth value to its corresponding range value. |
no outgoing calls
no test coverage detected