mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst: Port to Linux kernel v5.7 (merge trunk r8863)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1571,6 +1571,21 @@ static inline void put_unaligned_be64(uint64_t i, void *p)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0)
|
||||
/* Only use get_unaligned_be24() if reading p - 1 is allowed. */
|
||||
static inline uint32_t get_unaligned_be24(const uint8_t *const p)
|
||||
{
|
||||
return get_unaligned_be32(p - 1) & 0xffffffU;
|
||||
}
|
||||
|
||||
static inline void put_unaligned_be24(const uint32_t v, uint8_t *const p)
|
||||
{
|
||||
p[0] = v >> 16;
|
||||
p[1] = v >> 8;
|
||||
p[2] = v >> 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/vmalloc.h> */
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) && \
|
||||
|
||||
@@ -5390,19 +5390,6 @@ if (!(condition)) { \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Only use get_unaligned_be24() if reading p - 1 is allowed. */
|
||||
static inline uint32_t get_unaligned_be24(const uint8_t *const p)
|
||||
{
|
||||
return get_unaligned_be32(p - 1) & 0xffffffU;
|
||||
}
|
||||
|
||||
static inline void put_unaligned_be24(const uint32_t v, uint8_t *const p)
|
||||
{
|
||||
p[0] = v >> 16;
|
||||
p[1] = v >> 8;
|
||||
p[2] = v >> 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
|
||||
const char *scst_get_opcode_name(struct scst_cmd *cmd);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user