1. 03 6月, 2018 18 次提交
  2. 01 6月, 2018 2 次提交
  3. 29 5月, 2018 1 次提交
  4. 28 5月, 2018 1 次提交
  5. 25 5月, 2018 8 次提交
    • M
      powerpc: Add a missing include header · d647b210
      Mathieu Malaterre 提交于
      The header file <asm/switch_to.h> was missing from the includes. Fix the
      following warning, treated as error with W=1:
      
        arch/powerpc/kernel/vecemu.c:260:5: error: no previous prototype for ‘emulate_altivec’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d647b210
    • M
      powerpc/32: Add a missing include header · c89ca593
      Mathieu Malaterre 提交于
      The header file <linux/syscalls.h> was missing from the includes. Fix the
      following warning, treated as error with W=1:
      
        arch/powerpc/kernel/pci_32.c:286:6: error: no previous prototype for ‘sys_pciconfig_iobase’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c89ca593
    • M
      powerpc/tau: Make some function static · 9e0d86cd
      Mathieu Malaterre 提交于
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/kernel/tau_6xx.c:53:6: error: no previous prototype for ‘set_thresholds’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:73:6: error: no previous prototype for ‘TAUupdate’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:208:13: error: no previous prototype for ‘TAU_init_smp’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:220:12: error: no previous prototype for ‘TAU_init’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:126:6: error: no previous prototype for ‘TAUException’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9e0d86cd
    • M
      powerpc: Make function btext_initialize static · 86e11b6e
      Mathieu Malaterre 提交于
      This function can be static, make it so, this fix a warning treated as
      error with W=1:
      
        arch/powerpc/kernel/btext.c:173:5: error: no previous prototype for ‘btext_initialize’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      86e11b6e
    • M
      powerpc/tau: Synchronize function prototypes and body · bd13ac95
      Mathieu Malaterre 提交于
      Some function prototypes and body for Thermal Assist Units were not in
      sync. Update the function definition to match the existing function
      declaration found in `setup-common.c`, changing an `int` return type to a
      `u32` return type. Move the prototypes to a header file. Fix the following
      warnings, treated as error with W=1:
      
        arch/powerpc/kernel/tau_6xx.c:257:5: error: no previous prototype for ‘cpu_temp_both’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:262:5: error: no previous prototype for ‘cpu_temp’ [-Werror=missing-prototypes]
        arch/powerpc/kernel/tau_6xx.c:267:5: error: no previous prototype for ‘tau_interrupts’ [-Werror=missing-prototypes]
      
      Compile tested with CONFIG_TAU_INT.
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bd13ac95
    • M
      powerpc/mm/radix: Use do/while(0) trick for single statement block · 85aa4b98
      Mathieu Malaterre 提交于
      In commit 7a22d632 ("powerpc/mm/radix: Update command line parsing for
      disable_radix") an `if` statement was added for a possible empty body
      (prom_debug).
      
      Fix the following warning, treated as error with W=1:
      
        arch/powerpc/kernel/prom_init.c:656:46: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
      Suggested-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      85aa4b98
    • M
      powerpc/sparse: Fix plain integer as NULL pointer warning · d8731527
      Mathieu Malaterre 提交于
      Trivial fix to remove the following sparse warnings:
      
        arch/powerpc/kernel/module_32.c:112:74: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/module_32.c:117:74: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1155:28: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1230:20: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1385:36: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:1752:23: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2084:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2110:32: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2167:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:2183:19: warning: Using plain integer as NULL pointer
        drivers/macintosh/via-pmu.c:277:20: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:155:67: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:247:27: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:249:27: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/setup.c:252:37: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:127:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:148:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:44:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:57:21: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/tlb_hash32.c:87:21: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:160:31: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:167:22: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:274:21: warning: Using plain integer as NULL pointer
        arch/powerpc/kernel/btext.c:285:31: warning: Using plain integer as NULL pointer
        arch/powerpc/include/asm/hugetlb.h:204:16: warning: Using plain integer as NULL pointer
        arch/powerpc/mm/ppc_mmu_32.c:170:21: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/pci.c:1227:23: warning: Using plain integer as NULL pointer
        arch/powerpc/platforms/powermac/pci.c:65:24: warning: Using plain integer as NULL pointer
      
      Also use `--fix` command line option from `script/checkpatch --strict` to
      remove the following:
      
        CHECK: Comparison to NULL could be written "!dispDeviceBase"
        #72: FILE: arch/powerpc/kernel/btext.c:160:
        +	if (dispDeviceBase == NULL)
      
        CHECK: Comparison to NULL could be written "!vbase"
        #80: FILE: arch/powerpc/kernel/btext.c:167:
        +	if (vbase == NULL)
      
        CHECK: Comparison to NULL could be written "!base"
        #89: FILE: arch/powerpc/kernel/btext.c:274:
        +	if (base == NULL)
      
        CHECK: Comparison to NULL could be written "!dispDeviceBase"
        #98: FILE: arch/powerpc/kernel/btext.c:285:
        +	if (dispDeviceBase == NULL)
      
        CHECK: Comparison to NULL could be written "strstr"
        #117: FILE: arch/powerpc/kernel/module_32.c:117:
        +		if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != NULL)
      
        CHECK: Comparison to NULL could be written "!Hash"
        #130: FILE: arch/powerpc/mm/ppc_mmu_32.c:170:
        +	if (Hash == NULL)
      
        CHECK: Comparison to NULL could be written "Hash"
        #143: FILE: arch/powerpc/mm/tlb_hash32.c:44:
        +	if (Hash != NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #152: FILE: arch/powerpc/mm/tlb_hash32.c:57:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #161: FILE: arch/powerpc/mm/tlb_hash32.c:87:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #170: FILE: arch/powerpc/mm/tlb_hash32.c:127:
        +	if (Hash == NULL) {
      
        CHECK: Comparison to NULL could be written "!Hash"
        #179: FILE: arch/powerpc/mm/tlb_hash32.c:148:
        +	if (Hash == NULL) {
      
        ERROR: space required after that ';' (ctx:VxV)
        #192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
        +	for (; node != NULL;node = node->sibling) {
      
        CHECK: Comparison to NULL could be written "node"
        #192: FILE: arch/powerpc/platforms/powermac/pci.c:65:
        +	for (; node != NULL;node = node->sibling) {
      
        CHECK: Comparison to NULL could be written "!region"
        #201: FILE: arch/powerpc/platforms/powermac/pci.c:1227:
        +	if (region == NULL)
      
        CHECK: Comparison to NULL could be written "of_get_property"
        #214: FILE: arch/powerpc/platforms/powermac/setup.c:155:
        +		if (of_get_property(np, "cache-unified", NULL) != NULL && dc) {
      
        CHECK: Comparison to NULL could be written "!np"
        #223: FILE: arch/powerpc/platforms/powermac/setup.c:247:
        +		if (np == NULL)
      
        CHECK: Comparison to NULL could be written "np"
        #226: FILE: arch/powerpc/platforms/powermac/setup.c:249:
        +		if (np != NULL) {
      
        CHECK: Comparison to NULL could be written "l2cr"
        #230: FILE: arch/powerpc/platforms/powermac/setup.c:252:
        +			if (l2cr != NULL) {
      
        CHECK: Comparison to NULL could be written "via"
        #243: FILE: drivers/macintosh/via-pmu.c:277:
        +	if (via != NULL)
      
        CHECK: Comparison to NULL could be written "current_req"
        #252: FILE: drivers/macintosh/via-pmu.c:1155:
        +	if (current_req != NULL) {
      
        CHECK: Comparison to NULL could be written "!req"
        #261: FILE: drivers/macintosh/via-pmu.c:1230:
        +	if (req == NULL || pmu_state != idle
      
        CHECK: Comparison to NULL could be written "!req"
        #270: FILE: drivers/macintosh/via-pmu.c:1385:
        +			if (req == NULL) {
      
        CHECK: Comparison to NULL could be written "!pp"
        #288: FILE: drivers/macintosh/via-pmu.c:2084:
        +	if (pp == NULL)
      
        CHECK: Comparison to NULL could be written "!pp"
        #297: FILE: drivers/macintosh/via-pmu.c:2110:
        +	if (count < 1 || pp == NULL)
      
        CHECK: Comparison to NULL could be written "!pp"
        #306: FILE: drivers/macintosh/via-pmu.c:2167:
        +	if (pp == NULL)
      
        CHECK: Comparison to NULL could be written "pp"
        #315: FILE: drivers/macintosh/via-pmu.c:2183:
        +	if (pp != NULL) {
      
      Link: https://github.com/linuxppc/linux/issues/37Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d8731527
    • M
      powerpc: Add __printf verification to prom_printf · eae5f709
      Mathieu Malaterre 提交于
      __printf is useful to verify format and arguments. Fix arg mismatch
      reported by gcc, remove the following warnings (with W=1):
      
        arch/powerpc/kernel/prom_init.c:1467:31: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1471:31: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1504:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1505:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1506:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1507:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1508:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1509:33: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:1975:39: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’
        arch/powerpc/kernel/prom_init.c:1986:27: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:2567:38: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:2567:46: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:2569:38: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
        arch/powerpc/kernel/prom_init.c:2569:46: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’
      
      The patch also include arg mismatch fix for case with #define DEBUG_PROM
      (warning not listed here).
      
      This patch fix also the following warnings revealed by checkpatch:
      
        WARNING: Prefer using '"%s...", __func__' to using 'alloc_up', this function's name, in a string
        #101: FILE: arch/powerpc/kernel/prom_init.c:1235:
        + prom_debug("alloc_up(%lx, %lx)\n", size, align);
      
      and
      
        WARNING: Prefer using '"%s...", __func__' to using 'alloc_down', this function's name, in a string
        #138: FILE: arch/powerpc/kernel/prom_init.c:1278:
        + prom_debug("alloc_down(%lx, %lx, %s)\n", size, align,
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      eae5f709
  6. 24 5月, 2018 3 次提交
  7. 21 5月, 2018 2 次提交
    • M
      powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG · 4f7c06e2
      Michael Neuling 提交于
      In commit e2a800be ("powerpc/hw_brk: Fix off by one error when
      validating DAWR region end") we fixed setting the DAWR end point to
      its max value via PPC_PTRACE_SETHWDEBUG. Unfortunately we broke
      PTRACE_SET_DEBUGREG when setting a 512 byte aligned breakpoint.
      
      PTRACE_SET_DEBUGREG currently sets the length of the breakpoint to
      zero (memset() in hw_breakpoint_init()). This worked with
      arch_validate_hwbkpt_settings() before the above patch was applied but
      is now broken if the breakpoint is 512byte aligned.
      
      This sets the length of the breakpoint to 8 bytes when using
      PTRACE_SET_DEBUGREG.
      
      Fixes: e2a800be ("powerpc/hw_brk: Fix off by one error when validating DAWR region end")
      Cc: stable@vger.kernel.org # v3.11+
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4f7c06e2
    • M
      powerpc/ptrace: Fix enforcement of DAWR constraints · cd6ef7ee
      Michael Neuling 提交于
      Back when we first introduced the DAWR, in commit 4ae7ebe9
      ("powerpc: Change hardware breakpoint to allow longer ranges"), we
      screwed up the constraint making it a 1024 byte boundary rather than a
      512. This makes the check overly permissive. Fortunately GDB is the
      only real user and it always did they right thing, so we never
      noticed.
      
      This fixes the constraint to 512 bytes.
      
      Fixes: 4ae7ebe9 ("powerpc: Change hardware breakpoint to allow longer ranges")
      Cc: stable@vger.kernel.org # v3.9+
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cd6ef7ee
  8. 18 5月, 2018 2 次提交
  9. 17 5月, 2018 3 次提交