schid.h 525 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef ASM_SCHID_H
  3. #define ASM_SCHID_H
  4. #include <linux/string.h>
  5. #include <uapi/asm/schid.h>
  6. /* Helper function for sane state of pre-allocated subchannel_id. */
  7. static inline void
  8. init_subchannel_id(struct subchannel_id *schid)
  9. {
  10. memset(schid, 0, sizeof(struct subchannel_id));
  11. schid->one = 1;
  12. }
  13. static inline int
  14. schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
  15. {
  16. return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
  17. }
  18. #endif /* ASM_SCHID_H */