Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753200AbbHSIew (ORCPT ); Wed, 19 Aug 2015 04:34:52 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:33138 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730AbbHSIer (ORCPT ); Wed, 19 Aug 2015 04:34:47 -0400 From: Rasmus Villemoes To: Andrew Morton Cc: Dongsu Park , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Peter Hurley , Josh Triplett , Al Viro , David Howells , Alban Crequy , Alexey Dobriyan Subject: Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Organization: D03 References: <882a878038efb5fed381be5d4817ff44d90703d5.1439904209.git.dpark@posteo.net> <692839ff7158dbb96dd20ce8e36c13f85fa64fd7.1439910753.git.dpark@posteo.net> <20150818164425.76b9df40f94bbd2a57d0d518@linux-foundation.org> <20150819072431.GA2642@posteo.de> <20150819004714.c06e4a70.akpm@linux-foundation.org> X-Hashcash: 1:20:150819:alban@endocode.com::dAdjP6NBcNpc1Rhv:00000000000000000000000000000000000000000000C6p X-Hashcash: 1:20:150819:akpm@linux-foundation.org::s8VznZ3LR1Zq0zA+:0000000000000000000000000000000000000Y4m X-Hashcash: 1:20:150819:peter@hurleysoftware.com::BnZ5ZmD83MRkcnAY:00000000000000000000000000000000000000zWK X-Hashcash: 1:20:150819:dpark@posteo.net::Zm3k8yoDfZ6PVu3C:01Ew6 X-Hashcash: 1:20:150819:linux-fsdevel@vger.kernel.org::NzLJJoMoKYUjQhI5:000000000000000000000000000000001y7b X-Hashcash: 1:20:150819:viro@zeniv.linux.org.uk::jyujc20HXE6icKcT:000000000000000000000000000000000000002Tt6 X-Hashcash: 1:20:150819:adobriyan@gmail.com::RtahBa58yDiGvrLB:0000000000000000000000000000000000000000004KKH X-Hashcash: 1:20:150819:linux-kernel@vger.kernel.org::5KNXu0BJKVgCuhyk:0000000000000000000000000000000008DKd X-Hashcash: 1:20:150819:dhowells@redhat.com::UuV31F3LlxviLbA2:000000000000000000000000000000000000000000DiTB X-Hashcash: 1:20:150819:josh@joshtriplett.org::Tpql2Mu/xpMphkvz:0000000000000000000000000000000000000000I50U Date: Wed, 19 Aug 2015 10:34:43 +0200 In-Reply-To: <20150819004714.c06e4a70.akpm@linux-foundation.org> (Andrew Morton's message of "Wed, 19 Aug 2015 00:47:14 -0700") Message-ID: <87io8b3cd8.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 Content-Length: 1152 Lines: 40 On Wed, Aug 19 2015, Andrew Morton wrote: > > whoa, wait, I was looking at the -mm tree which changes kstrtouint(): > > static inline int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res) > { > return parse_integer(s, base | PARSE_INTEGER_NEWLINE, res); > } > > and > > * Return number of characters parsed or -E. > ... > */ > #define parse_integer(s, base, val) \ > > > Alexey, doesn't this mean that code which does > > if (kstrtouint(...)) > return -EFOO; > > will break? No, because PARSE_INTEGER_NEWLINE means more than just accepting a trailing newline. It also requires the entire string to be consumed, and changes the return semantics. I suggested splitting those three things into separate flags and letting PARSE_INTEGER_KSTRTOX be a shorthand for those. Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/