Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
module: Fix compile error for ref_module when CONFIG_MODULES is not set
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Barbaros Tokaoğlu  
View profile  
 More options Aug 1 2012, 1:57 pm
Newsgroups: fa.linux.kernel
From: Barbaros Tokaoğlu <barbar...@gmail.com>
Date: Wed, 01 Aug 2012 17:57:21 UTC
Local: Wed, Aug 1 2012 1:57 pm
Subject: [PATCH] module: Fix compile error for ref_module when CONFIG_MODULES is not set
ref_module function is not defined when CONFIG_MODULES is not set thus
it causes compile error when a module which is set to be built-in uses it.
This patch defines a dummy ref_module function when CONFIG_MODULES
is not set.

Signed-off-by: Barbaros Tokaoğlu <barbar...@gmail.com>
---
 include/linux/module.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index fbcafe2..ba9a7d0 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -553,6 +553,11 @@ static inline void module_put(struct module *module)
 {
 }

+static inline int ref_module(struct module *a, struct module *b)
+{
+       return 0;
+}
+
 #define module_name(mod) "kernel"

 /* For kallsyms to ask for address resolution.  NULL means not found. */
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rusty Russell  
View profile  
 More options Aug 6 2012, 2:58 am
Newsgroups: fa.linux.kernel
From: Rusty Russell <ru...@rustcorp.com.au>
Date: Mon, 06 Aug 2012 06:58:22 UTC
Local: Mon, Aug 6 2012 2:58 am
Subject: Re: [PATCH] module: Fix compile error for ref_module when CONFIG_MODULES is not set

On Wed, 1 Aug 2012 20:57:07 +0300, Barbaros Tokaoğlu <barbar...@gmail.com> wrote:
> ref_module function is not defined when CONFIG_MODULES is not set thus
> it causes compile error when a module which is set to be built-in uses it.
> This patch defines a dummy ref_module function when CONFIG_MODULES
> is not set.

> Signed-off-by: Barbaros Tokaoğlu <barbar...@gmail.com>

Hi Barbaros,

        It's usually a good idea to paste the error message into the
commit message for compile fixes: it helps people googling the problem.

In this case, it's particularly important, because I can't find any
users of ref_module() outside module.c itself: it's only exported for
ksplice to use.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barbaros Tokaoğlu  
View profile  
 More options Aug 6 2012, 10:57 am
Newsgroups: fa.linux.kernel
From: Barbaros Tokaoğlu <barbar...@gmail.com>
Date: Mon, 06 Aug 2012 14:57:58 UTC
Local: Mon, Aug 6 2012 10:57 am
Subject: Re: [PATCH] module: Fix compile error for ref_module when CONFIG_MODULES is not set
Hi Rusty,

You are right, this was not for something in the kernel. I needed
ref_module to add some sort of dynamic dependency between modules but
this caused compile error when CONFIG_MODULES is not set. Another
option was using #ifdef CONFIG_MODULES check but the way in the patch
seemed correct to me.

However, if ref_module is exported only for ksplice, then you can
ignore this patch.

Thanks,
Barbaros

On Aug 6, 2012, at 9:58 AM, Rusty Russell <ru...@rustcorp.com.au> wrote:

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »