From patchwork Mon Jan 23 20:53:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 47389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1811200wrn; Mon, 23 Jan 2023 12:56:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsUxE9pu0NfQPBiIe+jkDRz4EfVYH/nl4NOVtShIHOiDonfYtNSp1m7nyKFIHdsPgUcC7EV X-Received: by 2002:a05:6a21:150d:b0:b9:38e7:8738 with SMTP id nq13-20020a056a21150d00b000b938e78738mr18077911pzb.21.1674507403194; Mon, 23 Jan 2023 12:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674507403; cv=none; d=google.com; s=arc-20160816; b=mqJLFctQa0F7rBW0ilmKtZhV9KDKFFTiiSLQjfB6gDforE8MdQXQM3YHsKf7gZ8ng8 c6QJyU+iTgTc4FYvwd1f46Qdp7+zJQ2VSpdH7VksfTfu7Eo2xONpH60Js/KfFv+v8zWN sAwSKbA18T9cldn5XDrcoGH/u9lQ9qaTHWcDNY+UAETteKUzo5OncQT4gJqT+AZaVeif G/phgIetNdo5GLjf0IkhbbhDlufdjpsYT/Z23YbiNO2LJmtMT1aD9KkDpqqkZl6awSCj plKbGtx0HJga6i2PDBqdGvTZ/PIKqyPHirHLAYKwew8fmHXa5fIWTYfhjDmhbGJft0Jp 08fw== 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=qkTKK8529QWmM6BtfKyu3oDx4iopKOOvU2/2Tt87adE=; b=XX8+BuvJa++1cvr6IyVSL+ODQI/U6tVX2GgvKmilJEUWENadR6sycblJ9QYNJyEuee cvB3oCl6zTofvjsahrLiJmsxZm1tqlkDET8lit8Zw8dyCKrmzSZNZqA0z7AnoZqlfey1 teGvkDq5dahImSvvflJqqrIbZJkJ8Et/B3e4xSUqH9r899WiIgBtIOA1ky5XODyCfJGB pfuGjn74AneLQUNnCH5Nd+H2PpZ7yr8gfhaOQ54KjtVT/wjDc9oUw9grCeVaFWctXsDF HgpuyVsWdd5E7kq9Nz7g8N3JNpFvPN6jRaCzSQEpPMuG+bpPFFc+NoPlmf9omTQVd7Fy 0JZw== 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 c4-20020a17090a8d0400b00229125f1426si13543116pjo.19.2023.01.23.12.56.31; Mon, 23 Jan 2023 12:56:43 -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 S230040AbjAWUy5 (ORCPT + 99 others); Mon, 23 Jan 2023 15:54:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232159AbjAWUyU (ORCPT ); Mon, 23 Jan 2023 15:54:20 -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 E0A9837F00 for ; Mon, 23 Jan 2023 12:54:13 -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 1pK3pO-0000Lk-VQ; Mon, 23 Jan 2023 21:54:07 +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 15/23] staging: r8188eu: simplify dequeue_one_xmitframe Date: Mon, 23 Jan 2023 21:53:34 +0100 Message-Id: <20230123205342.229589-16-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?1755848268331335296?= X-GMAIL-MSGID: =?utf-8?q?1755848274554938431?= Simplify the dequeue_one_xmitframe function without changing its behaviour. Drop the temporary variable xmitframe_plist. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_xmit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 7802a34ebcfd..79a1999ca809 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1357,15 +1357,13 @@ s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitfram static struct xmit_frame *dequeue_one_xmitframe(struct __queue *pframe_queue) { - struct list_head *xmitframe_plist, *xmitframe_phead; + struct list_head *xmitframe_phead = get_list_head(pframe_queue); struct xmit_frame *pxmitframe; - xmitframe_phead = get_list_head(pframe_queue); if (list_empty(xmitframe_phead)) return NULL; - xmitframe_plist = xmitframe_phead->next; - pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); + pxmitframe = container_of(xmitframe_phead->next, struct xmit_frame, list); list_del_init(&pxmitframe->list); return pxmitframe; }