Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752749AbdCBP3n (ORCPT ); Thu, 2 Mar 2017 10:29:43 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:37264 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdCBP3i (ORCPT ); Thu, 2 Mar 2017 10:29:38 -0500 X-IronPort-AV: E=Sophos;i="5.35,231,1484002800"; d="scan'208";a="262843719" Date: Thu, 2 Mar 2017 16:17:12 +0100 From: Samuel Thibault To: Marcin Ciupak Cc: William Hubbs , Chris Brannon , Kirk Reiser , Greg Kroah-Hartman , speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: speakup: replace simple_strtoul with kstrtou8 Message-ID: <20170302151712.o7tza5lt3uuoe7av@var.youpi.perso.aquilenet.fr> Mail-Followup-To: Samuel Thibault , Marcin Ciupak , William Hubbs , Chris Brannon , Kirk Reiser , Greg Kroah-Hartman , speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20170302142823.GA12213@gentoo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170302142823.GA12213@gentoo> Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 370 Lines: 16 Marcin Ciupak, on jeu. 02 mars 2017 15:28:23 +0100, wrote: > - int val; > + int ret; > > - val = simple_strtoul(skip_spaces(start), &start, 10); > + ret = kstrtou8(skip_spaces(start), 10, dest); This is not the same, you need to have start properly move, since it's used below: > if (*start == ',') > start++; > - *dest = (u_char)val; > return start; Samuel