From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E439A18043 for ; Fri, 24 Nov 2023 11:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tXG9Rm0j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15C18C433C7; Fri, 24 Nov 2023 11:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700823629; bh=lY5lbWMSvYgdNTnwGkTdkoM/X4wObIy/Mhn5AVhK97g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tXG9Rm0j28Ip4AJr/y+Y+3vmxmUP+7sQxEgg2Ig5u3DW0vUrxbRRJ9/npsUsyn//E 9V9cAiCtF3/deX7X1wA8kRzOI05eywutRw+tiYX/xP9geW9cwhaEQJN0UYatdJxKMt fA2kqypGvSJkHSBJUfH/CtRXqnRF2jG7R0tCfp+8MM6wY6ffcLRYf2Zt34lCpvZEIf VMKOh7MDgnMsnRf8y266ziFbI6vjzxWaL9SYb0aa9DVUBQfC4MmEa/lA2zP9g5JHWC rJCBzK7qSfE6ehuAvdHZip8p/ifoUF/9UwBBZdqcDvWI6cZoAhMPTqnQ7yVUP875w0 4vmbsRXo/uFxg== Date: Fri, 24 Nov 2023 11:00:25 +0000 From: Simon Horman To: Jesse Brandeburg Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, Julia Lawall , Ahmed Zaki , Marcin Szycik Subject: Re: [PATCH iwl-next v1 05/13] iavf: field prep conversion Message-ID: <20231124110025.GE50352@kernel.org> References: <20231121211921.19834-1-jesse.brandeburg@intel.com> <20231121211921.19834-6-jesse.brandeburg@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121211921.19834-6-jesse.brandeburg@intel.com> On Tue, Nov 21, 2023 at 01:19:13PM -0800, Jesse Brandeburg wrote: > Refactor iavf driver to use FIELD_PREP(), which reduces lines of code > and adds clarity of intent. > > This code was generated by the following coccinelle/spatch script and > then manually repaired. > > Clean up a couple spots in the code that had repetitive > y = cpu_to_*((blah << blah_blah) & blat) > y |= cpu_to_*((blahs << blahs_blahs) & blats) > to > x = FIELD_PREP(blat blah) > x |= FIELD_PREP(blats, blahs) > y = cpu_to_*(x); > > @prep@ > constant shift,mask; > expression a; > @@ > -((a << shift) & mask) > +FIELD_PREP(mask, a) > > Cc: Julia Lawall > Cc: Ahmed Zaki > Reviewed-by: Marcin Szycik > Signed-off-by: Jesse Brandeburg Reviewed-by: Simon Horman