Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751693AbdCCIip (ORCPT ); Fri, 3 Mar 2017 03:38:45 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34595 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbdCCIin (ORCPT ); Fri, 3 Mar 2017 03:38:43 -0500 Date: Fri, 3 Mar 2017 09:38:33 +0100 From: Marcin Ciupak To: Samuel Thibault 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: <20170303083833.GA12461@gentoo> References: <20170302142823.GA12213@gentoo> <20170302151712.o7tza5lt3uuoe7av@var.youpi.perso.aquilenet.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170302151712.o7tza5lt3uuoe7av@var.youpi.perso.aquilenet.fr> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 664 Lines: 27 On Thu, Mar 02, 2017 at 04:17:12PM +0100, Samuel Thibault wrote: > 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 You are right, start is not updated by kstrtou8 like it is by simple_strtoul. If I understand it correctly simple_strtoul cannot be replaced by kstrtou8 here. Please discard this patch. Marcin