Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[powerpc.git] / fs / binfmt_misc.c
index 00687ea..18657f0 100644 (file)
@@ -311,7 +311,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
 
        err = -ENOMEM;
        memsize = sizeof(Node) + count + 8;
-       e = (Node *) kmalloc(memsize, GFP_USER);
+       e = kmalloc(memsize, GFP_USER);
        if (!e)
                goto out;
 
@@ -719,7 +719,7 @@ static const struct file_operations bm_status_operations = {
 
 /* Superblock handling */
 
-static struct super_operations s_ops = {
+static const struct super_operations s_ops = {
        .statfs         = simple_statfs,
        .clear_inode    = bm_clear_inode,
 };
@@ -727,8 +727,8 @@ static struct super_operations s_ops = {
 static int bm_fill_super(struct super_block * sb, void * data, int silent)
 {
        static struct tree_descr bm_files[] = {
-               [1] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO},
-               [2] = {"register", &bm_register_operations, S_IWUSR},
+               [2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO},
+               [3] = {"register", &bm_register_operations, S_IWUSR},
                /* last one */ {""}
        };
        int err = simple_fill_super(sb, 0x42494e4d, bm_files);