mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Martin Kaiser <martin@kaiser.cx>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] staging: r8188eu: remove pm_netdev_open
Date: Thu, 25 Nov 2021 18:43:21 +0100	[thread overview]
Message-ID: <813f1715-181f-515b-46c9-fafa374453a2@gmail.com> (raw)
In-Reply-To: <20211125164745.8188-2-martin@kaiser.cx>

On 11/25/21 17:47, Martin Kaiser wrote:
> The only caller of pm_netdev_open sets bnormal to true. In this case,
> pm_netdev_open just calls netdev_open.
> 
> Remove pm_netdev_open and call netdev_open directly.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/include/usb_osintf.h |  1 -
>   drivers/staging/r8188eu/os_dep/os_intfs.c    | 11 -----------
>   drivers/staging/r8188eu/os_dep/usb_intf.c    |  2 +-
>   3 files changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/usb_osintf.h b/drivers/staging/r8188eu/include/usb_osintf.h
> index 624298b4bd0b..3e777ca52745 100644
> --- a/drivers/staging/r8188eu/include/usb_osintf.h
> +++ b/drivers/staging/r8188eu/include/usb_osintf.h
> @@ -16,7 +16,6 @@ extern int rtw_mc2u_disable;
>   u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, enum bt_usb_request brequest,
>   		    enum rt_usb_wvalue wvalue, u8 windex, void *data,
>   		    u8 datalen, u8 isdirectionin);
> -int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
>   void netdev_br_init(struct net_device *netdev);
>   void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb);
>   void *scdb_findEntry(struct adapter *priv, unsigned char *ipAddr);
> diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
> index 5a5f182d30c9..397981bc9a62 100644
> --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
> +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
> @@ -760,17 +760,6 @@ void rtw_ips_dev_unload(struct adapter *padapter)
>   		rtw_hal_deinit(padapter);
>   }
>   
> -int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
> -{
> -	int status;
> -
> -	if (bnormal)
> -		status = netdev_open(pnetdev);
> -	else
> -		status =  (_SUCCESS == ips_netdrv_open((struct adapter *)rtw_netdev_priv(pnetdev))) ? (0) : (-1);
> -	return status;
> -}
> -
>   int netdev_close(struct net_device *pnetdev)
>   {
>   	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index eca1036a721f..984e408f9366 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -298,7 +298,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
>   		pwrpriv->bkeepfwalive = false;
>   
>   	DBG_88E("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
> -	if (pm_netdev_open(pnetdev, true) != 0) {
> +	if (netdev_open(pnetdev) != 0) {
>   		mutex_unlock(&pwrpriv->lock);
>   		goto exit;
>   	}
> 

Reviewed-by: Michael Straube <straube.linux@gmail.com>

  reply	other threads:[~2021-11-25 17:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 16:47 [PATCH 0/4] staging: r8188eu: some trivial removals Martin Kaiser
2021-11-25 16:47 ` [PATCH 1/4] staging: r8188eu: remove pm_netdev_open Martin Kaiser
2021-11-25 17:43   ` Michael Straube [this message]
2021-11-25 16:47 ` [PATCH 2/4] staging: r8188eu: remove _ps_open_RF Martin Kaiser
2021-11-25 17:45   ` Michael Straube
2021-11-25 16:47 ` [PATCH 3/4] staging: r8188eu: remove _ps_close_RF Martin Kaiser
2021-11-25 17:46   ` Michael Straube
2021-11-25 16:47 ` [PATCH 4/4] staging: r8188eu: loadparam needs no net_device Martin Kaiser
2021-11-25 17:48   ` Michael Straube
2021-11-26 13:03 ` [PATCH v2 0/4] staging: r8188eu: some trivial removals Martin Kaiser
2021-11-26 13:03   ` [PATCH v2 1/4] staging: r8188eu: remove pm_netdev_open Martin Kaiser
2021-11-26 13:03   ` [PATCH v2 2/4] staging: r8188eu: remove _ps_open_RF Martin Kaiser
2021-11-27  7:55     ` Michael Straube
2021-11-26 13:03   ` [PATCH v2 3/4] staging: r8188eu: remove _ps_close_RF Martin Kaiser
2021-11-26 13:04   ` [PATCH v2 4/4] staging: r8188eu: loadparam needs no net_device Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=813f1715-181f-515b-46c9-fafa374453a2@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®