From patchwork Wed Mar 22 17:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 73574 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2463609wrt; Wed, 22 Mar 2023 10:22:17 -0700 (PDT) X-Google-Smtp-Source: AK7set+oP/VLEDeA6p+iTNaQ1Ku+vYEQYUVFD4YGIhK/T0GfMYb/CedIPo+TO5fw2FofLE2ITALI X-Received: by 2002:a17:906:5e43:b0:932:4990:2563 with SMTP id b3-20020a1709065e4300b0093249902563mr8084936eju.24.1679505737626; Wed, 22 Mar 2023 10:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679505737; cv=none; d=google.com; s=arc-20160816; b=uk7MFzgIi4IK4fMMGrjHCsJDxAD7ZR4Ih3YdWVyjNzcb/T16EwQjSqk4Exqu9YAlrv q39RsibcVcDyoHLHyKkv5RRXEC6DncJzV4tKl0sjJaZnIftVbtnwxRDX4EJ0Jl+sPTzj 7rJkzsgUVV4VwUDGEOfiKTO5Za3LFMzu38opwDjLz6Gq5rmq0/hkWpEruXFulLpDUOSu 6okCy1hNNUNNWpUejxcOUXqCs1yU9td9ZVB152cqMqladjCv/F3uXOnLQoOThcYZx4f7 xeW0xwVFk3rcgrMc/Sv+KV3OYs/zo5OPx5d2Upce/qft6sM3/4HqdlfVE5Le1ayGkxh3 REwA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=lUXfjO9MLExMn6IoI9J9KH+mTRK8zfSKTM2CAEavc0Q=; b=meDT+FFbMN+LNXI+i9Zgh79fFCNzxj0CFA091KC7DUovJts27821p5Hfy0iYy882rh GYoGYoQng47qGdY5hEY5P2hID8uknloRyt2UsDlzBAPqiKssagnhW6qzd1Imaeldg61n S+5oNDUSbEOkgtxvK8O5zH+aryjqagjDgdz3Lm+EyOJqZ7Y9LC/H5RuaHdyQm9NPShSu 7lNxaC5YzYclXlqHyafAU88EtxLDH7n3LACbRvQj4rEwt8Oiqk9gRJpT5AAU9AalnJGx Kw5Cf7Q34ZR6zjdHtE689Z1i63xiS6w4zucbzY7dKw7WwNZgZUITtbwN7fFscUTXeMz2 CXzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StizjcQ7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020aa7c745000000b004beeaa6bc04si497871eds.97.2023.03.22.10.21.54; Wed, 22 Mar 2023 10:22:17 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StizjcQ7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231516AbjCVRQS (ORCPT + 99 others); Wed, 22 Mar 2023 13:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231453AbjCVRQC (ORCPT ); Wed, 22 Mar 2023 13:16:02 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F95637C4 for ; Wed, 22 Mar 2023 10:15:28 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id h8so75846288ede.8 for ; Wed, 22 Mar 2023 10:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679505327; x=1682097327; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=lUXfjO9MLExMn6IoI9J9KH+mTRK8zfSKTM2CAEavc0Q=; b=StizjcQ7WHtK5C9WkTHZfZVzbgeCBIoZs/U03xKRNTW3g6z5Su1ebLLig/QHnem0Rt lnrt/iGBcYCm9ODYVfIuZz3hkaqMYy+zkrt8/TNCGRugZBy7iV2UgX/GfPSPU4FjBc2E 8WuWBprxLSns8Wh6t0G8KUR/OhQn/tX/VKpRs5qGPjPFGcyBIGnGIEA1VEfC8I0Arfcm +DuvzDVrCXa/7bhER7Iy0tAavUW+rERFgg9tiMbQuK4cPMi6+9Hc2Pj3CfA+kAkp0iOi pJwlDQkrIAk4fnY/pJHgPhn7KHkfyhlacr3TOEzKGQPEvIEF5U2dVugi9svrI2epibak D9ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679505327; x=1682097327; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lUXfjO9MLExMn6IoI9J9KH+mTRK8zfSKTM2CAEavc0Q=; b=SK0m9b8NVt1C8xK54Smr33wmq7EG69fk5wX+wEo/QdT0EV37ZJidn6/+RDt+jj4wXw mWh3P5k8JwR+FJrrHx3f4i9N8ltoInQUwLrMG2TC+kiHXYeIcyxwgtRNhxNev8WElaQG d7cy/OBXlPAjLAkwlYbwxufDOKdh5cbW78RFyONRgvy0t1k8oNb+VuNIC7Px1+qMjVQl k1l0QTH0biTEYplVeapVorCX6CqwHEixDx6+Rs8GSUj+HhRNFNNA5ShmdW4TqykcQxb/ lGIKHj7djBKZbFBZ0iXP5UGnLTRhDiQBSkMMycG1bZT4ru3BpMc9dXd90wVEV1LNJlEb 9+Sg== X-Gm-Message-State: AO0yUKUcf7Y3BvrcnAZsaaYONQZpv9aVkuqGrHqCC1E2j7LNQKpomZyF XFPlAG4/9gPXjJtcGjfBZAw= X-Received: by 2002:a17:906:224f:b0:92e:f520:7762 with SMTP id 15-20020a170906224f00b0092ef5207762mr6720088ejr.6.1679505326925; Wed, 22 Mar 2023 10:15:26 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id lc5-20020a170906dfe500b0092973e209f2sm7451911ejc.109.2023.03.22.10.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 10:15:26 -0700 (PDT) Date: Wed, 22 Mar 2023 18:15:24 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/8] staging: rtl8192e: Replace macro iwe_stream_add_event_rsl with standard function Message-ID: <00a8057acc994c139530a070974694b999a8f96a.1679504314.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1761089408113616928?= X-GMAIL-MSGID: =?utf-8?q?1761089408113616928?= Replace macro iwe_stream_add_event_rsl with standard function iwe_stream_add_event to increase readability. Signed-off-by: Philipp Hortmann --- V1->V2: Changed subject line to be without “f.” --- drivers/staging/rtl8192e/rtllib.h | 3 --- drivers/staging/rtl8192e/rtllib_wx.c | 16 ++++++---------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 669a9d9a5d18..81d630cf7e52 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -65,9 +65,6 @@ #define container_of_dwork_rsl(x, y, z) \ container_of(to_delayed_work(x), y, z) -#define iwe_stream_add_event_rsl(info, start, stop, iwe, len) \ - iwe_stream_add_event(info, start, stop, iwe, len) - #define iwe_stream_add_point_rsl(info, start, stop, iwe, p) \ iwe_stream_add_point(info, start, stop, iwe, p) diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index 217426ee2e92..e580cd01c201 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -41,8 +41,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, iwe.cmd = SIOCGIWAP; iwe.u.ap_addr.sa_family = ARPHRD_ETHER; ether_addr_copy(iwe.u.ap_addr.sa_data, network->bssid); - start = iwe_stream_add_event_rsl(info, start, stop, - &iwe, IW_EV_ADDR_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_ADDR_LEN); /* Remaining entries will be displayed in the order we provide them */ /* Add the ESSID */ @@ -71,8 +70,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, } *pname = '\0'; snprintf(iwe.u.name, IFNAMSIZ, "IEEE802.11%s", proto_name); - start = iwe_stream_add_event_rsl(info, start, stop, - &iwe, IW_EV_CHAR_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN); /* Add mode */ iwe.cmd = SIOCGIWMODE; if (network->capability & @@ -81,8 +79,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, iwe.u.mode = IW_MODE_MASTER; else iwe.u.mode = IW_MODE_ADHOC; - start = iwe_stream_add_event_rsl(info, start, stop, - &iwe, IW_EV_UINT_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_UINT_LEN); } /* Add frequency/channel */ @@ -90,8 +87,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, iwe.u.freq.m = network->channel; iwe.u.freq.e = 0; iwe.u.freq.i = 0; - start = iwe_stream_add_event_rsl(info, start, stop, &iwe, - IW_EV_FREQ_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_FREQ_LEN); /* Add encryption capability */ iwe.cmd = SIOCGIWENCODE; @@ -152,7 +148,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, iwe.u.bitrate.disabled = 0; iwe.u.bitrate.fixed = 0; iwe.u.bitrate.value = max_rate * 500000; - start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_PARAM_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_PARAM_LEN); iwe.cmd = IWEVCUSTOM; iwe.u.data.length = p - custom; if (iwe.u.data.length) @@ -172,7 +168,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, if (!(network->stats.mask & RTLLIB_STATMASK_SIGNAL)) iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID; iwe.u.qual.updated = 7; - start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_QUAL_LEN); + start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_QUAL_LEN); iwe.cmd = IWEVCUSTOM; p = custom;