1. 26 3月, 2015 5 次提交
    • C
      c6x: include: asm: setup: Include "linux/types.h" · 9bd54f64
      Chen Gang 提交于
      Some modules may assume "asm/setup.h" already include all headers which
      needed by itself. So need let "asm/setup.h" include "linux/types.h", the
      related error:
      
        C [M]  drivers/input/joydev.o
        In file included from include/asm-generic/page.h:23:0,
                         from ./arch/c6x/include/asm/page.h:9,
                         from include/asm-generic/io.h:14,
                         from arch/c6x/include/generated/asm/io.h:1,
                         from drivers/input/joydev.c:15:
        ./arch/c6x/include/asm/setup.h:17:27: error: unknown type name 'phys_addr_t'
         extern int c6x_add_memory(phys_addr_t start, unsigned long size);
                                   ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      9bd54f64
    • C
      c6x: asm: Add default flat.h according to xtensa architecture · 06745d74
      Chen Gang 提交于
      For supporting uClinux flat-format executables, c6x needs to define the
      fewest features to support it, at present, xtensa architecture has the
      fewest feature for it, so just copy xtensa flat.h. The related error:
      
          CC      fs/binfmt_flat.o
        In file included from fs/binfmt_flat.c:36:0:
        include/linux/flat.h:12:22: fatal error: asm/flat.h: No such file or directory
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      06745d74
    • C
      c6x: kernel: setup: Remove 'const' for local variables in machine_init · 1a394e1a
      Chen Gang 提交于
      early_init_dt_scan() accepts "void *", the related warning:
      
          CC      arch/c6x/kernel/setup.o
        arch/c6x/kernel/setup.c: In function 'machine_init':
        arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          early_init_dt_scan(fdt);
                             ^
        In file included from arch/c6x/kernel/setup.c:19:0:
        include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *'
         extern bool early_init_dt_scan(void *params);
                     ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      1a394e1a
    • C
      c6x: Makefile: Add -D__linux__ · 1d2a64bd
      Chen Gang 提交于
      For gcc5 c6x raw compiler, at present, it may not define __linux__, so
      c6x kernel still needs to define __linux__ just like another archs have
      done. The related error:
      
        CC [M]  fs/coda/psdev.o
      In file included from include/linux/coda.h:64:0,
                       from fs/coda/psdev.c:45:
      include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t'
        u_quad_t va_size; /* file size in bytes */
        ^
      include/uapi/linux/coda.h:229:2: error: unknown type name 'u_quad_t'
        u_quad_t va_bytes; /* bytes of disk space held by file */
        ^
      include/uapi/linux/coda.h:230:2: error: unknown type name 'u_quad_t'
        u_quad_t va_filerev; /* file modification number */
        ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      1d2a64bd
    • N
      C6x: time: Ensure consistency in __init · f4831605
      Nishanth Menon 提交于
      time_init invokes timer64_init (which is __init annotation)
      since all of these are invoked at init time, lets maintain
      consistency by ensuring time_init is marked appropriately
      as well.
      
      This fixes the following warning with CONFIG_DEBUG_SECTION_MISMATCH=y
      
      WARNING: vmlinux.o(.text+0x3bfc): Section mismatch in reference from the function time_init() to the function .init.text:timer64_init()
      The function time_init() references
      the function __init timer64_init().
      This is often because time_init lacks a __init
      annotation or the annotation of timer64_init is wrong.
      
      Fixes: 546a3954 ("C6X: time management")
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NMark Salter <msalter@redhat.com>
      f4831605
  2. 04 3月, 2015 1 次提交
    • C
      c6x: kernel: setup: Include "linux/console.h" · 3591276d
      Chen Gang 提交于
      Or c6x will cause building break for allmodconfig, the related error:
      
          CC      arch/c6x/kernel/setup.o
        arch/c6x/kernel/setup.c: In function 'setup_arch':
        arch/c6x/kernel/setup.c:433:2: error: 'conswitchp' undeclared (first use in this function)
          conswitchp = &dummy_con;
          ^
        arch/c6x/kernel/setup.c:433:2: note: each undeclared identifier is reported only once for each function it appears in
        arch/c6x/kernel/setup.c:433:16: error: 'dummy_con' undeclared (first use in this function)
          conswitchp = &dummy_con;
                        ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      [removed unnecessary #ifdef around include]
      Signed-off-by: NMark Salter <msalter@redhat.com>
      3591276d
  3. 23 2月, 2015 1 次提交
    • D
      VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry) · e36cb0b8
      David Howells 提交于
      Convert the following where appropriate:
      
       (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry).
      
       (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry).
      
       (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry).  This is actually more
           complicated than it appears as some calls should be converted to
           d_can_lookup() instead.  The difference is whether the directory in
           question is a real dir with a ->lookup op or whether it's a fake dir with
           a ->d_automount op.
      
      In some circumstances, we can subsume checks for dentry->d_inode not being
      NULL into this, provided we the code isn't in a filesystem that expects
      d_inode to be NULL if the dirent really *is* negative (ie. if we're going to
      use d_inode() rather than d_backing_inode() to get the inode pointer).
      
      Note that the dentry type field may be set to something other than
      DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS
      manages the fall-through from a negative dentry to a lower layer.  In such a
      case, the dentry type of the negative union dentry is set to the same as the
      type of the lower dentry.
      
      However, if you know d_inode is not NULL at the call site, then you can use
      the d_is_xxx() functions even in a filesystem.
      
      There is one further complication: a 0,0 chardev dentry may be labelled
      DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE.  Strictly, this was
      intended for special directory entry types that don't have attached inodes.
      
      The following perl+coccinelle script was used:
      
      use strict;
      
      my @callers;
      open($fd, 'git grep -l \'S_IS[A-Z].*->d_inode\' |') ||
          die "Can't grep for S_ISDIR and co. callers";
      @callers = <$fd>;
      close($fd);
      unless (@callers) {
          print "No matches\n";
          exit(0);
      }
      
      my @cocci = (
          '@@',
          'expression E;',
          '@@',
          '',
          '- S_ISLNK(E->d_inode->i_mode)',
          '+ d_is_symlink(E)',
          '',
          '@@',
          'expression E;',
          '@@',
          '',
          '- S_ISDIR(E->d_inode->i_mode)',
          '+ d_is_dir(E)',
          '',
          '@@',
          'expression E;',
          '@@',
          '',
          '- S_ISREG(E->d_inode->i_mode)',
          '+ d_is_reg(E)' );
      
      my $coccifile = "tmp.sp.cocci";
      open($fd, ">$coccifile") || die $coccifile;
      print($fd "$_\n") || die $coccifile foreach (@cocci);
      close($fd);
      
      foreach my $file (@callers) {
          chomp $file;
          print "Processing ", $file, "\n";
          system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 ||
      	die "spatch failed";
      }
      
      [AV: overlayfs parts skipped]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e36cb0b8
  4. 21 2月, 2015 2 次提交
  5. 20 2月, 2015 29 次提交
  6. 19 2月, 2015 2 次提交