From: Ding Xiang <dingxiang@cmss.chinamobile.com> To: ysato@users.sourceforge.jp, dalias@libc.org Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sh/intc: Fix obsolete function Date: Wed, 29 May 2019 10:16:11 +0000 [thread overview] Message-ID: <1559124971-13074-1-git-send-email-dingxiang@cmss.chinamobile.com> (raw) simple_strtoul is obsolete, use kstrtoul instead. Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> --- drivers/sh/intc/userimask.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c index 87d69e7..d1d8e9b 100644 --- a/drivers/sh/intc/userimask.c +++ b/drivers/sh/intc/userimask.c @@ -33,7 +33,8 @@ { unsigned long level; - level = simple_strtoul(buf, NULL, 10); + if (kstrtoul(buf, 10, &level)) + return -EINVAL; /* * Minimal acceptable IRQ levels are in the 2 - 16 range, but -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Ding Xiang <dingxiang@cmss.chinamobile.com> To: ysato@users.sourceforge.jp, dalias@libc.org Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sh/intc: Fix obsolete function Date: Wed, 29 May 2019 18:16:11 +0800 [thread overview] Message-ID: <1559124971-13074-1-git-send-email-dingxiang@cmss.chinamobile.com> (raw) simple_strtoul is obsolete, use kstrtoul instead. Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> --- drivers/sh/intc/userimask.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c index 87d69e7..d1d8e9b 100644 --- a/drivers/sh/intc/userimask.c +++ b/drivers/sh/intc/userimask.c @@ -33,7 +33,8 @@ { unsigned long level; - level = simple_strtoul(buf, NULL, 10); + if (kstrtoul(buf, 10, &level)) + return -EINVAL; /* * Minimal acceptable IRQ levels are in the 2 - 16 range, but -- 1.9.1
next reply other threads:[~2019-05-29 10:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-29 10:16 Ding Xiang [this message] 2019-05-29 10:16 ` [PATCH] sh/intc: Fix obsolete function Ding Xiang
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=1559124971-13074-1-git-send-email-dingxiang@cmss.chinamobile.com \ --to=dingxiang@cmss.chinamobile.com \ --cc=dalias@libc.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=ysato@users.sourceforge.jp \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.