Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3768463imc; Thu, 14 Mar 2019 05:02:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz245FV1UgmBOiPwoex2nCsU7HVZ9V1GjKzMM5n2ADjFZ72mGkrQIUpkmOkgkxwd0rv6ahk X-Received: by 2002:a17:902:b492:: with SMTP id y18mr50380411plr.175.1552564942392; Thu, 14 Mar 2019 05:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552564942; cv=none; d=google.com; s=arc-20160816; b=Wjw96rb2Gk2+tIpGzisB5kN1Hk8LrSaRM5IMo59PRCnn3Rk0EUrWXupKYPFeyhN8HB jv1Rzz7TwWou7jcyIHhlzliJY6CtTrMDnkwjFl+0p2Ffl3KbMXBsB+7QNTdK3RkbIj4E 5m5gCPB3F2NiUTbfvHNZsMVJM7+xFZ/CJTY+RWobWKXDTeCwx18ANEXUX7gd7bfipgzi rLm9rWSZ9ZQYpXUrLhjCHDs6GEMegpVv/Fo7BYIWa8CakFSiaLpX2/kl+sb5xNw117BR cHUDvooMXXlo8N4Gj9FYmXZedcdzon8vCwLDDgZxfSXakhF0c5xxS+TxVx7KQgFdWVdq xi4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:cc:subject:to :message-id:from:date; bh=z3h8w/O7W06OKCu7xfexSU5fmulOhkkyD7BYJ3KtZ6E=; b=JkR9SkM9SPCDUZT6Rz4IUMPNxQyuiGGjgaOKFfK3Jr4zdF7i20dH9vvz1qVwbZR4p9 quCu4Dk5zlh5atxitRu32gnYHoIHBOUTehQdY3OJ/bMBkA0fDpIGOGZA4DGuAv+3iS2H qCLCCcFZ40WGzR9tAb4VrJvMhNiUmIu7gyQhn1oIMtMchMCc1cHsDAa6UNd51fA8OTf+ Z0grHAG60atYMCQCnTFWRl7e4wuIlzfFU6/BGRkWPSwtucFuqrdcJeHbQ5LuFn0CyZvl 5NZujuXrn7wot02M4OscLTryr6VVv4pj7ovoYKiL1J0ppzhmo03jPyDvN2oQkNXRF2RI pI7g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si12343851pgp.269.2019.03.14.05.02.06; Thu, 14 Mar 2019 05:02:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727185AbfCNLzG (ORCPT + 99 others); Thu, 14 Mar 2019 07:55:06 -0400 Received: from ol.sdf.org ([205.166.94.20]:55367 "EHLO mx.sdf.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbfCNLzG (ORCPT ); Thu, 14 Mar 2019 07:55:06 -0400 Received: from sdf.org (IDENT:lkml@sdf.lonestar.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id x2EBrunI018367 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Thu, 14 Mar 2019 11:53:56 GMT Received: (from lkml@localhost) by sdf.org (8.15.2/8.12.8/Submit) id x2EBrtKi000133; Thu, 14 Mar 2019 11:53:55 GMT Date: Thu, 14 Mar 2019 11:53:55 GMT From: George Spelvin Message-Id: <201903141153.x2EBrtKi000133@sdf.org> To: geert@linux-m68k.org, lkml@sdf.org Subject: Re: [PATCH 1/5] lib/sort: Make swap functions more generic Cc: 13@sdf.org, akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, daniel.wagner@siemens.com, dchinner@redhat.com, don.mullis@gmail.com, linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, st5pub@yandex.ru In-Reply-To: References: , , <20190309140653.GO9224@smile.fi.intel.com>, <201903091553.x29FrfMR018600@sdf.org>, <20190314092958.GV9224@smile.fi.intel.com>, <201903141009.x2EA9q1Z025888@sdf.org>, Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Mar 2019 at 11:41:26 +0100, Geert Uytterhoeven wrote: > On Thu, Mar 14, 2019 at 11:10 AM George Spelvin wrote: >> On Sat, 09 Mar 2019 at 23:19:49 +0300, Andrey Abramov wrote: >>>> How about one of: >>>> swap_bytes / swap_ints / swap_longs >>>> swap_1 / swap_4 / swap_8 >>> >>> longs are ambiguous, so I would prefer bit-sized types. >> >> I already implemented Andrey's suggestions, which were the exact >> opposite of yours. >> >> Pistols at dawn? I didn't explain the joke because jokes aren't funny if explained, but just in case, by suggesting a clearly ridiculous method, I was saying "I have no idea how to resolve this conflict." > Prepared to fix all future long vs. int bugs? In the entire kernel? Or just the one small source file where these statically scoped helper functions are visible? In case of uncertainty, the comments and the code are right there just a few lines away from the one and only call site, so I don't expect much confusion. I care a lot about function names when they are exported, but in this case we're talking about what colour to paint the *inside* of the bike shed. I just want to pick some names and move on. Since nothing so far seems satsify everyone, I'll go with the ponderous but utterly unambiguous: swap_bytes swap_4byte_words swap_8byte_words