From: Vojtech Pavlik <vojtech@suse.cz>
To: torvalds@transmeta.com
Subject: [x86-64 patch 4/11] Fix the Granch driver
Date: Thu, 13 Sep 2001 18:35:04 +0200 [thread overview]
Message-ID: <20010913183504.A2572@suse.cz> (raw)
Hi!
This patch constraints __asm__ usage in the Granch SBNI driver only to
i386, which is what the assembly parts are for. It also first casts a
pointer to long, to make sure it fits and avoid a warning. It also fixes
a wrongly typed __setup() function.
diff -urN linux-x86_64/drivers/net/wan/sbni.c linux/drivers/net/wan/sbni.c
--- linux-x86_64/drivers/net/wan/sbni.c Thu Aug 23 18:14:52 2001
+++ linux/drivers/net/wan/sbni.c Thu Sep 13 11:39:45 2001
@@ -155,7 +155,9 @@
static int emancipate( struct net_device * );
#endif
+#ifdef __i386__
#define ASM_CRC 1
+#endif
static const char version[] =
"Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n";
@@ -361,7 +363,7 @@
/* store MAC address (generate if that isn't known) */
*(u16 *)dev->dev_addr = htons( 0x00ff );
*(u32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
- ( (mac[num] ? mac[num] : (u32)dev->priv) & 0x00ffffff) );
+ ( (mac[num] ? mac[num] : (u32)((long)dev->priv)) & 0x00ffffff) );
/* store link settings (speed, receive level ) */
nl->maxframe = DEFAULT_FRAME_LEN;
@@ -1517,7 +1519,7 @@
#else /* MODULE */
-void __init
+static int __init
sbni_setup( char *p )
{
int n, parm;
@@ -1528,7 +1530,7 @@
for( n = 0, parm = 0; *p && n < 8; ) {
(*dest[ parm ])[ n ] = simple_strtol( p, &p, 0 );
if( !*p || *p == ')' )
- return;
+ return 1;
if( *p == ';' )
++p, ++n, parm = 0;
else if( *p++ != ',' )
@@ -1539,6 +1541,7 @@
}
bad_param:
printk( KERN_ERR "Error in sbni kernel parameter!\n" );
+ return 0;
}
__setup( "sbni=", sbni_setup );
--
Vojtech Pavlik
SuSE Labs
reply other threads:[~2001-09-13 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010913183504.A2572@suse.cz \
--to=vojtech@suse.cz \
--cc=torvalds@transmeta.com \
/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®