"Maciej W. Rozycki" wrote: > > On Wed, 30 Jan 2002, Steven J. Hill wrote: > > > - p += sprintf(p, "ERR: %10lu\n", irq_err_count); > > + p += sprintf(p, "ERR: %10lu\n", (unsigned long) irq_err_count.counter); > > This looks bogus. How about atomic_read()? > Well, duh! Yeah, that would be better. > > +#define MAX_NAMELEN 10 > > + > > +static struct proc_dir_entry * root_irq_dir; > > +static struct proc_dir_entry * irq_dir [NR_IRQS]; > > + > > +static void register_irq_proc (unsigned int irq) > > +{ > > + char name [MAX_NAMELEN]; > > + > > + if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) || > > + irq_dir[irq]) > > + return; > > + > > + memset(name, 0, MAX_NAMELEN); > > + sprintf(name, "%d", irq); > > + > > + /* create /proc/irq/1234 */ > > + irq_dir[irq] = proc_mkdir(name, root_irq_dir); > > + > > +#if CONFIG_SMP > > + { > > + struct proc_dir_entry *entry; > > + > > + /* create /proc/irq/1234/smp_affinity */ > > + entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); > > + > > + if (entry) { > > + entry->nlink = 1; > > + entry->data = (void *)(long)irq; > > + entry->read_proc = irq_affinity_read_proc; > > + entry->write_proc = irq_affinity_write_proc; > > + } > > + > > + smp_affinity_entry[irq] = entry; > > + } > > +#endif > > +} > > + > > Any specific need to move it? > Yes. Eliminates a 'implicit declaration of register_irq_proc' warning. > > - ret = KSEG1ADDR(ret); > > + ret = (void *) KSEG1ADDR(ret); > > Hmm, KSEG1ADDR() should probably use typeof(), instead. > Fine. > > printk(KERN_WARNING "Warning only %ldMB will be used.\n", > > - MAXMEM>>20); > > + (unsigned long) (MAXMEM>>20)); > > MAXMEM is int, how about "%d" instead? > Fine. > > --- drivers/pci/pci.ids 3 Jan 2002 17:20:28 -0000 1.3 > > +++ drivers/pci/pci.ids 30 Jan 2002 17:20:50 -0000 > > Are you sure it belongs here? Or is needed at all? > What happens is that when 'gendev' is ran to produce devlist.h, without the patch it spits on '??? trigraph' warnings. By escaping them, the warning disappears. -Steve -- Steven J. Hill - Embedded SW Engineer