From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755343AbbCLXHD (ORCPT ); Thu, 12 Mar 2015 19:07:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45602 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbbCLXHB (ORCPT ); Thu, 12 Mar 2015 19:07:01 -0400 Date: Thu, 12 Mar 2015 16:07:00 -0700 From: Andrew Morton To: Bartosz Golaszewski Cc: LKML , Guenter Roeck , lm-sensors , Steven Rostedt Subject: Re: [PATCH v2 1/4] kernel.h: add find_closest() macro Message-Id: <20150312160700.c0a64288f6726ba517318bc2@linux-foundation.org> In-Reply-To: <1426008442-26236-2-git-send-email-bgolaszewski@baylibre.com> References: <1426008442-26236-1-git-send-email-bgolaszewski@baylibre.com> <1426008442-26236-2-git-send-email-bgolaszewski@baylibre.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Mar 2015 18:27:19 +0100 Bartosz Golaszewski wrote: > +/* > + * Similar to find_closest(), but 'a' is expected to be sorted > + * in descending order. > + */ > +#define find_closest_desc(x, a, as) __find_closest(x, a, as, >) description? descriptor? descendent? oh, it's "descending". So let's use "descending"! I think it's good to put possibly-useful stuff like this into includes/linux, particularly when we already have several usage sites. But we don't _have_ to keep putting things into kernel.h. Maybe a new include/linux/handy-macros.h or include/linux/find_closest.h?