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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9D38C433FE for ; Tue, 23 Nov 2021 23:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239569AbhKWXwf (ORCPT ); Tue, 23 Nov 2021 18:52:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:43150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbhKWXwd (ORCPT ); Tue, 23 Nov 2021 18:52:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EBAD760F41; Tue, 23 Nov 2021 23:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637711364; bh=IW4qN8u05oVacusnPMH1cuKnY7vyge2dygNZ0jyMnfs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bMkLLetQudL1AnjDLBkGz2KJV65XFDNAI+qMERM3p2htB/mPltEFDc0SoR5SG7cTn yUvjgLX4fj3iycoMCeZbceNqv8VJp4xXmhJ5j4daJdQUx70dPPE1ZSDF3I8EJ3CrBl FL9EHxBPJYKnvkt5L2363w5f8MTJ/hI+N0EksRg4Tqq2ECyAP9r+yfiU6OtA4c1HNW sJDJxZC66+IkfqVqHU0aoaIJ7PQLiQE76d+ztRn4+dA/AYxJtUD+/ZrA56NgYcGb99 3NhcCdyp7MdhPQ2MlzMSxitFt7xyg2kF02pUQFCNG1ojXEWE+DZkeLhKg7BQKKAgjZ pglhaeH4khWUA== Date: Tue, 23 Nov 2021 15:49:22 -0800 From: Jakub Kicinski To: Johannes Berg Cc: Geert Uytterhoeven , Tony Lindgren , Russell King , Rajendra Nayak , Paul Walmsley , Michael Turquette , Stephen Boyd , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Tero Kristo , Jonathan Cameron , Lars-Peter Clausen , Lorenzo Bianconi , Benoit Parrot , Mauro Carvalho Chehab , Adrian Hunter , Andrew Jeffery , Ulf Hansson , Joel Stanley , Ping-Ke Shih , Kalle Valo , "David S . Miller" , Linus Walleij , Liam Girdwood , Mark Brown , Magnus Damm , Eduardo Valentin , Keerthy , "Rafael J . Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Jaroslav Kysela , Takashi Iwai , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 01/17] bitfield: Add non-constant field_{prep,get}() helpers Message-ID: <20211123154922.600fd3b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <637a4183861a1f2cdab52b7652bfa7ed33fbcdd2.camel@sipsolutions.net> References: <3a54a6703879d10f08cf0275a2a69297ebd2b1d4.1637592133.git.geert+renesas@glider.be> <01b44b38c087c151171f8d45a2090474c2559306.camel@sipsolutions.net> <20211122171739.03848154@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <637a4183861a1f2cdab52b7652bfa7ed33fbcdd2.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 23 Nov 2021 17:24:15 +0100 Johannes Berg wrote: > > (*_replace_bits() seems to be useful, though) > > Indeed. > > Also as I said in my other mail, the le32/be32/... variants are > tremendously useful, and they fundamentally cannot be expressed with the > FIELD_GET() or field_get() macros. IMHO this is a clear advantage to the Can you elaborate? > typed versions, and if you ask me we should get rid of the FIELD_GETand > FIELD_PREP entirely - difficult now, but at least let's not propagate > that? I don't see why. 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 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B11B9C433EF for ; Wed, 24 Nov 2021 07:17:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DBD1917D6; Wed, 24 Nov 2021 08:16:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DBD1917D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637738264; bh=IW4qN8u05oVacusnPMH1cuKnY7vyge2dygNZ0jyMnfs=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BwKhvJHkK+OSkUVnCi002NcyvsCyXye99nfdLAXvmrJDxVf4vVyqUnV+1a2sUrquD L/V4m48DBfhUTxlBjs/NL1udJeJZ34WgAHWGwC2ot+g9wcqq+YHp54LRj50ktguRkp saAX6Eu6dtGBlH/Q/Zz1qKdUJT2khKisHzh4L5AE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 06766F805F6; Wed, 24 Nov 2021 08:06:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 873F5F800E7; Wed, 24 Nov 2021 00:49:31 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1B846F800E7 for ; Wed, 24 Nov 2021 00:49:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B846F800E7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bMkLLetQ" Received: by mail.kernel.org (Postfix) with ESMTPSA id EBAD760F41; Tue, 23 Nov 2021 23:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637711364; bh=IW4qN8u05oVacusnPMH1cuKnY7vyge2dygNZ0jyMnfs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bMkLLetQudL1AnjDLBkGz2KJV65XFDNAI+qMERM3p2htB/mPltEFDc0SoR5SG7cTn yUvjgLX4fj3iycoMCeZbceNqv8VJp4xXmhJ5j4daJdQUx70dPPE1ZSDF3I8EJ3CrBl FL9EHxBPJYKnvkt5L2363w5f8MTJ/hI+N0EksRg4Tqq2ECyAP9r+yfiU6OtA4c1HNW sJDJxZC66+IkfqVqHU0aoaIJ7PQLiQE76d+ztRn4+dA/AYxJtUD+/ZrA56NgYcGb99 3NhcCdyp7MdhPQ2MlzMSxitFt7xyg2kF02pUQFCNG1ojXEWE+DZkeLhKg7BQKKAgjZ pglhaeH4khWUA== Date: Tue, 23 Nov 2021 15:49:22 -0800 From: Jakub Kicinski To: Johannes Berg Subject: Re: [PATCH 01/17] bitfield: Add non-constant field_{prep,get}() helpers Message-ID: <20211123154922.600fd3b5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <637a4183861a1f2cdab52b7652bfa7ed33fbcdd2.camel@sipsolutions.net> References: <3a54a6703879d10f08cf0275a2a69297ebd2b1d4.1637592133.git.geert+renesas@glider.be> <01b44b38c087c151171f8d45a2090474c2559306.camel@sipsolutions.net> <20211122171739.03848154@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <637a4183861a1f2cdab52b7652bfa7ed33fbcdd2.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 24 Nov 2021 08:05:53 +0100 Cc: Alexandre Belloni , Daniel Lezcano , linux-aspeed@lists.ozlabs.org, Liam Girdwood , Tony Lindgren , linux-wireless@vger.kernel.org, Michael Turquette , Amit Kucheria , Ulf Hansson , Nicolas Ferre , linux-clk@vger.kernel.org, Ping-Ke Shih , Lars-Peter Clausen , openbmc@lists.ozlabs.org, "Rafael J . Wysocki" , Magnus Damm , Russell King , linux-iio@vger.kernel.org, Ludovic Desroches , Geert Uytterhoeven , Joel Stanley , Zhang Rui , Linus Walleij , linux-media@vger.kernel.org, alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, Benoit Parrot , linux-gpio@vger.kernel.org, Mark Brown , Lorenzo Bianconi , Takashi Iwai , Mauro Carvalho Chehab , Kalle Valo , linux-arm-kernel@lists.infradead.org, Eduardo Valentin , Paul Walmsley , Rajendra Nayak , Tero Kristo , Andrew Jeffery , Keerthy , linux-pm@vger.kernel.org, linux-mmc@vger.kernel.org, Adrian Hunter , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Stephen Boyd , netdev@vger.kernel.org, "David S . Miller" , Jonathan Cameron X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 23 Nov 2021 17:24:15 +0100 Johannes Berg wrote: > > (*_replace_bits() seems to be useful, though) > > Indeed. > > Also as I said in my other mail, the le32/be32/... variants are > tremendously useful, and they fundamentally cannot be expressed with the > FIELD_GET() or field_get() macros. IMHO this is a clear advantage to the Can you elaborate? > typed versions, and if you ask me we should get rid of the FIELD_GETand > FIELD_PREP entirely - difficult now, but at least let's not propagate > that? I don't see why.