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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 88897C388F7 for ; Mon, 9 Nov 2020 14:29:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 130C120674 for ; Mon, 9 Nov 2020 14:29:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SV82wtel" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 130C120674 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nXtQlv3bZF5GhJUvWCVkGP9/pCUBX/46GdeZKXbTrVE=; b=SV82wtelESSSe1yFLqUFhvVuI 4xLhUERTNgeDs0mn7MO9RSDHTM5+Ig6tAOOkMX3EsvvSQMNVcQtNimNSvdgZDjGFnwTarwQVAjBRS YaDhfYpMi1qZDStfagztVFvH/9NnGk7vP/7VdRHqKm81YoMFL64GL/c2bMBdN5whpc7pLuX5AzdYk 6jqB97R7FpmOgOgi0sAYyUpGtG45hb3Fd4lD+cJ0mESdOTlyEUFFZ9V8RWOh4aLGNOr5xcQNokDAn S6G5uJ6TaNpjNs7SGNT9KcZdG1pmInQC9gWYWfV3yLASbUbJuqcb4d+wj3HDXb2GYKyAOkB7hv739 bBumfjoAA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kc89H-0004jP-Jr; Mon, 09 Nov 2020 14:27:59 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kc89F-0004iZ-EQ for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2020 14:27:58 +0000 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 30E3420016; Mon, 9 Nov 2020 14:27:49 +0000 (UTC) Date: Mon, 9 Nov 2020 15:27:48 +0100 From: Alexandre Belloni To: Andy Shevchenko Subject: Re: [PATCH v7 2/3] pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO Message-ID: <20201109142748.GI1257108@piout.net> References: <20201029134027.232951-1-lars.povlsen@microchip.com> <20201029134027.232951-3-lars.povlsen@microchip.com> <874klyg2dg.fsf@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_092757_586688_83A87D98 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree , Linus Walleij , Linux Kernel Mailing List , Microchip Linux Driver Support , "open list:GPIO SUBSYSTEM" , Lars Povlsen , linux-arm Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/11/2020 16:00:16+0200, Andy Shevchenko wrote: > On Mon, Nov 9, 2020 at 2:07 PM Lars Povlsen wrote: > > > On Thu, Oct 29, 2020 at 3:40 PM Lars Povlsen wrote: > > ... > > > >> +#define __shf(x) (__builtin_ffs(x) - 1) > > >> +#define __BF_PREP(bf, x) (bf & ((x) << __shf(bf))) > > >> +#define __BF_GET(bf, x) (((x & bf) >> __shf(bf))) > > > > > > Isn't it home grown reimplementation of bitfield.h? > > > > This was answered in the aforementioned mail. > > Perhaps it makes sense to add functions like field_get(), field_prep() > to that header? IIRC it has been explicitly excluded from bitfield.h to ensure developers will think about the introduced overhead. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel