From bf50d11502b341502025128b40608dd3acc542d4 Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Tue, 4 Mar 2003 00:25:16 -0800 Subject: [PATCH] [PATCH] More IEEE1394 updates - Cleanup Makefile. - Fix potentional crash in dv1394 module unload. - Why does ARM's memcpy not return void*? Oh well, work around it in eth1394 by not expecting standard behavior. --- drivers/ieee1394/Makefile | 7 ------- drivers/ieee1394/dv1394.c | 4 ++-- drivers/ieee1394/eth1394.c | 8 ++++---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/ieee1394/Makefile b/drivers/ieee1394/Makefile index 63bba2f25a79d..c59fb53a3f519 100644 --- a/drivers/ieee1394/Makefile +++ b/drivers/ieee1394/Makefile @@ -18,13 +18,6 @@ obj-$(CONFIG_IEEE1394_CMP) += cmp.o clean-files := oui.c -ieee1394.o: $(ieee1394-objs) - $(LD) $(LDFLAGS) -r -o $@ $(ieee1394-objs) - -ifeq ($(obj),) -obj = . -endif - $(obj)/oui.o: $(obj)/oui.c $(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh $(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 09b0a29c62b34..d457e39c04460 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -2703,7 +2703,7 @@ static void dv1394_remove_host (struct hpsb_host *host) struct ti_ohci *ohci; struct video_card *video = NULL; unsigned long flags; - struct list_head *lh; + struct list_head *lh, *templh; char buf[32]; int n; @@ -2717,7 +2717,7 @@ static void dv1394_remove_host (struct hpsb_host *host) /* find the corresponding video_cards */ spin_lock_irqsave(&dv1394_cards_lock, flags); if(!list_empty(&dv1394_cards)) { - list_for_each(lh, &dv1394_cards) { + list_for_each_safe(lh, templh, &dv1394_cards) { video = list_entry(lh, struct video_card, list); if((video->id >> 2) == ohci->id) dv1394_un_init(video); diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 32b2e0c5f688e..5b0b99628c1da 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -78,7 +78,7 @@ printk(KERN_ERR fmt, ## args) static char version[] __devinitdata = - "$Rev: 801 $ Ben Collins "; + "$Rev: 806 $ Ben Collins "; /* Our ieee1394 highlevel driver */ #define ETHER1394_DRIVER_NAME "ether1394" @@ -221,7 +221,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev unsigned char arp_data[2*(dev->addr_len+4)]; /* Copy the main data that we need */ - arp_ptr = memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data)); + memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data)); /* Extend the buffer enough for our new header */ skb_put (skb, sizeof (struct eth1394_arp) - @@ -229,7 +229,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev #define PROCESS_MEMBER(ptr,val,len) \ memcpy (val, ptr, len); ptr += len - arp_ptr += arp1394->hw_addr_len; + arp_ptr = arp_data + arp1394->hw_addr_len; PROCESS_MEMBER (arp_ptr, &arp1394->sip, arp1394->ip_addr_len); arp_ptr += arp1394->hw_addr_len; PROCESS_MEMBER (arp_ptr, &arp1394->tip, arp1394->ip_addr_len); @@ -529,7 +529,7 @@ static inline unsigned short ether1394_parse_encap (struct sk_buff *skb, struct spin_unlock_irqrestore (&priv->lock, flags); #define PROCESS_MEMBER(ptr,val,len) \ - ptr = memcpy (ptr, val, len) + len + memcpy (ptr, val, len); ptr += len PROCESS_MEMBER (arp_ptr, src_hw, dev->addr_len); PROCESS_MEMBER (arp_ptr, &arp1394.sip, 4); PROCESS_MEMBER (arp_ptr, dest_hw, dev->addr_len); -- 2.53.0