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 7946AECAAD8 for ; Fri, 23 Sep 2022 02:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbiIWCmU (ORCPT ); Thu, 22 Sep 2022 22:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbiIWCmT (ORCPT ); Thu, 22 Sep 2022 22:42:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0FEE36A5; Thu, 22 Sep 2022 19:42:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D869EB82660; Fri, 23 Sep 2022 02:42:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B513C433D6; Fri, 23 Sep 2022 02:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663900935; bh=xK1LGLizLbDAIkZFj4t4/9Kurql7ZCXl+lWMuoTjlwQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G7pEZmE4wDikVjkCEUFfyOl/SHMgObu4xMzyAr7A7WcDT7Krdf0btw9YTYD4L+nc6 49aBHT7O4bg9D4LpVQTfTj3oMV+2flttx3msOydPgr4+bXpdbUYSJ26lTK4Iqo2yJS 32TZeWAPnBaR6aVHQlxnAQG98405eCO8bJXWpLjp3M40YioeKpOLTu33zo3GTpwPtg 9Dkt0O0p9436N7aqe0CZvQCLwKYH0FAYHOrzhxWS+AaQDCm2mvY2nsHkMCAtlpWh7m Cz5mQea0FszXiWwMWbirmDMS94IoGJXkGCRJbUw4aufm28tLEgxM20cSfKWXtvtRD6 cU5CyhriEbuvw== Date: Thu, 22 Sep 2022 19:42:14 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Xiaoliang Yang , Claudiu Manoil , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 1/2] net: enetc: cache accesses to &priv->si->hw Message-ID: <20220922194214.108f7701@kernel.org> In-Reply-To: <20220921144349.1529150-1-vladimir.oltean@nxp.com> References: <20220921144349.1529150-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 21 Sep 2022 17:43:48 +0300 Vladimir Oltean wrote: > The &priv->si->hw construct dereferences 2 pointers and makes lines > longer than they need to be, in turn making the code harder to read. > > Replace &priv->si->hw accesses with a "hw" variable when there are 2 or > more accesses within a function that dereference this. This includes > loops, since &priv->si->hw is a loop invariant. Could you resend? pw checker could not apply it, it must have depended on the fixes from net.