From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6886BC433DB for ; Thu, 21 Jan 2021 20:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FA182389B for ; Thu, 21 Jan 2021 20:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbhAUUjw (ORCPT ); Thu, 21 Jan 2021 15:39:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbhAUUji (ORCPT ); Thu, 21 Jan 2021 15:39:38 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A6AC061756 for ; Thu, 21 Jan 2021 12:38:58 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id d13so6773223ioy.4 for ; Thu, 21 Jan 2021 12:38:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t7mqf+OnHHgmEasThOeWv/Cz0OSsuhGVfQUCMVskmlM=; b=k+6Mr4g1BWhGj8+NP3PAO4u1Ueou82T/GKsrvkujtMj+xcDstE3hn853F0Cpor9WMy hzYeM98UCgt5PMNklfFnublFNEHYTwmJAIoLshgGOIOTq3NL3pnkgHqm58d1J0gczFnE QqeSvJl2Lolsex4OuoAKizFwdtqnMQ7PGhYcFmD4p1o2pyZJRyunYCccAQLG6Z3pMxeK YN4iZ82xmyaCXui9sLbFc0rgUPJyEmrUj2ql7+C5NCPm8D6snxMsnCBziQn7f/jIuQXm 8roNKxm5b8x1I5gTjBz/qVzjVRVmuFb1Us9nNZDZw8ibGymLpxgUdm5ZkXds2aCQGriM 3r3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t7mqf+OnHHgmEasThOeWv/Cz0OSsuhGVfQUCMVskmlM=; b=YzGMCF7D4velAAXI+k29ZVSsYc4Ui3mFoh1EBVaQc/3jmQBRTBwhNDbhpwJlnWnuoY 9hkQ9GSm9DDx7F5G7vHyYit3Dbkuv0koFbbLcuKavLRSa+O4/Wj+52ketnLIkHZcm0EL N124rTffyxwNwS3tiV5k9/tzGICbW5FDz5UogokiDKr8iyFAqExvX5tCA794HnFOscBy l8CCaybjtNMgUzsmxiejm959voIBnjgwmRiDQUejK03O/yNHdSAs2oc7+bVbS3lV+sl9 xaXptrSk74KBnHB/RqlwMZ5MULWeXRtYiTTNv1kU+GtbiK4fJdN6ctkxgNx1f8XaPhff o5RQ== X-Gm-Message-State: AOAM53304D1/v5cUInFk0er/F7frjFU1WHcCMl60qfTWKiGh1gJTXZi0 KQP1fuoewMSBvfC1wi3V4XCaGZw38WWrEcFDya4= X-Google-Smtp-Source: ABdhPJyQhycjgpb/B7dvMelEUuvwJXyOeWQcu7j6qPKfCoCN5La7YNeuaKa1QsTyFXiJ4QW4C3tC0OcDSSMsL2QAGBc= X-Received: by 2002:a05:6638:110a:: with SMTP id n10mr827873jal.29.1611261537592; Thu, 21 Jan 2021 12:38:57 -0800 (PST) MIME-Version: 1.0 References: <20210121000630.371883-1-yury.norov@gmail.com> <20210121000630.371883-3-yury.norov@gmail.com> In-Reply-To: From: Yury Norov Date: Thu, 21 Jan 2021 12:38:46 -0800 Message-ID: Subject: Re: [PATCH 2/6] bitmap: move some macros from linux/bitmap.h to linux/bitops.h To: Andy Shevchenko Cc: linux-m68k@lists.linux-m68k.org, Linux Kernel Mailing List , linux-sh@vger.kernel.org, linux-arch@vger.kernel.org, Geert Uytterhoeven , Yoshinori Sato , Rich Felker , Arnd Bergmann , Dennis Zhou , Andrew Morton , Wolfram Sang , David Sterba , Stefano Brivio , "Ma, Jianpeng" , Wei Yang , Josh Poimboeuf , Rasmus Villemoes Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org On Thu, Jan 21, 2021 at 2:18 AM Andy Shevchenko wrote: > > On Wed, Jan 20, 2021 at 04:06:26PM -0800, Yury Norov wrote: > > In the following patches of the series they are used by > > find_bit subsystem. > > s/subsystem/API/ > > ... > > > --- a/include/linux/bitops.h > > +++ b/include/linux/bitops.h > > @@ -7,6 +7,17 @@ > > > > #include > > > > +#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1))) > > +#define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) > > Hmm... Naming here is not in the bitops namespace. > I would expect BITS rather than BITMAP for these two. > > So, we have at least the following options: > - split to a separate header, like bitmap_macros.h > - s/BITMAP/BITS/ and either define BITMAP_* as respective BITS_* or rename it > everywhere in bitmap.* > - your variant > - ...???... We have GENMASK in linux/bits.h. I think we should use it here and drop local ones. It will also cover the case of OFFSET macro that you suggested in your comment to patch #5.