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 2ECC71A5BE for ; Fri, 24 Nov 2023 11:01:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="trs3RDmw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1ECFC433C7; Fri, 24 Nov 2023 11:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700823712; bh=pAzbhg6Np4McrtVqaHbOiqH3nSzqJr4A1M4dWs8QWcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=trs3RDmwYZZRuqn9alxC+f9Ro3w4tXNH3I5yaB/hWOpxDdFOGFFi0/e+C18Nc0aUp PEWq8uP5GOmDXqKiU5aZjBQGH2hzMAKg4G+CNj4sIOAQOQmUymrMNKSsBHCWAn5lUe qEj0Eer+pTBlHvaXXzTtz7pAoR7IhpjbjDDrS5POJZD6s9sVVwB/aLgd5B8GKdwuFo 03m65Eon0qFm5/gZACnlBxWCLLN5Tq0yWYb/EFAbnqrc3y35XyL9VW/pcRyqjkYXpD 9fpMXuxVKtFSUsVvPZlF8nNxgse7TkUTY+AVKgE34CU7KtzyFeKQWi2OFQqnp4+ofm 2jkPMvmX8A3Kg== Date: Fri, 24 Nov 2023 11:01:48 +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 10/13] igc: field get conversion Message-ID: <20231124110148.GJ50352@kernel.org> References: <20231121211921.19834-1-jesse.brandeburg@intel.com> <20231121211921.19834-11-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-11-jesse.brandeburg@intel.com> On Tue, Nov 21, 2023 at 01:19:18PM -0800, Jesse Brandeburg wrote: > Refactor the igc driver to use FIELD_GET() for mask and shift reads, > which reduces lines of code and adds clarity of intent. > > This code was generated by the following coccinelle/spatch script and > then manually repaired in a later patch. > > @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