Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbcLERsK (ORCPT ); Mon, 5 Dec 2016 12:48:10 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:35236 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbcLERsI (ORCPT ); Mon, 5 Dec 2016 12:48:08 -0500 MIME-Version: 1.0 In-Reply-To: <196dd443-e3c7-2c37-1dd1-bc1d249ea2fb@laposte.net> References: <196dd443-e3c7-2c37-1dd1-bc1d249ea2fb@laposte.net> From: Geert Uytterhoeven Date: Mon, 5 Dec 2016 18:48:06 +0100 X-Google-Sender-Auth: CMXOv3yX1xy6qBcXH1gkyynET3E Message-ID: Subject: Re: [PATCH] bitops: add equivalent of BIT(x) for bitfields To: Sebastian Frias Cc: zijun_hu , Sasha Levin , Andrew Morton , "linux-kernel@vger.kernel.org" , Linus Torvalds , Mason , Maxime Coquelin , Harvey Harrison , Borislav Petkov Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 782 Lines: 22 On Mon, Dec 5, 2016 at 2:36 PM, Sebastian Frias wrote: > Introduce SETBITFIELD(msb, lsb, value) macro to ease dealing with > continuous bitfields, just as BIT(x) does for single bits. If it's a bitfield, why not calling it that way? So what about BITFIELD(start ,size), like arch/tile/kernel/tile-desc_32.c has? > SETBITFIELD_ULL(msb, lsb, value) macro is also added. Confused by the need for a "value" parameter... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds