Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp825718ybl; Wed, 28 Aug 2019 06:01:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/b7t0tx7kRMvwnmvcb4rq8xxaBascyk9fypajdkzi2npZ4/R/19JJz+6+ZyuEFrZImdKI X-Received: by 2002:a63:9e43:: with SMTP id r3mr3424746pgo.148.1566997271532; Wed, 28 Aug 2019 06:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566997271; cv=none; d=google.com; s=arc-20160816; b=EgHf96x0haUunVmFG9+A9aUA/PAy3vsNci1WSeWgH8i368+tcVgFBIOQ59AqFBRDT9 8zKTzZUJ+vnm1X/PC/FMtzBU1szK/S5BfAYl0JFDeg/lvJqTeodVN2rVIrfnohKywNj9 +akt9VDQlfgrswriH9NGcSn3KCzRpA7VCdNjxT3JWcu9NqQhawSMGJAe1a+ee4J3UhZ3 0CY6skCltFgkIO7nM+2JRvsg4FrmNo4YSy3T2H1FOpt1GwO0Ap/cKU+HplSUyU+Jpw3A TAVfdtazsCfy56etuwXj3eRz11pbkN3WhF8Fcc1en1k6BszFpdXGS+5lpweKElfZE59w 5LOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yQYjQEKx+pk9xunTic066tAg2N98pbyunLxiZPwNrWc=; b=MS8D/YpHbVXujIzCrp2WMbz1crcjGUf/SehkCrIKGHyGicWAijTKKT8PhrWSiL3POu azLREn0PnWfHdi9XtMiZAhzo5WAl1xClHv00RDDVNuIZwHujKh54kodsCZ/JQ2IlW9dA zxJ9n+P9qk/YokO9WWKwQYGA7QSGnZoLnzEBTIqBWNefASCFvNQKOS01cgQvvTs6OH0d 7qGOhVmAi38577bkOaRgY6VaEl+/1C+lHqj3kaNYeH87N/gPNFjuZidVSPCr2brw7SuF zPIifULK+mt8wlcfFT2yjIBF2CdQl5k72+HrjuyW+7vKE15OBev4TjjqpaqpQAgD2okS eu1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D5ibXSmp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u191si2098035pgd.281.2019.08.28.06.00.54; Wed, 28 Aug 2019 06:01:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D5ibXSmp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfH1M75 (ORCPT + 99 others); Wed, 28 Aug 2019 08:59:57 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38421 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfH1M74 (ORCPT ); Wed, 28 Aug 2019 08:59:56 -0400 Received: by mail-pf1-f193.google.com with SMTP id o70so1693596pfg.5; Wed, 28 Aug 2019 05:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yQYjQEKx+pk9xunTic066tAg2N98pbyunLxiZPwNrWc=; b=D5ibXSmprjmd0nrYB034o67G7p4IAvRsMo16+h1yTJErfwE8lXN1xBcCf6Z00lKynp uLPpAc0QS39qXchQtkZS/naaItb8OgG8K4iUz6wYSuPuTDtgh5DX8DAXYUmzSADhXeBe eUvMn0SLn6aRwByHr0BRj7aGUsDg/no3qDrJirtf5x4fMWfQQP6sSXQDufsBOdA97/OZ enmzP/js+LX8yRqZWfV0Jc7SJw0vFMHlANay1aBoJnrJs5R623aq33W3GxTEg1g59/93 ocaVdxxUQIyuCrhSjzqZNJDt/lzD2FM3XEJdXXF+pW/liJup1DFZTUL/NAbJkbQPoSyt cm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yQYjQEKx+pk9xunTic066tAg2N98pbyunLxiZPwNrWc=; b=PxAr4Tzr2BYPZGdfikSrsUhoJB3+DED5YKZC1xevHr/va9gojhCQgzi2OKAyfRTbQW zQ+4R1tPGFascnbp9EOLwnYrZGjM33AC5RfbGhm8EzqfOfBizp+Tk936lbMxXdnGUixp /6Nm6la5KAPxTJRj4ePInnDIvFSdCuio5UGrNXJWuMYgxbJle/XGeePHnKKaopa/P6Mc KC2CmD+MvlsjpF+4deaT+E+4UH4E/X+4SsWqAZ63Ntqa7/H47WAH/R/Ihp3oPVwr0Q9y 71Ww0/+nl7hncEn3YjTDS/rlFebQpP2b5p08r8flaVUeysV0UVV8XG/9iD+3dBo8CGSW s4KA== X-Gm-Message-State: APjAAAUxaagLNOcbYlm772jF74mG+l2/vaCRaF+bI7j9tqYPRAPVMT/w vBQT5KBvGBM/jJxH5vUxEXQ= X-Received: by 2002:aa7:8d42:: with SMTP id s2mr4520451pfe.185.1566997196023; Wed, 28 Aug 2019 05:59:56 -0700 (PDT) Received: from localhost ([39.7.47.251]) by smtp.gmail.com with ESMTPSA id w2sm2258227pgc.32.2019.08.28.05.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 05:59:55 -0700 (PDT) Date: Wed, 28 Aug 2019 21:59:51 +0900 From: Sergey Senozhatsky To: Rasmus Villemoes Cc: Sergey Senozhatsky , Jani Nikula , Petr Mladek , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Steven Rostedt , Enrico@kleine-koenig.org, Weigelt@kleine-koenig.org, Andrew Morton , metux IT consult , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] vsprintf: introduce %dE for error constants Message-ID: <20190828125951.GA12653@jagdpanzerIV> References: <20190827211244.7210-1-uwe@kleine-koenig.org> <20190828113216.p2yiha4xyupkbcbs@pathway.suse.cz> <87o9097bff.fsf@intel.com> <20190828120246.GA31416@jagdpanzerIV> <087e8e18-8044-27ef-b0bd-8a1093f53b32@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <087e8e18-8044-27ef-b0bd-8a1093f53b32@rasmusvillemoes.dk> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (08/28/19 14:49), Rasmus Villemoes wrote: > On 28/08/2019 14.02, Sergey Senozhatsky wrote: > > On (08/28/19 14:54), Jani Nikula wrote: > > [..] > >>> I personally think that this feature is not worth the code, data, > >>> and bikeshedding. > >> > >> The obvious alternative, I think already mentioned, is to just add > >> strerror() or similar as a function. I doubt there'd be much opposition > >> to that. Folks could use %s and strerr(ret). And a follow-up could add > >> the special format specifier if needed. > > > > Yeah, I'd say that strerror() would be a better alternative > > to vsprintf() specifier. (if we decide to add such functionality). > > Please no. The .text footprint of the changes at the call sites to do > pr_err("...%s...", errcode(err)) instead of the current > pr_err("...%d...", err) would very soon dwarf whatever is necessary to > implement %pE or %dE. New vsprintf() specifiers have some downsides as well. Should %dE accidentally (via backport) make it to the -stable kernel, which does not support %dE, and we are going to lose the actual error code value as well. -ss