Skip to content
  • Geert Uytterhoeven's avatar
    h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user() · e048aceb
    Geert Uytterhoeven authored
    
    
    __gu_val is const if the passed ptr is const, giving:
    
      include/linux/pagemap.h: In function 'fault_in_pages_readable':
      include/linux/pagemap.h:442:2: error: assignment of read-only variable '__gu_val'
      include/linux/pagemap.h:448:4: error: assignment of read-only variable '__gu_val'
      include/linux/pagemap.h: In function 'fault_in_multipages_readable':
      include/linux/pagemap.h:499:3: error: assignment of read-only variable '__gu_val'
      include/linux/pagemap.h:508:3: error: assignment of read-only variable '__gu_val'
      make[4]: *** [init/main.o] Error 1
    
    As we don't care about the actual value of __gu_val in the unhandled
    case (it will cause a link error anyway), just remove the assignment.
    
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Tony Breeds <tony@bakeyournoodle.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e048aceb