Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7600132rwi; Mon, 24 Oct 2022 17:27:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5L7zLqjZMBX4LroUZrcDfcClcGuYrpC+OZhdHltzddlqf2842g4lWHp4ovi5URO5+9UZx6 X-Received: by 2002:a17:907:9627:b0:78d:a7d8:9407 with SMTP id gb39-20020a170907962700b0078da7d89407mr29754553ejc.675.1666657631396; Mon, 24 Oct 2022 17:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666657631; cv=none; d=google.com; s=arc-20160816; b=SIyZsvF2USXyDNH+QyAkv87CY0cpNskaMx0FHM1rRAaM7gGBGb2g+VQguWIlZfZlbB u5cntF9y2rC+gPDfFXCajocmaUYD6Xd8GSvrRO25lzh771aChJJL7Vr1Fhrk5AB7rZhn mDcTfQzqz9yswUx3YmDG20WhkHr2lyvOGodjuhDJaJwfh3G2hhyKcdAM2yxi6bF9et43 +biGHnicApE7M/l7DnG1NlP7KdwgUZiij5zp6Fw2YtX4KzST1SBvTyqKW5Q7y9VqFkOL 7bgjSLKf8X5QUp7esylIIozS+Iv98ShiTe/9u0oioxzUaBaIbbqAGjhmjoJqEPokQtlY QlVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jS77JQI+Wqma8EkspvaV6jJPvhgOIi/g9VzirTrOEUM=; b=orYXy5bdj5wj7U+d+Cpr40/PN4vMYdxPfMOylOAJQ0gw6lcNcSSYB3RmmKRi4O32Qv 974GC2Sh9pMo91AbRVkXIH3eQnk+iuqtUkNFlPSrkgS7AASQKU8lsGd8XJJyR0UsDNo6 jQq1azLWs5YVtN7SFQ6+355ib9SmxNjghZt4RoiTFn8cxSbVne7SP4btSGag4OoSv2DY U5oo5Cgw8/uvN03YuWBBPU+FAnBubGPUPwK4/zJBjS2gMBVN3WdSOMj/ekocyMMpHG1E c89xCElxGMgI/pIJW9VF0GJB1Gp5rzflf5c+QfbExpBn+QIlIEs2DIwM5q/KRyoVuhql hX8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S3mbuX4g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga15-20020a1709070c0f00b0078db517075fsi1201858ejc.659.2022.10.24.17.26.46; Mon, 24 Oct 2022 17:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S3mbuX4g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230007AbiJXXhh (ORCPT + 99 others); Mon, 24 Oct 2022 19:37:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbiJXXhK (ORCPT ); Mon, 24 Oct 2022 19:37:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D5E2EA0FF for ; Mon, 24 Oct 2022 14:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666648632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jS77JQI+Wqma8EkspvaV6jJPvhgOIi/g9VzirTrOEUM=; b=S3mbuX4gLmENddLmfDXDA4oQzIVUkMFqBvmweMxC3t2D+U6e9BB8wWOyeQIROQd9+Tf5my QfJXpQ6d3xREk9PLNeBdegvlSfIfqNbdRqYDp+Utzx+/vDnjensg1YN8uSwAObbd3XB5uz h6P94eH+zTlrK7wn/29RSVTOcQhBBZk= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-586-40_GtGsrNpWBPLOJEWdK9g-1; Mon, 24 Oct 2022 16:33:45 -0400 X-MC-Unique: 40_GtGsrNpWBPLOJEWdK9g-1 Received: by mail-qt1-f199.google.com with SMTP id c11-20020ac87dcb000000b0039cdb815f3bso7741925qte.4 for ; Mon, 24 Oct 2022 13:33:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jS77JQI+Wqma8EkspvaV6jJPvhgOIi/g9VzirTrOEUM=; b=grFA2uohqLPOeMpS2ZMYk0GcesjsiLVqHj3ciAn+zQTDRGlpOsRLp4BLs1MbzVGFkP VA/vS530hRdr6qsNAIwEPrfjvAoea0u3+tnpG2iqt8vRb81PROjqmrsorkNNBYRNCxgh lMplkbp6DOF+zefWchC/JDPPEjaZobaWGVE/jxryIB/m/HnV3NJaic4Tkp4+KnSEfybf YjWKAG/t13XMvCUAsbUaUuMb8ENzplCMBZBGk9Geky1Vtqxrys7e/D9ymeWSpSYp7DHz DLnYp760TO53HKVh74HGBO1IQTFgCLkCNSPpQ4wMvxb9WTIlJ3cErHUgpbXaBcjz3iai VLJw== X-Gm-Message-State: ACrzQf07iIX8ZsFSQSIlRlLGP+S+nlH20dhFTcZKu6wO9uFq41Ilc5rv 7WOXFe6Br/N9dRoPyJTPOaRc0XxpH2ZKeyFbiKA+lGoRPQdWKrCOXCc618J59vr8/2ewjjJ/Wpw s88IUxuUCqIPdecoKneMHfst6 X-Received: by 2002:a05:620a:4155:b0:6ee:e6b5:efa7 with SMTP id k21-20020a05620a415500b006eee6b5efa7mr24649752qko.54.1666643624566; Mon, 24 Oct 2022 13:33:44 -0700 (PDT) X-Received: by 2002:a05:620a:4155:b0:6ee:e6b5:efa7 with SMTP id k21-20020a05620a415500b006eee6b5efa7mr24649730qko.54.1666643624349; Mon, 24 Oct 2022 13:33:44 -0700 (PDT) Received: from localhost (ip98-179-76-75.ph.ph.cox.net. [98.179.76.75]) by smtp.gmail.com with ESMTPSA id y21-20020a05620a44d500b006eed75805a2sm616099qkp.126.2022.10.24.13.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 13:33:43 -0700 (PDT) Date: Mon, 24 Oct 2022 13:33:42 -0700 From: Jerry Snitselaar To: Colin Ian King Cc: Joerg Roedel , Suravee Suthikulpanit , Will Deacon , Robin Murphy , iommu@lists.linux.dev, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: remove variable cnt Message-ID: <20221024203342.nbmqphmfbrqqtr4n@cantor> References: <20221024134301.2158939-1-colin.i.king@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221024134301.2158939-1-colin.i.king@gmail.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 24, 2022 at 02:43:01PM +0100, Colin Ian King wrote: > Variable cnt is just being incremented and it's never used > anywhere else. The variable and the increment are redundant so > remove it. > > Signed-off-by: Colin Ian King > --- > drivers/iommu/amd/iommu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c > index d3b39d0416fa..3847f3bdc568 100644 > --- a/drivers/iommu/amd/iommu.c > +++ b/drivers/iommu/amd/iommu.c > @@ -767,7 +767,7 @@ EXPORT_SYMBOL(amd_iommu_register_ga_log_notifier); > > static void iommu_poll_ga_log(struct amd_iommu *iommu) > { > - u32 head, tail, cnt = 0; > + u32 head, tail; > > if (iommu->ga_log == NULL) > return; > @@ -780,7 +780,6 @@ static void iommu_poll_ga_log(struct amd_iommu *iommu) > u64 log_entry; > > raw = (u64 *)(iommu->ga_log + head); > - cnt++; > > /* Avoid memcpy function-call overhead */ > log_entry = *raw; > -- > 2.37.3 > Reviewed-by: Jerry Snitselaar