Compilation fixed; defaults to fallback using packages.list
This commit is contained in:
@@ -23,35 +23,6 @@
|
|||||||
#error "LKM mode is not supported on Linux 6.8+, aborting build."
|
#error "LKM mode is not supported on Linux 6.8+, aborting build."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* list_count_nodes - count the number of nodes in a list
|
|
||||||
* @head: the head of the list
|
|
||||||
*
|
|
||||||
* This function iterates over the list starting from @head and counts
|
|
||||||
* the number of nodes in the list. It does not modify the list.
|
|
||||||
*
|
|
||||||
* Context: Any context. The function is safe to call in any context,
|
|
||||||
* including interrupt context, as it does not sleep or allocate
|
|
||||||
* memory.
|
|
||||||
*
|
|
||||||
* Return: the number of nodes in the list (excluding the head)
|
|
||||||
*/
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
|
|
||||||
static inline __maybe_unused size_t list_count_nodes(const struct list_head *head)
|
|
||||||
{
|
|
||||||
const struct list_head *pos;
|
|
||||||
size_t count = 0;
|
|
||||||
|
|
||||||
if (!head)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
list_for_each(pos, head)
|
|
||||||
count++;
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adapt to Huawei HISI kernel without affecting other kernels ,
|
* Adapt to Huawei HISI kernel without affecting other kernels ,
|
||||||
* Huawei Hisi Kernel EBITMAP Enable or Disable Flag ,
|
* Huawei Hisi Kernel EBITMAP Enable or Disable Flag ,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user