Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2887205pxy; Mon, 3 May 2021 10:11:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkcvXN401GihcbU+1bXvJ9NJqMCOWg/LLGrBx8npd6MuUEphkq05t0BkKPv7Ldfhv1dV2+ X-Received: by 2002:aa7:87d9:0:b029:28e:af66:d71d with SMTP id i25-20020aa787d90000b029028eaf66d71dmr3726352pfo.28.1620061882204; Mon, 03 May 2021 10:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620061882; cv=none; d=google.com; s=arc-20160816; b=fVjHN12Xi+9ASfCuANuIegh3M3ztxHVyXkGsG0+vZe8bRcjPVnfe9xM82SzpJaUicw x/fct0oW4LysseAjOTI7Nfde03wlc4yyPLG+6mUec1mVpPftKsk5IiOyoygJWU6C5Ctn 0A0QpnKiQ+An7qKbbzzm/P8/tEjHCPSjVv4tnkYOijGFfnsNBHyXvVlikqFDmiiOcGlb +qbbTV/7g5TbOD8Tn5cndeLd9tLPJPnqI3JK7sDG4X+Dt0Qvwr/y2XKkDn2R9ayUfTyk IA7jgVfZc6WTWS1LC720KfRB0HSKcCKw/a7ZYQ8KlTKnTLnOk0nxnIpTHIw5AcQsKpeG BEWw== 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=ZRJSkdix441Xp00IrKIA4I21HvP/GEJFqEqCkMHKApE=; b=NHRRYYWHYuRcU4/51gKFd/hx1WW6vTkxmUpwAIA9o5wOMFkMrE0qz3mRbFTzHaiXFh BC4o1nLgtE9ZVcicSD5Y2WVvAx0JDUvhFdhRLCoaw7w5blUbMV9EzBB1Vvrabr9qZ9o+ wI+uAARSl4CGri+UnPm0vSs4uNfeo6JjOpxg3Mp+zKBeDBZ6dwaOWnum1/VzriICSgjp L26rRkYORmhM6N5AwR65n0+O+zLcW9rqxhgCVOes1JQ3CXlpsjp8hHVAMkDGWHbZKIht EEtAR2UbuH8sGddagmMzR5nKdoXHXYcYIQ+Obx+UfNEhCwm/3gZamCzUrKPlRyGcnKwZ 0sew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HA3aXBnB; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si275895plo.244.2021.05.03.10.11.09; Mon, 03 May 2021 10:11:22 -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=@linuxfoundation.org header.s=korg header.b=HA3aXBnB; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234090AbhECRIX (ORCPT + 99 others); Mon, 3 May 2021 13:08:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:43314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234113AbhECQ5V (ORCPT ); Mon, 3 May 2021 12:57:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C91F611CE; Mon, 3 May 2021 16:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620060483; bh=pqQt+ufivPLeHfDzgYO6blIaZRqsbQC3VMEA9EWcKbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HA3aXBnB3YjQaRuuC/hNpBOfQg7bHvFYdroZGq16La6nfkXDpDT6ewCPdFY2c5k/p RvLM5w1IDKInW5dbmiKtBAE+/rhbRDvf2SyMeKK73r8uPc3VI9aps74d8U7fbnmtle B6tvGcFvuKtWyJ8FoPDtAu2ZNpZwsIAzxZFeCpE0= Date: Mon, 3 May 2021 18:48:01 +0200 From: Greg Kroah-Hartman To: Guenter Roeck Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: Use list iterators and helpers Message-ID: References: <20210428173301.149619-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210428173301.149619-1-linux@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 10:33:01AM -0700, Guenter Roeck wrote: > diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c > index 85663182b388..9cb2c7a112d2 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c > +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c > @@ -124,11 +124,8 @@ void kfree_all_stainfo(struct sta_priv *pstapriv) > spin_lock_bh(&pstapriv->sta_hash_lock); > > phead = get_list_head(&pstapriv->free_sta_queue); > - plist = get_next(phead); > - > - while (phead != plist) { > - psta = container_of(plist, struct sta_info, list); > - plist = get_next(plist); > + list_for_each(plist, phead) { > + psta = list_entry(plist, struct sta_info, list); > } > > spin_unlock_bh(&pstapriv->sta_hash_lock); This chunk didn't apply to my tree as someone else cleaned something in this function. But that doesn't even really matter as this function does nothing at all! So I'll just leave it alone, and apply the patch without this chunk. crazy code... greg k-h