From patchwork Sat Dec 4 14:00:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12694770 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06F1EC433EF for ; Sat, 4 Dec 2021 14:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kSM5buADB9DIgAZ2sZ0oUIe0UFEwa7ri5/rL9lxhSu8=; b=T9MeXU3ywvUogW wjqJxWKnmtQwt+CBJsuJcwWc04OHJBdQWr6ZXNBhJb7xcu6Vd1e8GclbCEY5jyiH2pyzuz8e4zOoM 7bOfY+NkVgPxDpOxdIMc89pNthns7HV5UZuAJjkqExtP0YFEKdjqdhivCVVoJ6TlNQoJq0i2FOE9t MUQcitVhcbECALRZtTpcBL6suG8namSI/U+SGD3eMeYj4+Vy1f+d/NVyXzuC4ar+Qu0xZCihuqQIq wuL66XDrCdzifY33PEJ2sNk496Uc3BcT6LUJdSAhmzaWTC5+wxC8uEcsjYQwMpjNDYQrSHs+kc5bq rH9si1fUaaJXYxn3JI0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtVal-000NtT-Hz; Sat, 04 Dec 2021 14:00:43 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtVah-000Nst-Hp for linux-arm-kernel@lists.infradead.org; Sat, 04 Dec 2021 14:00:40 +0000 Received: by mail-wr1-x431.google.com with SMTP id q3so12002154wru.5 for ; Sat, 04 Dec 2021 06:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jRydfW5dCvLP5M5W9G1L390OMoiuU4elPL4v0ocR8GI=; b=KfBlGlO8ievFtXcZ7gIBb6tFFJy1t6XUKHG/+LBpAlwkhYzMt4QygssKPV4cSEp9wr l8v7mvBYvpnvaoybP7iEBDWWBLj88MUDWtLVwWwcQ7bogU9kgBUFI+blguQoahyTJdwg 74Gf23L4aIFOZuTq/B+31fc5qrMC4ihUcVyeuE/krOPX/sNL4KgOw1+Dy2+jbc3ejX9W ogG1Pj0IrNllvaQB8qIU71LDG/R5LJUxrM3yy7eSbTDwOfk6v3qzNT1X6hgSyftXnqDt uqwFaxyaHDbfstTuvUmfoAuxpljnwINbegY+dUs/3NQq5sdMdYBF7MhdfyWTzHX8G7Wm Yllw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jRydfW5dCvLP5M5W9G1L390OMoiuU4elPL4v0ocR8GI=; b=QTtUnm/OvHj7n71/Vol0hTvJMG7VVkwGfrM/XW9fgOqTayreDsFPm/hypiTRGelRJH wJzKOwELU71BZbJ8DmfnlnskI9lJhubi5fXnIW3mpAA4De/s6omOG+2PbcZ2oF33GUcY RItBM8yt1qDDU5U1cb0K4MkQnnNEuhOOSnpjyuSzt259PMzLhF5Icndgct73wWKgtbGh pNXkiPBjRwH7HsKtO7kIzJtALCBgeTc2sAeUl+szGmoaka1kQvlJUNvskFRT9+98ccYX 9xvusfkUZ5Gqj88+abAgaDHTN6XtIs6bEcgpSo52pAV3qZwRELye90+m45egbNgctza3 gBrw== X-Gm-Message-State: AOAM533BmmHvVHcDRceOLVdt6mE0a4FrpHqHV9DRCnBTHgVGMBIoJIdw hfWPtOd0iw2bGIoi7VRWWXU= X-Google-Smtp-Source: ABdhPJyp7Kwzh+WrHOuorXsYydzGifWlvVI1GsnYoZkSBQZorTbVIt+cVUlpC6Lv0Xx65iNRHim+7g== X-Received: by 2002:a05:6000:15c1:: with SMTP id y1mr31001064wry.63.1638626434368; Sat, 04 Dec 2021 06:00:34 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id i7sm5593646wro.58.2021.12.04.06.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 06:00:33 -0800 (PST) From: Colin Ian King To: Vinod Koul , Maxime Coquelin , Alexandre Torgue , dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: stm32-mdma: Remove redundant initialization of pointer hwdesc Date: Sat, 4 Dec 2021 14:00:32 +0000 Message-Id: <20211204140032.548066-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211204_060039_632656_374C0AC4 X-CRM114-Status: GOOD ( 12.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The pointer hwdesc is being initialized with a value that is never read, it is being updated later in a for-loop. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Reviewed-by: Amelie Delaunay --- drivers/dma/stm32-mdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index d30a4a28d3bf..805a449ff301 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -1279,7 +1279,7 @@ static size_t stm32_mdma_desc_residue(struct stm32_mdma_chan *chan, u32 curr_hwdesc) { struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan); - struct stm32_mdma_hwdesc *hwdesc = desc->node[0].hwdesc; + struct stm32_mdma_hwdesc *hwdesc; u32 cbndtr, residue, modulo, burst_size; int i;