Skip to content

Commit

Permalink
metag: move EXPORT_SYMBOL(csum_partial) to metag_ksyms.c
Browse files Browse the repository at this point in the history
Move EXPORT_SYMBOL(csum_partial) from lib/checksum.c into metag_ksyms.c
so that it doesn't get omitted by the static linker if it's not used by
any other statically linked code, which can result in undefined symbols
when building modules.

For example a randconfig caused the following error:
ERROR: "csum_partial" [fs/reiserfs/reiserfs.ko] undefined!

Signed-off-by: James Hogan <james.hogan@imgtec.com>
  • Loading branch information
James Hogan committed Jul 4, 2013
1 parent 8b8b241 commit c20eb0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions arch/metag/kernel/metag_ksyms.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <linux/export.h>
#include <linux/types.h>

#include <asm/checksum.h>
#include <asm/div64.h>
#include <asm/ftrace.h>
#include <asm/page.h>
Expand All @@ -15,6 +17,9 @@ EXPORT_SYMBOL(max_pfn);
EXPORT_SYMBOL(min_low_pfn);
#endif

/* Network checksum functions */
EXPORT_SYMBOL(csum_partial);

/* TBI symbols */
EXPORT_SYMBOL(__TBI);
EXPORT_SYMBOL(__TBIFindSeg);
Expand Down
1 change: 0 additions & 1 deletion arch/metag/lib/checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ __wsum csum_partial(const void *buff, int len, __wsum wsum)
result += 1;
return (__force __wsum)result;
}
EXPORT_SYMBOL(csum_partial);

/*
* this routine is used for miscellaneous IP-like checksums, mainly
Expand Down

0 comments on commit c20eb0f

Please sign in to comment.