drbd: Define the size of res_opts->cpu_mask in a single place
[deliverable/linux.git] / drivers / block / drbd / drbd_main.c
index fc439605aa6948d5b636bb08892ac6ec78e1318a..59a58e896cf581efd5c411e563a8eab7ff62e7fb 100644 (file)
@@ -2503,8 +2503,7 @@ int set_resource_options(struct drbd_resource *resource, struct res_opts *res_op
 
        /* silently ignore cpu mask on UP kernel */
        if (nr_cpu_ids > 1 && res_opts->cpu_mask[0] != 0) {
-               /* FIXME: Get rid of constant 32 here */
-               err = bitmap_parse(res_opts->cpu_mask, 32,
+               err = bitmap_parse(res_opts->cpu_mask, DRBD_CPU_MASK_SIZE,
                                   cpumask_bits(new_cpu_mask), nr_cpu_ids);
                if (err) {
                        drbd_warn(resource, "bitmap_parse() failed with %d\n", err);
@@ -2534,7 +2533,7 @@ struct drbd_resource *drbd_create_resource(const char *name)
 {
        struct drbd_resource *resource;
 
-       resource = kmalloc(sizeof(struct drbd_resource), GFP_KERNEL);
+       resource = kzalloc(sizeof(struct drbd_resource), GFP_KERNEL);
        if (!resource)
                return NULL;
        resource->name = kstrdup(name, GFP_KERNEL);
This page took 0.024727 seconds and 5 git commands to generate.