Message ID | 1333a8985c4190763c9c0312bcefad8b1ea863c7.1585340156.git.geoff@infradead.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/9] powerpc/ps3: Remove duplicate error messages | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (c6624071c338732402e8c726df6a4074473eaa0e) |
snowpatch_ozlabs/checkpatch | warning | total: 1 errors, 0 warnings, 1 checks, 21 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 423be34f0f5f..7c7c2f53eacb 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -26,6 +26,13 @@ #define DBG pr_devel #endif +#define udbg_panic(_val, _msg) \ +if (_val) { \ + udbg_printf("%s:%d: " _msg ": %d\n", \ + __func__, __LINE__, (int)(_val)); \ + lv1_panic(0); \ +} + enum { #if defined(CONFIG_PS3_DYNAMIC_DMA) USE_DYNAMIC_DMA = 1, @@ -313,7 +320,7 @@ static void ps3_mm_region_destroy(struct mem_region *r) if (r->base) { result = lv1_release_memory(r->base); - BUG_ON(result); + udbg_panic(result, "lv1_release_memory failed"); r->size = r->base = r->offset = 0; map.total = map.rm.size; }
BUG_ON() won't work in the early init code, so replace it with a new routine udbg_panic() that uses udbg_printf() and lv1_panic(). Signed-off-by: Geoff Levand <geoff@infradead.org> --- arch/powerpc/platforms/ps3/mm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)