Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef ASM_SCHID_H
0003 #define ASM_SCHID_H
0004 
0005 #include <linux/string.h>
0006 #include <uapi/asm/schid.h>
0007 
0008 /* Helper function for sane state of pre-allocated subchannel_id. */
0009 static inline void
0010 init_subchannel_id(struct subchannel_id *schid)
0011 {
0012     memset(schid, 0, sizeof(struct subchannel_id));
0013     schid->one = 1;
0014 }
0015 
0016 static inline int
0017 schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
0018 {
0019     return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
0020 }
0021 
0022 #endif /* ASM_SCHID_H */