From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752913AbbIJGrX (ORCPT ); Thu, 10 Sep 2015 02:47:23 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:36228 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843AbbIJGrU (ORCPT ); Thu, 10 Sep 2015 02:47:20 -0400 From: Rasmus Villemoes To: Linus Torvalds Cc: Andrew Morton , Alexey Dobriyan , Linux Kernel Mailing List Subject: Re: incoming Organization: D03 References: <20150909153424.3feb1c403a841ab97b2d98ab@linux-foundation.org> X-Hashcash: 1:20:150910:adobriyan@gmail.com::2DRuIvWG6yKCZQFW:0000000000000000000000000000000000000000000VEv X-Hashcash: 1:20:150910:linux-kernel@vger.kernel.org::KMHImBV4RBXAxVUP:00000000000000000000000000000000016y0 X-Hashcash: 1:20:150910:akpm@linux-foundation.org::hY5Jrj4sP9RQs5E/:00000000000000000000000000000000000057LF X-Hashcash: 1:20:150910:torvalds@linux-foundation.org::AecAFzyzDf03FvM7:00000000000000000000000000000000Cerf Date: Thu, 10 Sep 2015 08:47:17 +0200 In-Reply-To: (Linus Torvalds's message of "Wed, 9 Sep 2015 16:23:17 -0700") Message-ID: <87d1xqkbyi.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10 2015, Linus Torvalds wrote: > The VERY FIRST conversion patch I looked at was buggy. That makes me > angry. The whole *AND*ONLY* point of this whole thing was to get rid > of bugs, and be a obviously safe interface, and then the first > conversion patch proves it wrong. > > Let me show you: > > if (isdigit(*str)) { > - io_tlb_nslabs = simple_strtoul(str, &str, 0); > + str += parse_integer(str, 0, &io_tlb_nslabs); > > and obviously nobody spent even a *second* asking themselves "what if > parse_integer returns an error". [This is going to sound awfully self-glorifying. Oh well.] I did point that out in another instance (memparse), which I think then got somewhat fixed in a later version. Since Alexey and I seemed to disagree on what guiding principles to use when doing the conversions and a number of other points, I didn't have the energy to go through the entire series, and the discussion died out. http://thread.gmane.org/gmane.linux.kernel/1942623/focus=1944193 > I liked the automatic type-based templating it does, but I *don't* > like the breakage that seems to be inevitable in any large-scale > conversion from a previously used historical interface. My words exactly. Rasmus