From patchwork Mon Jan 23 20:53:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 47384 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1811122wrn; Mon, 23 Jan 2023 12:56:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXunbVHCjNhqrpeAzkwH5RuKjgkZOsmuFGlsXjE24aeS5RspOWQn/O0V8SIoHHhSMhc+QdqV X-Received: by 2002:a17:907:8999:b0:877:83ea:2bfc with SMTP id rr25-20020a170907899900b0087783ea2bfcmr16825399ejc.39.1674507391627; Mon, 23 Jan 2023 12:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674507391; cv=none; d=google.com; s=arc-20160816; b=B5/oqDSXmMQRwPEKtv24Csbxv6n6Rhj1tuJlzVe2ZjLK2R6bqs+IyN/Y8s7864LA8c 2VgH+MmBaKkLrjWrlHOC9v8YTAFmIlZ3tuq8P8IN9WUHX1vlknMz9u9IuhNruU/PY0S0 EFG5OLLlwRQ1uiOIsmYmRFd8/UCxPV+YBawAq91THOijuk32MaewYrux6fTr4cfiONv/ cNi0s79AvIqE/8pMbriRtV78+FpENmdYy9AWub7m2Il6xT6Pu5jbLsQ+pKpmckT4kekj dDA7js4IDKqE1zTvwAapgGvFigaR9bjL2oMVhMgEkJ6Ml3/QqRWMR7tAOMs1PLX1Wlj2 GJXQ== 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; bh=k0Nf1olp4DOhR/StLmx7p6i44RaXwagNYBeOjioqddI=; b=B7SQ0tg1Hx9X17BUX5/rAMEvatmyeRju636erGxwMChcx3pw8+/ifApZZsymeF4x73 SOHwczsiu//7bVlpbz5Gj0TchJ0VBUCtqWw/xCCHtmhYMWbWnxvXf56wIAYUilTdwle2 7t0c6jxB5swMrii5ejvioeBm/o7AvBTw2uyxwpanSHJJLWAlh52epQT1q2oFnSsTXC6f pM6FzI2/IbN3wvX09LIZlvxBcTqAxYhco/azYPdbQXwUbT6F/UUdDyJxeq6Q1cBhGTMC 97dC+hPqD4MFxRnKV5JAXv1uHJjxHPYYbjekG7McLuHQ1GJhrBWi3PtVIK5ZsIEE8HSJ WFGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a17090658c600b007abafd4d7d0si60868619ejs.702.2023.01.23.12.56.07; Mon, 23 Jan 2023 12:56:31 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232338AbjAWUyf (ORCPT + 99 others); Mon, 23 Jan 2023 15:54:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231915AbjAWUyP (ORCPT ); Mon, 23 Jan 2023 15:54:15 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1CC38026 for ; Mon, 23 Jan 2023 12:54:12 -0800 (PST) Received: from ipservice-092-217-089-134.092.217.pools.vodafone-ip.de ([92.217.89.134] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pK3pL-0000Lk-7w; Mon, 23 Jan 2023 21:54:03 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 10/23] staging: r8188eu: use list_empty Date: Mon, 23 Jan 2023 21:53:29 +0100 Message-Id: <20230123205342.229589-11-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx> References: <20230123205342.229589-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1755848262683163230?= X-GMAIL-MSGID: =?utf-8?q?1755848262683163230?= Use list_empty to check for an empty list instead of coding the check manually. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 943e7a56f7ce..334d75214011 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1363,7 +1363,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct tx_servq *ptxservq, struc xmitframe_phead = get_list_head(pframe_queue); xmitframe_plist = xmitframe_phead->next; - if (xmitframe_phead != xmitframe_plist) { + if (!list_empty(xmitframe_phead)) { pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); list_del_init(&pxmitframe->list); ptxservq->qcnt--;