From patchwork Mon Oct 24 13:43:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 9569 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp527299wru; Mon, 24 Oct 2022 09:00:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Oc9lIX1AodolZcxl/dqHNm7y7cRedNFCuVFodULv9mZruFgjHWz99y3VrGYI4hK5IHQ3+ X-Received: by 2002:a63:c142:0:b0:43c:9fcc:c9f2 with SMTP id p2-20020a63c142000000b0043c9fccc9f2mr28452945pgi.44.1666627238411; Mon, 24 Oct 2022 09:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627238; cv=none; d=google.com; s=arc-20160816; b=Q+wjDlrb0YhWs+/+c3Y/O69vfyCVZsfHx0GW25+w73N7rTMInu3JE1WrBloxaV79nC Jsw0qtf0tIHWJwqatTkR0idrfdvg9uxGrzcj/t853HwTMWPUj/H57soUPPDPHAU7KqOh rMrnKlsICd62OKTQLrYTBxnkvqgVaiu33gyv6ZrQXA3+sQHJMBdUxxEQEjuF7OSmOtIL A76KM1xt59ttujmgVlVHdRj0dxnf06bHfxMNSYuXGNWLFgzudyBkA5IqHGFk5edcRlPv GmIW+dEYqa76Ci0rWk6c6uoG9KTIdI2Q4yZ/hMga7gCsSIcQCnvtHr2wMG67HpjbIWGB CzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aRj1cqu6ZDGIi0GvzZmHfr4LAYPZfxkfNSfRcqY4dyA=; b=ScAGixHW0tZCVU7U3Xb5axNawLNF8GmI+7qvT5d78zKoKS3OYjXh9zqhgvF9WQ7AJr QZ/MmTeDX5FbQ4HcyLKgE2/J7mo+T+qa3bKYgArDb3+82aIOS0kfo5J+gprJS3vBmuEM 3amnh2nAk9VECbwiKvnauZ9VvO/18QU/7Lo6O6B4qZeOTp/lLAhtfFqM6ebrgbjxRhiL 3rGR/kOMDHo2GvNfr3k2/wX9B+4K445XUZV8c0OkqQq17Lj0yg9qxOfTYH4Q11tzW2AL iEPD5jW6EQyzWqG190j7eR7Ig/AZdq/SC0kKOPf7OzxJxk4/5tA/Lsy0LhTSrU6D9jJI gvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NHcjGBQp; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a17090a8a0b00b002130c156ee5si231071pjn.152.2022.10.24.09.00.15; Mon, 24 Oct 2022 09:00:38 -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=@gmail.com header.s=20210112 header.b=NHcjGBQp; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231721AbiJXPvd (ORCPT + 99 others); Mon, 24 Oct 2022 11:51:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231500AbiJXPvM (ORCPT ); Mon, 24 Oct 2022 11:51:12 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 509FE8768F; Mon, 24 Oct 2022 07:45:22 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id l32so6730453wms.2; Mon, 24 Oct 2022 07:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aRj1cqu6ZDGIi0GvzZmHfr4LAYPZfxkfNSfRcqY4dyA=; b=NHcjGBQp4SKHvwjl+StT6XdDtmgvDaf23lrNvgs4/Cn8kibjjcgons46bofssI5bg4 x7sOB1WLbd3o0NjfwMBtCYpcl/hI5sN6jcnbygYLyY4nZeFKxt3NxFweiGXKUXvnr1QR FmPNn2XpFYKJeHOEQXVAZ3BRqh4XFT2uj8wVsagBC+LWXhp36OaEHB65n2BUSy2iIf1T hNyyJ4vwX1dW3B5s6wCpTLxfN9oVWOFAKJQM7cedbgX45oZAgU1PV5CKh2zOp/JbXTLn YlpbSPvfA+k1z/qm2zNxIbLPwqfpimplvFzS5aFy7CC8xD9e22k/sqviP086EXl2i2e8 DjiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aRj1cqu6ZDGIi0GvzZmHfr4LAYPZfxkfNSfRcqY4dyA=; b=h+MWchCLzz52wuRY8/+qaYVwYPtliixEuvzQFbqMiQTrRlJkKP195FflvVCxTXj01W SffZW+tvDXb861VDtA4/6ztoX1AGpPT4kje3FF5qMwNhCNJht7dS9s0AsBDhSu+7mTeB ZFDyL5DIlzij9TpqkF1cpCswcx+siQIVPKJjhl1lUATtDaFG2YNTIGqaaazCEgqZi4fV HOSKC96wpIxTQ/otxOVV+xV/bG1/ubNpuDjMaZVDPzlXdj+8bKrsMNaf34y8lDZUhIyh fHeT5tmPbzKiXLXx0dxHPfRx8yuxLQRiogBTko88f0KkPV8761qHFf27u0bRl0x/5okt giNQ== X-Gm-Message-State: ACrzQf02RfQ3GFPlHeNM/xtw9/0wf4jgylo8l3yk/1lCVfYz/Px4W2OI 0nOeGh8TTw88ccQuFgSmKBkOIoXUtB8trDHb X-Received: by 2002:a05:600c:35c4:b0:3c7:1831:6d8f with SMTP id r4-20020a05600c35c400b003c718316d8fmr12816588wmq.48.1666618982676; Mon, 24 Oct 2022 06:43:02 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id j18-20020adff552000000b002365730eae8sm8912690wrp.55.2022.10.24.06.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:43:02 -0700 (PDT) From: Colin Ian King To: Joerg Roedel , Suravee Suthikulpanit , Will Deacon , Robin Murphy , iommu@lists.linux.dev Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: remove variable cnt Date: Mon, 24 Oct 2022 14:43:01 +0100 Message-Id: <20221024134301.2158939-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747585323261132868?= X-GMAIL-MSGID: =?utf-8?q?1747585323261132868?= 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 Reviewed-by: Jerry Snitselaar Reviewed-by: Vasant Hegde --- 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;