mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jessica Yu <jeyu@kernel.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] module: print sensible error code
Date: Mon, 25 Jun 2018 11:02:58 +0200	[thread overview]
Message-ID: <20180625090258.mkai3zmgt6bkafgx@linux-5o07> (raw)
In-Reply-To: <20180622153850.24240-1-Jason@zx2c4.com>

+++ Jason A. Donenfeld [22/06/18 17:38 +0200]:
>Printing "err 0" to the user in the warning message is not particularly
>useful, especially when this gets transformed into a -ENOENT for the
>remainder of the call chain.
>
>Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Applied, thanks.

Jessica

>---
> kernel/module.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/module.c b/kernel/module.c
>index f475f30eed8c..c666ab4139f4 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -2282,9 +2282,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
> 			if (!ksym && ELF_ST_BIND(sym[i].st_info) == STB_WEAK)
> 				break;
>
>-			pr_warn("%s: Unknown symbol %s (err %li)\n",
>-				mod->name, name, PTR_ERR(ksym));
> 			ret = PTR_ERR(ksym) ?: -ENOENT;
>+			pr_warn("%s: Unknown symbol %s (err %d)\n",
>+				mod->name, name, ret);
> 			break;
>
> 		default:
>-- 
>2.17.1
>

      reply	other threads:[~2018-06-25  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 15:38 Jason A. Donenfeld
2018-06-25  9:02 ` Jessica Yu [this message]

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=20180625090258.mkai3zmgt6bkafgx@linux-5o07 \
    --to=jeyu@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®