Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1408192ybv; Thu, 6 Feb 2020 03:34:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwvCXaMoF9wtyfYB5r/ntj2G3zk+heeAPvVdWe5Del4Z87EQ/fSHIzykxX/3SlO6nJHLWWY X-Received: by 2002:a05:6830:4c7:: with SMTP id s7mr29456711otd.359.1580988893950; Thu, 06 Feb 2020 03:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580988893; cv=none; d=google.com; s=arc-20160816; b=IgR/7T1YB/1xHo9z1inD85EQ7FZlIyLmseWLM+9rSpzj4Ny4q39bh8Nro6eL9RKZSZ iWO9qsSy1JN32s0L6BPcYzV24dABOdQndRH9cwBjfhXkIC93NRpg/zveNoHGe3wHVbVi NGg/BUnLAQ9Y0Bh0YUlWBQ6voFct5PnCf1MZ9OuTPd6efxNtabE0S6xpHIlDMPJ6/1RH CRzg6D/nUK0rkxztT1dBKErmKyP6iylrzkG/5l1tJFjvnNyo0kZfvq5qqGIs7OGvju/I 6/BK1wVvcfVLiX9LJeiybo6m/DTWmfW6fbRuHojszMNfne3SJ1A4zh2kx1kYRktgA1cc sNbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lqYLyKVi5JmvAeoANscAx85egL73H89of/35jIfZxqs=; b=Va1ZH70MRJg1BwFIDQ8dD8G2pYIohC1HNWBP5gvcbtX5rZ/4dVficGmBanJ+sb3hdz jyYI6MHTdCiauedg8WJbts9vxT+7wsEXgcJ7aO2QO7lGKXWzEwu2iPV99Wm/KGuOnsIW XQmj4zsSqsV9MgWocphSrFYsBM/KLiQEY73t8rlw2N7KXXd/sZBaluYYExJyjwECkH0Q sECHSH7HWpiaAY9WJQyDJTy6jD3Ir3sRFB1tQ5ozyeo/2Fe4A/sBW1wrlemdNi4L2qdh qxzKatrsRAiVfCSjPE/Q3rbtcfHC+iyii/9wZhyfgk5Z2eOLg+8ND1fdJQJBCJKN1hlG Tsaw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a22si1926566oia.15.2020.02.06.03.34.41; Thu, 06 Feb 2020 03:34:53 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727747AbgBFLcy (ORCPT + 99 others); Thu, 6 Feb 2020 06:32:54 -0500 Received: from mga11.intel.com ([192.55.52.93]:53596 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727723AbgBFLcy (ORCPT ); Thu, 6 Feb 2020 06:32:54 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2020 03:32:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,409,1574150400"; d="scan'208";a="232017090" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003.jf.intel.com with ESMTP; 06 Feb 2020 03:32:49 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1izfOs-0007k3-NS; Thu, 06 Feb 2020 13:32:50 +0200 Date: Thu, 6 Feb 2020 13:32:50 +0200 From: Andy Shevchenko To: Rasmus Villemoes Cc: Andrew Morton , linux-kernel@vger.kernel.org, Trond@black.fi.intel.com, Myklebust@black.fi.intel.com, trond.myklebust@hammerspace.com, Anna Schumaker , "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Arnd Bergmann Subject: Re: [PATCH v2 1/2] kernel.h: Split out min()/max() et al helpers Message-ID: <20200206113250.GV10400@smile.fi.intel.com> References: <20200204170412.30106-1-andriy.shevchenko@linux.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 05, 2020 at 12:23:53AM +0100, Rasmus Villemoes wrote: > On 04/02/2020 18.04, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out min()/max() > > et al helpers. > > > > At the same time convert users in header and lib folder to use new header. > > Though for time being include new header back to kernel.h to avoid twisted > > indirected includes for existing users. > > This is definitely long overdue, so thanks for taking this on. I think > minmax.h is fine as a header on its own, but for the other one, I think > you should go even further - and perhaps all these should go in a > include/math/ dir (include/linux/ has ~1200 files), so we'd have > math/minmax.h, math/round.h, math/ilog2.h, math/gcd.h etc., each > containing just enough #includes to be self-contained (so if there's a > declaration of something taking a u32, there's no way around having it > include types.h (or wherever that's defined). While I like the idea, I think we may do it in a next iteration. -- With Best Regards, Andy Shevchenko