public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] habanalabs: improve error messages
Date: Fri, 29 Mar 2019 17:29:55 +0100	[thread overview]
Message-ID: <20190329162955.GA10386@kroah.com> (raw)
In-Reply-To: <20190328071313.5306-1-oded.gabbay@gmail.com>

On Thu, Mar 28, 2019 at 09:13:13AM +0200, Oded Gabbay wrote:
> This patch improves two error messages to help the user to
> better understand what error occurred.
> 
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
> ---
>  drivers/misc/habanalabs/command_submission.c | 3 ++-
>  drivers/misc/habanalabs/memory.c             | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c
> index f908643f871f..02c48da0b645 100644
> --- a/drivers/misc/habanalabs/command_submission.c
> +++ b/drivers/misc/habanalabs/command_submission.c
> @@ -261,7 +261,8 @@ static void cs_timedout(struct work_struct *work)
>  	ctx_asid = cs->ctx->asid;
>  
>  	/* TODO: add information about last signaled seq and last emitted seq */
> -	dev_err(hdev->dev, "CS %d.%llu got stuck!\n", ctx_asid, cs->sequence);
> +	dev_err(hdev->dev, "User %d command submission %llu got stuck!\n",
> +		ctx_asid, cs->sequence);
>  
>  	cs_put(cs);
>  
> diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
> index ce1fda40a8b8..39788b1cf8d0 100644
> --- a/drivers/misc/habanalabs/memory.c
> +++ b/drivers/misc/habanalabs/memory.c
> @@ -109,7 +109,7 @@ static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args,
>  							page_size);
>  			if (!phys_pg_pack->pages[i]) {
>  				dev_err(hdev->dev,
> -					"ioctl failed to allocate page\n");
> +					"Failed to allocate device memory (out of memory)\n");

No need for a message at all here, right?  The core should have already
told you you had a problem.

greg k-h

  reply	other threads:[~2019-03-29 16:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28  7:13 [PATCH] habanalabs: improve error messages Oded Gabbay
2019-03-29 16:29 ` Greg KH [this message]
2019-03-29 16:39   ` Joe Perches
2019-03-29 17:29   ` Oded Gabbay
2019-03-29 18:50     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190329162955.GA10386@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox