This moves away from Documentation/CondingStyle..
> int loop_register_transfer(struct loop_func_table *funcs)
> {
> - if ((unsigned)funcs->number > MAX_LO_CRYPT || xfer_funcs[funcs->number])
> + unsigned int n = funcs->number;
> +
> + if (n >= MAX_LO_CRYPT || xfer_funcs[n])
> return -EINVAL;
> - xfer_funcs[funcs->number] = funcs;
> - return 0;
> + xfer_funcs[n] = funcs;
> + return 0;
> }
Once you start touching loop_{,un}register_transfer please also get
rid of the array in favour of a linked list..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/