Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp556397ybb; Fri, 3 Apr 2020 07:48:04 -0700 (PDT) X-Google-Smtp-Source: APiQypJW1sF11ycQsvogjxRamYftLuihXrfxUK6KVMSL6Vmb4/Rh6evhWh62iay7IGi6vw44E0Dl X-Received: by 2002:a9d:6452:: with SMTP id m18mr6638842otl.51.1585925284496; Fri, 03 Apr 2020 07:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585925284; cv=none; d=google.com; s=arc-20160816; b=IK0X5v4Iwy79Nad/BkWngGB8Z2ftqUO/cCtuaymbe563Hxtum4u8gtv9OD3tLCl2BA NQV4w6euVulRSLaz5gkBHk27aEvhE3f8fqBzaP2SDG2BV9Hk5lM5Ut1H2oLZA51YoFLI LqfgEsqWxo7QlWtVfdadu+cfreqOpX96A+QF+njCnhwf/QuwKZ/IEjQ4PLAQmRoZQQxZ KZVB9jYymCI+7XAu829xStvDd1QcNReFB8WfAmfjirw7fNEOGtwhVVHKwm/uf0wz9THw Yy8g+p2Fnelhuu1Z/UR+AKVd9+0VcOmZnNdUyg1rVGHtGPDtELL0v6wtqKRWOD+imZLq yN5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Z+9t8TVhcuRAxEqo0k+4IL+Ja/sDsNAxc03/O1ePTr8=; b=kRHc9k9AO7zwjs6VyJxcoGdTl7f/bzirqkAi2rHEUT24hdjkZzpQWDqsHxUNlCTtoK 1QHyR3N52KB40RvUvMPEXQfKWSSmDe/Mt6jAzu393cV+wMMWP51Oa3UQE+YNmjCAIenL oVoDiRRmTEt7H2Ff4w5ZqU1Tkl5gIGYygVjP0xGjlRuQzO5zQfnNn0NLlpAjSBYNOcdN Fx2E0q01U/MQ0IdGPO944hyIHmJttqQdXI1rKKsRZ25AfIxOQs/tU5+psKlpC0lfUdgC U2etp0D/wsbkRCHVCrMgN59N+VZY9g9D1EdxzR4eJJmeAGGJmpCes6uNKTGHyuL/ideU JVXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OXv7AzKt; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si3628977oib.258.2020.04.03.07.47.51; Fri, 03 Apr 2020 07:48:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OXv7AzKt; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 S2403948AbgDCOqe (ORCPT + 99 others); Fri, 3 Apr 2020 10:46:34 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:36207 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727431AbgDCOqe (ORCPT ); Fri, 3 Apr 2020 10:46:34 -0400 Received: by mail-oi1-f195.google.com with SMTP id k18so6315940oib.3 for ; Fri, 03 Apr 2020 07:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z+9t8TVhcuRAxEqo0k+4IL+Ja/sDsNAxc03/O1ePTr8=; b=OXv7AzKtQINMHqZzyeIcbAQxl9kSIhA/MC5c4NTf5TirJXYuX8zQtzBf4bGJMbMMWO Oo5MafNJhGJd+heLaSGFw1h0+jwBODEJ0oz4RzMJWEma6+Y9Wi3Y0lDZxEF4RYiRPeG2 glOMO4P2Jw5U4AZKmMszdIMXSdKSnG5oLY7BZBHxrSA3VDkwwZcGLzYBYbotYdTdyr2l feUDxEubZNwjUKzPxI9UqRYOyoC4iD/LXjuU87cS918AB8ay0+vu7c3/onrs+7VUjwFI tjrXXiww/iuhpM7HcVgyQvonQLtvEeq1hKYmyJT9t4+xxVG4DSUdZPvy/j0YdyrlSKFd eJlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z+9t8TVhcuRAxEqo0k+4IL+Ja/sDsNAxc03/O1ePTr8=; b=ssL+38xy0NwPYwvj/Mel12wK9yutyjp7QFEJ8RIDmF+7UeEuB4oCziAjW525Y5UcFJ C7pJOpzY1FBVKvOZqxscQS1kE+NuZCEg57nT1EoSkL2WvE/LLm/c4IQWiYChH0D/eNFO SBTqzcJuwkehgUTll1RmI/h+fCJEdQzwhj/NF9syuijYz9i/rBVi9H+8PY6YfTm9Ax1e T5hUpP5licPqZ1kaJuEUx6Mc0MN/gr+5BHmA09rjk0f0lRRejKlrusXdPsPza2M7RD5Y OzW+tp0QwzeSq3HlOgFSercruyH6dBUpgBNUZXOmVwgEjgnUH4rS4Vys9rYdf1WamUgh UPdw== X-Gm-Message-State: AGi0PuaHVXTvgI5UPPcxVNsieGUfJtoRXNzCNleGjHab9fxYpTkxCuJe 9ICzh51pF/LRKFZx69GZZEMBvAjW/I+hFBV+cm8= X-Received: by 2002:a54:4e0e:: with SMTP id a14mr3350237oiy.88.1585925192212; Fri, 03 Apr 2020 07:46:32 -0700 (PDT) MIME-Version: 1.0 References: <20200403082955.1126339-1-luca@coelho.fi> In-Reply-To: From: Mark Asselstine Date: Fri, 3 Apr 2020 10:46:21 -0400 Message-ID: Subject: Re: [PATCH v5.7 7/8] iwlwifi: mvm: fix inactive TID removal return value usage To: Luca Coelho Cc: kvalo@codeaurora.org, linux-wireless Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Apr 3, 2020 at 4:31 AM Luca Coelho wrote: > > From: Johannes Berg I sent Johannes part of this fix weeks ago and heard nothing back. I am far from a glory hound but something is wrong with this list if fixes are sat on for weeks and then the fix shows up with any acknowledgment lost. At minimum a note saying that a fix existed and would be merged shortly would have been nice. Mark > > The function iwl_mvm_remove_inactive_tids() returns bool, so we > should just check "if (ret)", not "if (ret >= 0)" (which would > do nothing useful here). We obviously therefore cannot use the > return value of the function for the free_queue, we need to use > the queue (i) we're currently dealing with instead. > > Cc: stable@vger.kernel.org # v5.4+ > Signed-off-by: Johannes Berg > Signed-off-by: Luca Coelho > --- > drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c > index 251d6fbb1da5..56ae72debb96 100644 > --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c > @@ -1169,9 +1169,9 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta) > inactive_tid_bitmap, > &unshare_queues, > &changetid_queues); > - if (ret >= 0 && free_queue < 0) { > + if (ret && free_queue < 0) { > queue_owner = sta; > - free_queue = ret; > + free_queue = i; > } > /* only unlock sta lock - we still need the queue info lock */ > spin_unlock_bh(&mvmsta->lock); > -- > 2.25.1 >