Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206032
b: refs/heads/master
c: 0c4a938
h: refs/heads/master
v: v3
  • Loading branch information
Ernesto Ramos authored and Greg Kroah-Hartman committed Jul 28, 2010
1 parent 1d646c9 commit b270fb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c9305b80cb81c94d12c7109f8abfe4bc5b08a23
refs/heads/master: 0c4a938ed4a2cd0c2d31c5c616594bae0865d7f3
20 changes: 2 additions & 18 deletions trunk/drivers/staging/tidspbridge/rmgr/nldr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <dspbridge/uuidutil.h>

#include <dspbridge/nldr.h>
#include <linux/gcd.h>

/* Name of section containing dynamic load mem */
#define DYNMEMSECT ".dspbridge_mem"
Expand Down Expand Up @@ -304,7 +305,6 @@ static void unload_ovly(struct nldr_nodeobject *nldr_node_obj,
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 ========
Expand Down Expand Up @@ -1887,27 +1887,11 @@ static u32 find_lcm(u32 a, u32 b)
{
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
Expand Down

0 comments on commit b270fb4

Please sign in to comment.