printk KERN_ annotations
Subsystems (3)
PATCH 1/1 printk KERN_ annotations
G'day list,
I was thinking of doing some printk KERN_* annotations but I thought I had better send in a test patch to ensure I was doing it right.
This one is on stuff in net/802, net/8021q/ and net/atm/lec.c
comments? flames ?
net/802/fc.c +3 -1
@@ -87,7 +87,9 @@ static int fc_rebuild_header(struct sk_bstruct fch_hdr *fch=(struct fch_hdr *)skb->data;struct fcllc *fcllc=(struct fcllc *)(skb->data+sizeof (struct fch_hdr ));if (fcllc->ethertype !=htons (ETH_P_IP )) { -printk ("fc_rebuild_header: Don't know how to resolve type %04X addresses ?\n" ,ntohs (fcllc->ethertype)); +printk (KERN_WARNING "fc_rebuild_header: Don't know how to " +"resolve type %04X addresses ?\n" , +ntohs (fcllc->ethertype));return 0 ; }#ifdef CONFIG_INET
net/802/fddi.c +3 -2
@@ -108,8 +108,9 @@ static int fddi_rebuild_header(struct sk else#endif { -printk ("%s: Don't know how to resolve type %04X addresses.\n" , - skb->dev->name,ntohs (fddi->hdr.llc_snap.ethertype)); +printk (KERN_WARNING "%s: Don't know how to resolve type " +"%04X addresses.\n" , + skb->dev->name,ntohs (fddi->hdr.llc_snap.ethertype));return (0 ); } }
net/802/hippi.c +1 -1
@@ -55,7 +55,7 @@ static int hippi_header(struct sk_buff *if (!len){ len = skb->len -HIPPI_HLEN ; -printk ("hippi_header(): length not supplied\n" ); +printk (KERN_DEBUG "hippi_header(): length not supplied\n" ); }/*
net/802/tr.c +17 -8
@@ -165,7 +165,9 @@ static int tr_rebuild_header(struct sk_b*/ if (trllc->ethertype !=htons (ETH_P_IP )) { -printk ("tr_rebuild_header: Don't know how to resolve type %04X addresses ?\n" ,(unsigned int )htons (trllc->ethertype)); +printk (KERN_WARNING "tr_rebuild_header: Don't know how to " +"resolve type %04X addresses ?\n" , + (unsigned int )htons (trllc->ethertype));return 0 ; }
@@ -281,8 +283,9 @@ void tr_source_route(struct sk_buff *skbif (entry) {#if TR_SR_DEBUG -printk ("source routing for %02X:%02X:%02X:%02X:%02X:%02X\n" ,trh->daddr[0 ], - trh->daddr[1 ],trh->daddr[2 ],trh->daddr[3 ],trh->daddr[4 ],trh->daddr[5 ]); +printk (KERN_DEBUG "source routing for %02X:%02X:%02X:%02X:%02X:%02X\n" , + trh->daddr[0 ], trh->daddr[1 ], trh->daddr[2 ], + trh->daddr[3 ], trh->daddr[4 ], trh->daddr[5 ]);#endif if (!entry->local_ring && (ntohs (entry->rcf) &TR_RCF_LEN_MASK ) >>8 ) {
@@ -293,11 +296,14 @@ printk("source routing for %02X:%02X:%02 trh->saddr[0 ]|=TR_RII ;#if TR_SR_DEBUG - printk("entry found with rcf %04x\n", entry->rcf); +printk (KERN_DEBUG "entry found with rcf %04x\n" , + entry->rcf); }else { -printk ("entry found but without rcf length, local=%02x\n" , entry->local_ring); +printk (KERN_DEBUG "entry found but without rcf " +"length, local=%02x\n" , + entry->local_ring);#endif } entry->last_used=jiffies;
@@ -313,7 +319,8 @@ printk("source routing for %02X:%02X:%02 | TR_RCF_FRAME2K | TR_RCF_LIMITED_BROADCAST); trh->saddr[0 ]|=TR_RII ;#if TR_SR_DEBUG -printk ("no entry in rif table found - broadcasting frame\n" ); +printk (KERN_DEBUG "no entry in rif table found - " +"broadcasting frame\n" );#endif } }
@@ -364,7 +371,8 @@ static void tr_add_rif_info(struct trh_hif (entry==NULL ) {#if TR_SR_DEBUG -printk ("adding rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n" , +printk (KERN_DEBUG "adding rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X" +" rcf:%04X\n" , trh->saddr[0 ],trh->saddr[1 ],trh->saddr[2 ], trh->saddr[3 ],trh->saddr[4 ],trh->saddr[5 ],ntohs (trh->rcf));
@@ -412,7 +420,8 @@ printk("adding rif_entry: addr:%02X:%02X !(trh->rcf & htons(TR_RCF_BROADCAST_MASK))) {#if TR_SR_DEBUG -printk ("updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n" , +printk (KERN_DEBUG "updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X " +"rcf:%04X\n" , trh->saddr[0 ],trh->saddr[1 ],trh->saddr[2 ], trh->saddr[3 ],trh->saddr[4 ],trh->saddr[5 ],ntohs (trh->rcf));
net/8021q/vlan_dev.c +11 -8
@@ -673,10 +673,10 @@ int vlan_dev_set_mac_address(struct net_memcpy (dev->dev_addr, addr->sa_data, dev->addr_len); -printk ("%s: Setting MAC address to " , dev->name); +printk (KERN_INFO "%s: Setting MAC address to " , dev->name);for (i =0 ; i <6 ; i++) -printk (" %2.2x" , dev->dev_addr[i]); -printk (".\n" ); +printk (KERN_INFO " %2.2x" , dev->dev_addr[i]); +printk (KERN_INFO ".\n" ); if (memcmp(VLAN_DEV_INFO(dev)->real_dev->dev_addr, dev->dev_addr,
@@ -689,13 +689,16 @@ int vlan_dev_set_mac_address(struct net_/* Make PROMISC visible to the user. */ flgs |=IFF_PROMISC ; -printk ("VLAN (%s): Setting underlying device (%s) to promiscious mode.\n" , - dev->name,VLAN_DEV_INFO (dev)->real_dev->name); -dev_change_flags (VLAN_DEV_INFO (dev)->real_dev, flgs); +printk (KERN_INFO "VLAN (%s): Setting underlying device" +" (%s) to promiscious mode.\n" , + dev->name,VLAN_DEV_INFO (dev)->real_dev->name); +dev_change_flags (VLAN_DEV_INFO (dev)->real_dev, + flgs); } }else { -printk ("VLAN (%s): Underlying device (%s) has same MAC, not checking promiscious mode.\n" , - dev->name,VLAN_DEV_INFO (dev)->real_dev->name); +printk (KERN_INFO "VLAN (%s): Underlying device (%s) has same " +"MAC, not checking promiscious mode.\n" , + dev->name,VLAN_DEV_INFO (dev)->real_dev->name); }return 0 ;
net/atm/lec.c +38 -35
230 lines not on this page · raw message
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
net/802/hippi.c static int hippi_header(struct sk_buff * · line 58
Quoted 8 lines · Darren Jenkins
net/802/hippi.c +1
-1@@ -55,7 +55,7 @@ static int hippi_header(struct sk_buff *if (!len){ len = skb->len -HIPPI_HLEN ; -printk ("hippi_header(): length not supplied\n" ); +printk (KERN_DEBUG "hippi_header(): length not supplied\n" );
I really don't know if this a debugging leftover.
net/8021q/vlan_dev.c int vlan_dev_set_mac_address(struct net_ · line 676
Quoted 10 lines
net/8021q/vlan_dev.c +3
-3@@ -673,10 +673,10 @@ int vlan_dev_set_mac_address(struct net_ -printk ("%s: Setting MAC address to " , dev->name); +printk (KERN_INFO "%s: Setting MAC address to " , dev->name);for (i =0 ; i <6 ; i++) -printk (" %2.2x" , dev->dev_addr[i]); -printk (".\n" ); +printk (KERN_INFO " %2.2x" , dev->dev_addr[i]); +printk (KERN_INFO ".\n" );
No, of course not. Reread TODO entry. ;-)
net/8021q/vlan_dev.c make_entry(struct lec_priv *priv, unsign · line 1819
Quoted 6 lines
net/8021q/vlan_dev.c +1
-1@@ -1814,7 +1816,7 @@ make_entry(struct lec_priv *priv, unsign to_return =kmalloc (sizeof (struct lec_arp_table ),GFP_ATOMIC );if (!to_return) { -printk ("LEC: Arp entry kmalloc failed\n" ); +printk (KERN_WARNING "LEC: Arp entry kmalloc failed\n" );
kmalloc failures are usually flagged as KERN_ERR
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors