#include <dspbridge/uuidutil.h>
#include <dspbridge/nldr.h>
+#include <linux/gcd.h>
/* Name of section containing dynamic load mem */
#define DYNMEMSECT ".dspbridge_mem"
static bool find_in_persistent_lib_array(struct nldr_nodeobject *nldr_node_obj,
struct dbll_library_obj *lib);
static u32 find_lcm(u32 a, u32 b);
-static u32 find_gcf(u32 a, u32 b);
/*
* ======== nldr_allocate ========
{
u32 ret;
- ret = a * b / find_gcf(a, b);
+ ret = a * b / gcd(a, b);
return ret;
}
-/*
- * ================ Find GCF (Greatest Common Factor ) ===
- */
-static u32 find_gcf(u32 a, u32 b)
-{
- u32 c;
-
- /* Get the GCF (Greatest common factor between the numbers,
- * using Euclidian Algo */
- while ((c = (a % b))) {
- a = b;
- b = c;
- }
- return b;
-}
-
#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* nldr_find_addr() - Find the closest symbol to the given address based on