Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932274AbcJEUdv (ORCPT ); Wed, 5 Oct 2016 16:33:51 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33598 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754862AbcJEUdt (ORCPT ); Wed, 5 Oct 2016 16:33:49 -0400 From: Jitendra Khasdev To: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca, samuel.thibault@ens-lyon.org, gregkh@linuxfoundation.org, bankarsandhya512@gmail.com, saurabh.truth@gmail.com, amitoj1606@gmail.com Cc: speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jitendra Kumar Khasdev Subject: [PATCH] staging: speakup: Replaced obsolete simple_strtoul Date: Thu, 6 Oct 2016 02:02:58 +0530 Message-Id: <1475699578-31474-1-git-send-email-jkhasdev@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 29 From: Jitendra Kumar Khasdev This patch is for replacing obsolete simple_strtoul to kstrtoul which remove warning produce by checkpatch. Signed-off-by: Jitendra Kumar Khasdev --- drivers/staging/speakup/varhandlers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 21186e3..1a3caf3 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -323,9 +323,11 @@ char *spk_strlwr(char *s) char *spk_s2uchar(char *start, char *dest) { - int val; + unsigned long val; + + if (kstrtoul(start, 10, &val)) + return NULL; - val = simple_strtoul(skip_spaces(start), &start, 10); if (*start == ',') start++; *dest = (u_char)val; -- 2.7.4