xpp: '%d' -> '%lu' when displaying module_refcount on kernel versions >= 3.3
Upstream commit bd77c047 "module: struct module_ref should contains long fields" changed the return of module_refcount from int to unsigned long. This change eliminates a warning from the string format specifier. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10485 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
59197c5112
commit
d1be14acf2
@ -80,6 +80,12 @@ static const xproto_table_t *xproto_table(xpd_type_t cardtype)
|
|||||||
return xprotocol_tables[cardtype];
|
return xprotocol_tables[cardtype];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||||
|
#define MODULE_REFCOUNT_FORMAT "%s refcount was %d\n"
|
||||||
|
#else
|
||||||
|
#define MODULE_REFCOUNT_FORMAT "%s refcount was %lu\n"
|
||||||
|
#endif
|
||||||
|
|
||||||
const xproto_table_t *xproto_get(xpd_type_t cardtype)
|
const xproto_table_t *xproto_get(xpd_type_t cardtype)
|
||||||
{
|
{
|
||||||
const xproto_table_t *xtable;
|
const xproto_table_t *xtable;
|
||||||
@ -100,7 +106,7 @@ const xproto_table_t *xproto_get(xpd_type_t cardtype)
|
|||||||
if (xtable) {
|
if (xtable) {
|
||||||
BUG_ON(!xtable->owner);
|
BUG_ON(!xtable->owner);
|
||||||
#ifdef CONFIG_MODULE_UNLOAD
|
#ifdef CONFIG_MODULE_UNLOAD
|
||||||
DBG(GENERAL, "%s refcount was %d\n", xtable->name,
|
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
|
||||||
module_refcount(xtable->owner));
|
module_refcount(xtable->owner));
|
||||||
#endif
|
#endif
|
||||||
if (!try_module_get(xtable->owner)) {
|
if (!try_module_get(xtable->owner)) {
|
||||||
@ -116,7 +122,7 @@ void xproto_put(const xproto_table_t *xtable)
|
|||||||
{
|
{
|
||||||
BUG_ON(!xtable);
|
BUG_ON(!xtable);
|
||||||
#ifdef CONFIG_MODULE_UNLOAD
|
#ifdef CONFIG_MODULE_UNLOAD
|
||||||
DBG(GENERAL, "%s refcount was %d\n", xtable->name,
|
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
|
||||||
module_refcount(xtable->owner));
|
module_refcount(xtable->owner));
|
||||||
BUG_ON(module_refcount(xtable->owner) <= 0);
|
BUG_ON(module_refcount(xtable->owner) <= 0);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user