Re: [PATCH 1/5] lib/sort: Make swap functions more generic

From: Andy Shevchenko
Date: Thu Mar 14 2019 - 08:18:18 EST


On Thu, Mar 14, 2019 at 11:53:55AM +0000, George Spelvin wrote:
> On Thu, 14 Mar 2019 at 11:41:26 +0100, Geert Uytterhoeven wrote:
> > On Thu, Mar 14, 2019 at 11:10 AM George Spelvin <lkml@xxxxxxx> 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 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

Works for me, or if someone insists it might be also bits there.

--
With Best Regards,
Andy Shevchenko