mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Schlichter <schlicht@uni-mannheim.de>
To: "David S. Miller" <davem@redhat.com>
Cc: akpm@digeo.com, mfc@krycek.org, linux-kernel@vger.kernel.org
Subject: Re: Error during compile of 2.5.69-mm8
Date: Fri, 23 May 2003 03:06:45 +0200	[thread overview]
Message-ID: <200305230306.54981.schlicht@uni-mannheim.de> (raw)
In-Reply-To: <20030522.172304.08334616.davem@redhat.com>


[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 1406 bytes --]

On May 23, David S. Miller wrote:
>    From: Thomas Schlichter <schlicht@uni-mannheim.de>
>    Date: Fri, 23 May 2003 02:13:34 +0200
>
>    > Therefore, it was a complete error for anyone else to start using this
>    > macro for other structures.
>
>    So nobody should better use THIS_MODULE?!
>
> No, it is exactly what they should use.
>
> They should avoid using SET_MODULE_OWNER.

This is clear to me, of course, it should have been just a very extreme 
example...

>    For ME and many other driver developers SET_MODULE_OWNER does not belong
> to netdevice, it belongs to the module infrastructure!
>
> Then by changing SET_MODULE_OWNER you will break source backwards
> compatability for every single network device driver out there,
> something I was explicitly trying to avoid.

OK, now I see clearer...
What you did broke everything but netdevices and what I did broke nothing but 
netdevices... So I attached a very small patch that will help braking 
nothing... ;-)

> SET_MODULE_OWNER() is a bogus interface because it is typeless.
>
> Therefore I suggest that you create macros specific to your individual
> structures, and use these to achieve 2.4.x/2.5.x build compatability
> in setting the ->owner field of such structs.

That is a good idea, but how should we get rid off this when it is used over 
and over??

Best regards
   Thomas Schlichter

[-- Attachment #1.2: SET_MODULE_OWNER.diff --]
[-- Type: text/x-diff, Size: 887 bytes --]

--- linux-2.5.69-bk15/include/linux/module.h.orig	Fri May 23 02:42:07 2003
+++ linux-2.5.69-bk15/include/linux/module.h	Fri May 23 02:45:39 2003
@@ -438,6 +438,10 @@
 
 #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
 
+#ifndef SET_MODULE_OWNER
+#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)
+#endif
+
 /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
 
 struct obsolete_modparm {
--- linux-2.5.69-bk15/include/linux/netdevice.h.orig	Fri May 23 02:48:53 2003
+++ linux-2.5.69-bk15/include/linux/netdevice.h	Fri May 23 02:49:06 2003
@@ -451,6 +451,7 @@
 	struct kobject		stats_kobj;
 };
 
+#undef SET_MODULE_OWNER
 #define SET_MODULE_OWNER(dev) do { } while (0)
 /* Set the sysfs physical device reference for the network logical device
  * if set prior to registration will cause a symlink during initialization.

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-05-23  0:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 13:54 Mads Christensen
2003-05-22 15:29 ` Mads Christensen
2003-05-22 23:10   ` Thomas Schlichter
     [not found] ` <20030522160218.57b828db.akpm@digeo.com>
2003-05-22 23:05   ` David S. Miller
2003-05-22 23:28     ` Thomas Schlichter
2003-05-22 23:29       ` David S. Miller
2003-05-22 23:47         ` Thomas Schlichter
2003-05-22 23:48           ` David S. Miller
2003-05-23  0:13             ` Thomas Schlichter
2003-05-23  0:23               ` David S. Miller
2003-05-23  1:06                 ` Thomas Schlichter [this message]
2003-05-23  1:16                   ` David S. Miller
     [not found] <200305230327.57985.schlicht@uni-mannheim.de>
     [not found] ` <200305230538.38946.schlicht@uni-mannheim.de>
     [not found]   ` <20030522.213217.27796203.davem@redhat.com>
2003-05-24 14:36     ` Thomas Schlichter
2003-05-26  2:18       ` David S. Miller
2003-05-26  6:35         ` Thomas Schlichter
2003-05-26  7:04           ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200305230306.54981.schlicht@uni-mannheim.de \
    --to=schlicht@uni-mannheim.de \
    --cc=akpm@digeo.com \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfc@krycek.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®