Re: [PATCH][2.6] i386 /proc/irq/.../smp_affinity

From: William Lee Irwin III
Date: Wed Sep 10 2003 - 21:01:52 EST


On Wed, Sep 10, 2003 at 09:55:03PM -0400, Zwane Mwaikambo wrote:
> - len = 0;
> - for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
> - int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
> - len += j;
> - page += j;
> - cpus_shift_right(tmp, tmp, 16);
> - }
> - len += sprintf(page, "\n");
> - return len;
> + return sprintf(page, "%08x\n", (u32)cpus_coerce(tmp));
> }
>
> static int irq_affinity_write_proc(struct file *file, const char __user *buffer,

This backs out the variable-length cpu bitmask handling.

I appear to be printing out 16-bit chunks of all this in what appears
to be the reverse of the order expected. Why not just reverse the order
of the 16-bit chunks?

-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/