Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp680815pxa; Sat, 1 Aug 2020 02:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBHEbP4cFvSQx/7bx1pftvsAifSeb6cSEaFCoHN1KP6d1qNzOeOdMkSb3iFZ7bE3rV9+tY X-Received: by 2002:aa7:d9d7:: with SMTP id v23mr7850625eds.112.1596275106275; Sat, 01 Aug 2020 02:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596275106; cv=none; d=google.com; s=arc-20160816; b=Tt53u7kz4vH5VO17TgphKX9K6bX6Cv4DTRyWQbo8uSxqUW578Ba3rfJKVGK/3OYZaW huL7xhiO4wpIo/54zGJsu/nMmmvLjMTY+Ag0yxBb/CI5eqLZafkphhQUi+VgGYWiNROw EvefJGl/KOBUZN4SywuMso4MqSJlV0eaShACFyPuv4/Gmq1f/lax+JUxxZKirhH+SeXx bdu5My/21ebcQcxa1ag1wSePG/sX84R0JP+kQsJUqsiU+FMHjpXqEvYtZrUvntEXMlMF Pz1aoQj5Lgb/7rHF+mzAe0ZlAB6jseCJBk5/ikTUCCRwcFDmWp9c1wXXlg7ieKUW5yHH jR+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Geux1n7ky2eH1Y8p9KzQaNhv3N4zS3YhRr+vtlh2v1k=; b=e/pcQcrdj1tqjs5Apm4+jyG0ZAkzvVZZztsOUTXEsRiKjFmerDFIoPwiuzPIqC0VU0 xm27RGuEiDffmTtKfjgdZiqhmwNOnHO575+C8PwvkiB1wgd2Hh+EYj4e3lFtddFq/j4Y UTmjohuBVngUKhRjxfxoOkdOrdF+nYC3NfMmreFQoHHNynm5815uZYkcvNCfozX8V4ae 22BA6qNqmBBtNH6V7HdtOpwsv2iZTr6s3qaFSre1HWdBYLn7Z+5RinrGQhoNnL6tBn3f iY+xrtuVMpxOnp5d1H6D3u7hca6jf8CCubpM16/TdUJBu1u1LmQEmAqLOHUQSlkewU9n 7fHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RyBKbaOR; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si3876527ejs.554.2020.08.01.02.44.43; Sat, 01 Aug 2020 02:45:06 -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=@gmail.com header.s=20161025 header.b=RyBKbaOR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728720AbgHAJm2 (ORCPT + 99 others); Sat, 1 Aug 2020 05:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbgHAJm1 (ORCPT ); Sat, 1 Aug 2020 05:42:27 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F858C06174A for ; Sat, 1 Aug 2020 02:42:27 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id q7so34821799ljm.1 for ; Sat, 01 Aug 2020 02:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Geux1n7ky2eH1Y8p9KzQaNhv3N4zS3YhRr+vtlh2v1k=; b=RyBKbaORrd7Ioae/J9LKl0aWf3Te5dKlH704lW5I7OPuFRkCis2LsMYTYPnuieKnPN YktxMvwrjlpTrgj0Uaz+QDKbcYuxuMEzwKbTzt0iTUk5YbKKbMm7o+2vXYS8ItpF1vFm F0chhUDF1xN4ua+hXhf/oTYN0rn75z1h1Fr4xHBGSc7gI6SPw4ffIL21eGEkZ/+ac9q2 dzTFH8HvjiscMxOR2s1rGPnqlE3csaLJ0dWuY4yaJcoCFm4OSDT9wXkjkZRIq1Yca81W neJo0bsS+WH7/6yD6bCi5wxlQQ6W/W0xvOlY5N6Gv6djAPqH4qkojjHyFkYDH9Lz6Djm 3KIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Geux1n7ky2eH1Y8p9KzQaNhv3N4zS3YhRr+vtlh2v1k=; b=iAGPXU5ypQRUyTAlymlF+KIwsXgOZzbnyW7YmdEHS0LmnnTSZ82uLhXee/80nqhsiZ ufxVblUqUwSnt/D4UfIRT0JrbNh/sTbxz3uOQbNYo35Dtf3ztaRfl1ocgEVQgGZxfLYB 0yeytGuEaXq34vnoX1Zddt3Z5FSnArDV41xX0NzagS5KLtualNaOAm+u/BDs5UewwKWa qyi4TjmG26PX/ozT/Q9l08sp7lJ/uBTxTzbaZOO1AZqbUivwaP/wKBmIhMej6hc8w128 TvGCcax61hUU0O2s5HqBxRk6TW1dQTLcnnFIhyp+KiOlv+xIpku9eY31Bhbx1yjG6k1/ rfHQ== X-Gm-Message-State: AOAM530rbbA2jec4ZumKJfRDZoW6CySOMGG7VTzqm0S2hxsNgw14mQNy TGEuGrjewLzfyj0YNRDPHXIjX5lk X-Received: by 2002:a2e:320c:: with SMTP id y12mr3485354ljy.399.1596274945927; Sat, 01 Aug 2020 02:42:25 -0700 (PDT) Received: from alpha (10.177.smarthome.spb.ru. [109.71.177.10]) by smtp.gmail.com with ESMTPSA id q29sm2573932lfb.94.2020.08.01.02.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 02:42:25 -0700 (PDT) Received: (nullmailer pid 13495 invoked by uid 1000); Sat, 01 Aug 2020 09:47:20 -0000 From: Ivan Safonov To: Larry Finger Cc: Greg Kroah-Hartman , B K Karthik , Michael Straube , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ivan Safonov Subject: [PATCH] staging: r8188eu: replace rtw_netdev_priv define with inline function Date: Sat, 1 Aug 2020 12:47:07 +0300 Message-Id: <20200801094707.13449-1-insafonov@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function guarantees type checking of arguments and return value. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/osdep_service.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 31d897f1d21f..e0ccafdea9cd 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -71,8 +71,10 @@ struct rtw_netdev_priv_indicator { }; struct net_device *rtw_alloc_etherdev_with_old_priv(void *old_priv); -#define rtw_netdev_priv(netdev) \ - (((struct rtw_netdev_priv_indicator *)netdev_priv(netdev))->priv) +static inline struct adapter *rtw_netdev_priv(struct net_device *dev) +{ + return (((struct rtw_netdev_priv_indicator *)netdev_priv(dev))->priv); +} void rtw_free_netdev(struct net_device *netdev); #define FUNC_NDEV_FMT "%s(%s)" -- 2.26.2