Skip to content

Commit

Permalink
powerpc/xmon: Fix build failure for 8xx
Browse files Browse the repository at this point in the history
[ Upstream commit f3e9040 ]

With CONFIG_PPC_8xx and CONFIG_XMON set, kernel build fails with

  arch/powerpc/xmon/xmon.c:1379:12: error: 'find_free_data_bpt' defined
  but not used [-Werror=unused-function]

Fix it by enclosing find_free_data_bpt() inside #ifndef CONFIG_PPC_8xx.

Fixes: 30df74d ("powerpc/watchpoint/xmon: Support 2nd DAWR")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201130034406.288047-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Ravi Bangoria authored and gregkh committed Dec 30, 2020
1 parent 746ef5a commit 36daf5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/xmon/xmon.c
Expand Up @@ -1383,6 +1383,7 @@ static long check_bp_loc(unsigned long addr)
return 1;
}

#ifndef CONFIG_PPC_8xx
static int find_free_data_bpt(void)
{
int i;
Expand All @@ -1394,6 +1395,7 @@ static int find_free_data_bpt(void)
printf("Couldn't find free breakpoint register\n");
return -1;
}
#endif

static void print_data_bpts(void)
{
Expand Down

0 comments on commit 36daf5b

Please sign in to comment.