From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 6E4CF7D082 for ; Mon, 8 Oct 2018 14:55:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbeJHWID (ORCPT ); Mon, 8 Oct 2018 18:08:03 -0400 Received: from mga02.intel.com ([134.134.136.20]:29700 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbeJHWID (ORCPT ); Mon, 8 Oct 2018 18:08:03 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2018 07:55:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,357,1534834800"; d="scan'208";a="97126274" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga001.fm.intel.com with ESMTP; 08 Oct 2018 07:55:51 -0700 Received: from andy by smile with local (Exim 4.91) (envelope-from ) id 1g9Wwo-00080p-Jj; Mon, 08 Oct 2018 17:55:50 +0300 Date: Mon, 8 Oct 2018 17:55:50 +0300 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Geert Uytterhoeven , Petr Mladek , "Tobin C. Harding" , Andrew Morton , Jonathan Corbet , Linux Kernel Mailing List , "open list:DOCUMENTATION" Subject: Re: [PATCH 1/3] lib/vsprintf: Prepare for more general use of ptr_to_id() Message-ID: <20181008145550.GD15943@smile.fi.intel.com> References: <20181008110504.25449-1-geert+renesas@glider.be> <20181008110504.25449-2-geert+renesas@glider.be> <20181008142544.GB15943@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, Oct 08, 2018 at 04:37:29PM +0200, Geert Uytterhoeven wrote: > Hi Andy, > > On Mon, Oct 8, 2018 at 4:25 PM Andy Shevchenko > wrote: > > On Mon, Oct 08, 2018 at 01:05:02PM +0200, Geert Uytterhoeven wrote: > > > - Make the ptr argument const, to avoid adding casts in future > > > callers, > > > > > - Add a forward declaration, to avoid moving large blocks of code. > > > > How big it would be? ptr_to_id() itself plus... > > ... all the randomization helpers. > And ptr_to_id() needs pointer_string(), string(), widen_string(), number(), > and move_right(). > > 118 insertions(+), 120 deletions(-) > > Is that acceptable? Better to ask Peter and others, my personal opinion I would go "forward declaration"-less solution. -- With Best Regards, Andy Shevchenko