Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp87447ybk; Fri, 8 May 2020 19:35:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKkHSDqGIwtihTbH2zhGIFrKifnfm0uN3Frd88NUyuuqLbfvattqPjHTb/73yapaG0ly03C X-Received: by 2002:a17:907:43bf:: with SMTP id ok23mr197282ejb.68.1588991733592; Fri, 08 May 2020 19:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588991733; cv=none; d=google.com; s=arc-20160816; b=eLqZAPFcLtJdLnpDWvl/+mQEwGPoq8BB2TEP6kFcEHBuQrXOuLfNldcgcLsiD6KigE tYG94FiKY8ZEt5wX3sU6/J71ZvgGgqJQVBkLb2z3rggsrl5905yIIJaTYGJv36mGnP+H 8R7xdjlG0+HezLxbqD7zvyItwHtp7EWvg1t0sNbJbrxveYu2ks/jV1WL3YAXgcVk+eNm argu2H4GHr1mbCg2SKwbT4xdQrY5TXFqC4mz3aH7lG8jfVei6oiE04eNO/NdvvuzomZL Um/HFSbFZdUIDpMCIWGTR2nRYqaYYNTkREhD28tp7wd9a/48XKHPSLBgoXEq+UQQYv8S aGeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=6Y+6kb33anA4YPbxrXbwhMbVrfRu2NqNpzbLurWdKZU=; b=pFaoOfDGslXKtSpSr17uLsYkt/tw9kk7Hc0zJcoiR0QBmVE6e63xhSlBLRoywafxOW c/nT+PJgSClXjC4x0nu3jCxz8r2RgDpfuNVrFxSf5kiMz5ejDhVMa+yjZW2cEPnfZxHd vU6WAYC5uqEMsc0ha3HLA+ACqsPi8cV8xFiAaHCZ6H5tVbBWDWxK/pJ4jsAAKwDkko1/ wXTNlY7OGE/ETJZWyYHpdHxxk9J2Z4df1U0KlsZoLtd5B/SyngyCBQoPHd7wRvG4P/v3 uFKtIv5WPVu5b34pirGI7kGJW0vw2kb1XYQ1Y9eW6e6nKiOVuvTBVJLUVl4P89IwpGT/ jtKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si2235243edf.133.2020.05.08.19.35.10; Fri, 08 May 2020 19:35:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728668AbgEICbw (ORCPT + 99 others); Fri, 8 May 2020 22:31:52 -0400 Received: from smtprelay0160.hostedemail.com ([216.40.44.160]:58544 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728353AbgEICbw (ORCPT ); Fri, 8 May 2020 22:31:52 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 105B4180A733F; Sat, 9 May 2020 02:31:51 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3866:3867:3868:3872:3873:4321:5007:7809:9010:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12297:12438:12740:12760:12895:13069:13311:13357:13439:13891:14096:14097:14181:14659:14721:21080:21324:21451:21627:21740:30054:30064:30083:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: pan63_4a25c479b7e55 X-Filterd-Recvd-Size: 2571 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA; Sat, 9 May 2020 02:31:49 +0000 (UTC) Message-ID: Subject: Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply From: Joe Perches To: Jakub Kicinski , Colin Ian King Cc: Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , "David S . Miller" , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 08 May 2020 19:31:48 -0700 In-Reply-To: <20200508184814.45e10c12@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> References: <20200508225301.484094-1-colin.king@canonical.com> <1890306fc8c9306abe11186d419d84f784ee6144.camel@perches.com> <160ce1ee-3bb5-3357-64f3-e5dea8c0538d@canonical.com> <20200508184814.45e10c12@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-05-08 at 18:48 -0700, Jakub Kicinski wrote: > On Sat, 9 May 2020 00:31:03 +0100 Colin Ian King wrote: > > > My preference would be for > > > > > > { > > > int i; > > > u32 off = 0; > > > > > > for (i = 0; i < TG3_SD_NUM_RECS; i++) { > > > tg3_ape_scratchpad_read(tp, (u32 *)ocir, off, TC3_OCIR_LEN); > > > > > > if (ocir->signature != TG3_OCIR_SIG_MAGIC || > > > !(ocir->version_flags & TG3_OCIR_FLAG_ACTIVE)) > > > memset(ocir, 0, TG3_OCIR_LEN); > > > > > > off += TG3_OCIR_LEN; > > > ocir++; > > > } > > > > > OK, I'll send a V3 tomorrow. > > I already reviewed and applied v2, just waiting for builds to finish, > let's leave it. I think clarity should be preferred. Are you a maintainer of this file? $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/broadcom/tg3.c Siva Reddy Kallam (supporter:BROADCOM TG3 GIGABIT ETHERNET DRIVER) Prashant Sreedharan (supporter:BROADCOM TG3 GIGABIT ETHERNET DRIVER) Michael Chan (supporter:BROADCOM TG3 GIGABIT ETHERNET DRIVER) "David S. Miller" (odd fixer:NETWORKING DRIVERS) netdev@vger.kernel.org (open list:BROADCOM TG3 GIGABIT ETHERNET DRIVER) linux-kernel@vger.kernel.org (open list)