]> git.corax.cc Git - corax/commitdiff
Remove unused local variable from _clone_kernel_region()
authorMatthias Kruk <m@m10k.eu>
Tue, 26 Nov 2019 09:52:49 +0000 (18:52 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 26 Nov 2019 09:52:49 +0000 (18:52 +0900)
kernel/arch/paging.c

index 645ea68a4c1cf27f5304eeea6352b564dbc1dc28..6fb27b8d0c53f570081eca7173ecedda72396324 100644 (file)
@@ -772,7 +772,6 @@ cleanup:
 int _clone_kernel_region(pg_dir_t *kdir, region_t *reg, void *data)
 {
        pg_dir_t *dir;
-       u32_t attrs;
        int ret_val;
 
        ret_val = 0;
@@ -808,10 +807,6 @@ int _clone_kernel_region(pg_dir_t *kdir, region_t *reg, void *data)
                 * necessary for the process to have even read-access to the kernel's
                 * .rodata, heap, or anything else.
                 */
-
-               /* make sure PAGE_ATTR_USER is set and PAGE_ATTR_WRITABLE is not set */
-               attrs = (reg->reg_attrs | PAGE_ATTR_USER) & ~PAGE_ATTR_WRITABLE;
-
 #if FEATURE(DEBUG)
                dbg_printf("Mapping region %02x at 0x%08x:%08x (ATTR=%x)\n",
                                   reg->reg_type, reg->reg_base, reg->reg_size, attrs);