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 ADAA31803C for ; Fri, 24 Nov 2023 11:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gEpnvQT1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62420C433C7; Fri, 24 Nov 2023 11:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700823693; bh=Jx1f6wkJcLzm1Hy547MP6/LLs7m6OTz+JG66A3EunOI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gEpnvQT1xf4GnynstqjjW5ERsQ4eM9lMvpMZCRFQpGkaxv8rHOA8RkaHx1QHZOAJO Az+Q4r4bZbFqBH0QBE+bX+SpEu4F2u0PFtxkpHPlveCa7zKH38eH7Tgc328F3BNbMQ xg/c3XrmFoLgQgRHrS0A96DqVVcW9u7QKq1a4nL3vvKFZ3w/3TxiKEWb3kNdnY12Hf wpKugQQ3jPl4zs9Kjmcwlz7gJ5Y2+3nwynPZdtY79WjftiL18vQefaQN89DtSAMAjz HO0YY0OjOBoTYPQbFdXdLs8SHKaZA9x/N/aVxL0qXMEbVu+urwKDSNFSMhRzE1p+3z tZ1AT5jFE/fwA== Date: Fri, 24 Nov 2023 11:01:30 +0000 From: Simon Horman To: Jesse Brandeburg Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, Julia Lawall , Marcin Szycik Subject: Re: [PATCH iwl-next v1 09/13] intel: legacy: field get conversion Message-ID: <20231124110130.GI50352@kernel.org> References: <20231121211921.19834-1-jesse.brandeburg@intel.com> <20231121211921.19834-10-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-10-jesse.brandeburg@intel.com> On Tue, Nov 21, 2023 at 01:19:17PM -0800, Jesse Brandeburg wrote: > Refactor several older Intel drivers to use FIELD_GET(), which reduces > lines of code and adds clarity of intent. > > This code was generated by the following coccinelle/spatch script and > then manually repaired. > > @get@ > constant shift,mask; > expression a; > @@ > -((a & mask) >> shift) > +FIELD_GET(mask, a) > > and applied via: > spatch --sp-file field_prep.cocci --in-place --dir \ > drivers/net/ethernet/intel/ > > Cc: Julia Lawall > Reviewed-by: Marcin Szycik > Signed-off-by: Jesse Brandeburg Reviewed-by: Simon Horman