From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753097AbbCJRJH (ORCPT ); Tue, 10 Mar 2015 13:09:07 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42686 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbbCJRJF (ORCPT ); Tue, 10 Mar 2015 13:09:05 -0400 From: Mitchel Humpherys To: devel@linuxdriverproject.org, Android Kernel Team , Colin Cross Cc: linux-kernel@vger.kernel.org, John Stultz , Dan Carpenter , Mitchel Humpherys Subject: [PATCH] ion: improve ion_phys error message Date: Tue, 10 Mar 2015 10:08:48 -0700 Message-Id: <1426007328-3288-1-git-send-email-mitchelh@codeaurora.org> X-Mailer: git-send-email 2.3.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clients often get confused when ion_phys errors out due to some heap being used that they didn't expect. Add the heap name and heap type to the error message to make it more obvious. Signed-off-by: Mitchel Humpherys --- drivers/staging/android/ion/ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 296d347660fc..966b7fdc9ecf 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -566,8 +566,8 @@ int ion_phys(struct ion_client *client, struct ion_handle *handle, buffer = handle->buffer; if (!buffer->heap->ops->phys) { - pr_err("%s: ion_phys is not implemented by this heap.\n", - __func__); + pr_err("%s: ion_phys is not implemented by this heap (name=%s, type=%d).\n", + __func__, buffer->heap->name, buffer->heap->type); mutex_unlock(&client->lock); return -ENODEV; } -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project