Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp67172ybk; Fri, 8 May 2020 18:49:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIMMpB0F+ewOlnrw3JTCnPcBI39u6O6aF1BwPUtD4NXCLEzSa6O7OLWHMkvGPYIk2ngYGJj X-Received: by 2002:a17:906:1690:: with SMTP id s16mr4051354ejd.339.1588988994880; Fri, 08 May 2020 18:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588988994; cv=none; d=google.com; s=arc-20160816; b=j84XOSlGX2H7xuTUBb0GU75XfCXgqArdFtr+gtpNIGf8F5oDYJHnWj6lue+fKt684F o9y+3KRKm0iC/7S9WT1WAUPkvhn3hIeBypO01FDcgn0U94rRteEk40kH0AxkAbLK50Oq EL9R1eNZoMS77Q0RmEdG4ib4KQS+gZ0O6k9z0D611e9rpcXwv+ehqjJI1zzklS7tDWXb MuquF/C08d91pMgE7Saf7CfvsQEpFrcp9FA5wcKICy+jWVDyNQ/ouVyC4ay2LVQ2ecUq +8EbydAlqdcf+4CH07xjEX7cF+5wQm8fRcB10WB6L6xmeavHsB/I9BhLDVIb47TQ1WFy SOAQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=SR7YXKNWH+Ox2TqnJ8tM5GSCfZAFasJQhN42FpoKBgA=; b=RaEHVzSxQxL25BTm1qOlbrcZFoup0aowacHky4SgSvMRz+pVFWtF09lYMahJkTjCcs 5aP4l2IDBtC6yQyV3xFkmSqV4QpPifEWSxM0jmMtPrF9cH0fvuAUwNtXhNJkwaHZ04bx vrUWcImuDuFYblIiqTbQLCzfoBQzzav5iyG+C677k+XfuSynH0ANCxwM7mznKsFrjzzU a0mqIa288gqyeWbgLkMR3gWfyTtFmU0Duu4o2evtxz/lALm2MA3h/Mft8lLm+2Ih0oxB q7ZVz1F/ICY1ZJWJzz3dpSiTqFTql+96VJ7vSpAh75DJ1fySDAQZUiEgFMMeUCy+5TYv wTdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jyKl7SXR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch10si2008336edb.454.2020.05.08.18.49.32; Fri, 08 May 2020 18:49:54 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jyKl7SXR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728501AbgEIBsQ (ORCPT + 99 others); Fri, 8 May 2020 21:48:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:44444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbgEIBsQ (ORCPT ); Fri, 8 May 2020 21:48:16 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A72CF2184D; Sat, 9 May 2020 01:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588988896; bh=1Yq8ETdj2RiWGbRAmpZXiiimnP7VGCPSm9Ed+hkuj0E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jyKl7SXRcWXWq5imKX647QsE8ox1R/mLLI5pgfKj/GuuF5vNyleinXiN1DB6qZIYs 2hzFd6LWWdZQB/nBLgNKu/4nmDuJmj9WMSakljsOFYZRP7ZGJMhoEf6VNXKgC5T9lS Vm4EQByrNVHtcl4+8DazaV07KTFjEqnXuJq+HTzQ= Date: Fri, 8 May 2020 18:48:14 -0700 From: Jakub Kicinski To: Colin Ian King Cc: Joe Perches , Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , "David S . Miller" , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply Message-ID: <20200508184814.45e10c12@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <160ce1ee-3bb5-3357-64f3-e5dea8c0538d@canonical.com> References: <20200508225301.484094-1-colin.king@canonical.com> <1890306fc8c9306abe11186d419d84f784ee6144.camel@perches.com> <160ce1ee-3bb5-3357-64f3-e5dea8c0538d@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.