Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp804846pxb; Thu, 17 Feb 2022 15:22:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMOIqOrRvoowl5SXAQY0o3iqeeqPV8U9DLYibZuWkzI5zU2gc1sKNxj1s+fxAuyYLyr0J9 X-Received: by 2002:a63:6cc2:0:b0:373:6dfb:297 with SMTP id h185-20020a636cc2000000b003736dfb0297mr4207997pgc.1.1645140147587; Thu, 17 Feb 2022 15:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645140147; cv=none; d=google.com; s=arc-20160816; b=tWyiMfUYChiEsRAIyGvQQ5Gz0FgH4cy0NPrSS7j3FuJeiXHMGWIw7/0pqqBAviMYF7 hSc21ctSlVj43wP6z+CRgOmH7HbE1SxIyCRmdwi2qTqwgy3Y/RwOvQK9xfnDWuj9RYxv p1MnDSiASVZ7JzN22B/vkiLGcQiBgjx5msrL/lid/rTi4+qPEGmM9FuSQceXrxRNlih2 CPGmuGpVCZkGoYxOJDIdS85NyltmO5shXK+tARz5QGKlt6u4u288mqjPKpeq8akUdFTA 6tZgJL4UsCjxAQbA1MWaHQd+Oc2P2ip4KbbsX//iLhviju7nfgCZbGNYA1M+m0rPKxAi yFOw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9GeIjFGNQlPHjVyxQ9p3WniDxYBdTULWXBibB0Q7WqU=; b=j0DQ05CzbHdPDn/Rz9S3MjJgmRRZfOZtw6IqMjJnPv+rBwmfNfVpRFODjn+uOU/hHm P+BLefY4ja8uaVIOZgA/GVajBDwefhHTdgLb0dKwNWjTlblQUFFT+8R4yJYZ24KbUX0/ bUdwlgH5+k9hwvqSyekvpRxReY50u7Z0w9R4uhh6Dv5Gt7JUOJi+61kOyZdMTOJeDqTs RKFXozBcZY/R0Ze5W5BpV54x9XdB78NXkjC2dHAvCSH/5nudQ8SZYN0P2l4ODtsb7GhO XrpPzZT9ZBp6gnOWHDzdTq1w1KCnGXLyjqe6adsHdAcfHBwFLBd5PxQc5QZJs/pg4gZu ijDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="AT/d0bDa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j125si1067892pfd.42.2022.02.17.15.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:22:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="AT/d0bDa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 32DCA3B29B; Thu, 17 Feb 2022 15:08:17 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244812AbiBQSuu (ORCPT + 99 others); Thu, 17 Feb 2022 13:50:50 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244661AbiBQSu0 (ORCPT ); Thu, 17 Feb 2022 13:50:26 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33797532E8; Thu, 17 Feb 2022 10:50:10 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id hw13so9371183ejc.9; Thu, 17 Feb 2022 10:50:10 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=9GeIjFGNQlPHjVyxQ9p3WniDxYBdTULWXBibB0Q7WqU=; b=AT/d0bDaXwtZUv7jKZa/T/kHh8PiMCYDol1M3oUDLpiPOrdMfuKNcAaeyYOM4FOEDf GUPNBXssMOCFu7E1YMimiFFyCBECoRonkTXSm0OEjHiSAq00kFr7fuQgpWsdVWM6bqAj pDty8X5XIYiHt1VIXXkhq5giWimZ6IG71n9/9Fn/42JUXQIBj1vJ5R023OqxSadstq/2 NfwdgdIq2mFCEWH6AnX0S1rr9PS3Fk5FNJ42bjX9ahNZct4ir37/PSwXnYaAomg6hDjI 2/5s5iNRIbn4btEc2OhD4CmzrblK0tf/jxPq+vK2saGrpMUCPr9fWmIVNy+7u3YVHKQr SlVQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9GeIjFGNQlPHjVyxQ9p3WniDxYBdTULWXBibB0Q7WqU=; b=lGTvUoaxv3Zwrz0FtPf8IgHoy/iHXAFx+KFrvMWFppF9amoL+/v6iTOjUjgXl+bdNM /zeWgI9AMLFEL07R8yx5x2WJjL0WEk9YcuAObdJCXxJxcoJ2iSRUFwlqdnOGRtDdzBIm NibDDeDBmkHsRBGYHrzPeEeam3km5b86pXPCFmO8BMK7ZZl71VbErIZAVL+gGz/yGPMr a6UMLrpOOvIC7rhU30VlnxQn72OJlZkTq5dmOZWbfF2GxlYCSVpYKri0TVuuEIHwJgWp 7XWgj0VFXqBYoR46Ld2eZdhT2UAMhcI6iGAJuS7Wf1Z2Bi+MVMbXPFMpXlc4u29Flsyg gJSQ== X-Gm-Message-State: AOAM5327cEnJ3tJx4QvUcM4+9G8khdhoCJvk4Db/0bel7B494IDIAlxp VeNPBX3Ir6i2KAT0XmhQ154= X-Received: by 2002:a17:906:805:b0:6ce:41a8:113 with SMTP id e5-20020a170906080500b006ce41a80113mr3507086ejd.366.1645123808806; Thu, 17 Feb 2022 10:50:08 -0800 (PST) Received: from localhost.localdomain (dhcp-077-250-038-153.chello.nl. [77.250.38.153]) by smtp.googlemail.com with ESMTPSA id q7sm3493268edv.93.2022.02.17.10.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 10:50:08 -0800 (PST) From: Jakob Koschel To: Linus Torvalds , linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, Greg Kroah-Hartman , Thomas Gleixner , Arnd Bergman , Andy Shevchenko , Andrew Morton , Kees Cook , Mike Rapoport , "Gustavo A. R. Silva" , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." , Jakob Koschel Subject: [RFC PATCH 11/13] ath6kl: remove use of list iterator after the loop Date: Thu, 17 Feb 2022 19:48:27 +0100 Message-Id: <20220217184829.1991035-12-jakobkoschel@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217184829.1991035-1-jakobkoschel@gmail.com> References: <20220217184829.1991035-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Since the list iteration cannot abort early, cur_ep_dist->list will always reference to ep_list and can therefore be replaced. Signed-off-by: Jakob Koschel --- drivers/net/wireless/ath/ath6kl/htc_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index e3874421c4c0..cf5b05860799 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -104,7 +104,7 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info, * it use list_for_each_entry_reverse to walk around the whole ep list. * Therefore assign this lowestpri_ep_dist after walk around the ep_list */ - cred_info->lowestpri_ep_dist = cur_ep_dist->list; + cred_info->lowestpri_ep_dist = *ep_list; WARN_ON(cred_info->cur_free_credits <= 0); -- 2.25.1