Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3855896pxy; Tue, 4 May 2021 11:24:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxGht/PiNGjXpVWSBtK71DaRyKfED4QrISPR8OMaqLyEByuEMPP1gG65XXCfKeY2OU/s4x X-Received: by 2002:a17:90b:88b:: with SMTP id bj11mr29741928pjb.224.1620152693403; Tue, 04 May 2021 11:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620152693; cv=none; d=google.com; s=arc-20160816; b=FK/Qnh8XuxSU2ddapadcBaaWqlX+M94+Q/E2p/6ZvOxjijZYlBZDGMa5X6MDuXparC nWPiroKcmjw9XlQkJ3mos+rkVILXJY9ry5A8eLGATziqUdxsZUTbRDiMO8v+Ths0YlMP /tyOg0B+hfV3Jwxmo4CTtp8X4DQUuPtUOnchSwb4qLpWlGWvWCIBUpm+P1XfXGk7nBdD WDTAH6paabPeZYGRC+Z27uy0kx9e+cUuNezQQoMyLqlB9ONELV3uf+Q1EPIufzr3ca8/ JFwOs5dpYHjcB78WNtTZTPDwG+nXE7QHM/RU6Jjiy4ZbZPObA1wSpbvu+i6fzXhyLZ8X JCdw== 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 :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=izMrQ29i9o8lR9msxy7VHUJ0aaa/lS+KxRCqJNJ4ZUE=; b=LoZ8q1OzUCy3HR75Fai1svTw7ZGxnUePJJf4lKzfvoks4cvwjRXBYVQesjRJMgLjDJ yofxpidVuaVdxyndudQ6goJSuFNr7a/fqqDuOCVPXWTBpZTdVa/RXi6ala+0u9d2Nj9z 7QBVX0XHbA8LvIvRoe8tdlYnPqC2DOtoaavOyPYfAINAGzvUmjNEG2OS3BW1sXws8oMn 2HmAeRRvwtrcP3LrcYuQoHgx+ZiRg5x5p79lEmumjxpKuJEuCapBj6LdhmRQQ4s/1E/T nwFNGuw1gCGABogkDP43hxp9ZThDkZbTS+UgYTiiOBjWq4zhzthC8YVcsrxQT9x+ORKm GRkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bryanbrattlof.com header.s=protonmail3 header.b=gwexdwPe; 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=REJECT sp=REJECT dis=NONE) header.from=bryanbrattlof.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si18377180pjr.135.2021.05.04.11.24.38; Tue, 04 May 2021 11:24:52 -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=@bryanbrattlof.com header.s=protonmail3 header.b=gwexdwPe; 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=REJECT sp=REJECT dis=NONE) header.from=bryanbrattlof.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231536AbhEDQIu (ORCPT + 99 others); Tue, 4 May 2021 12:08:50 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:47771 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231274AbhEDQIu (ORCPT ); Tue, 4 May 2021 12:08:50 -0400 Date: Tue, 04 May 2021 16:07:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bryanbrattlof.com; s=protonmail3; t=1620144473; bh=izMrQ29i9o8lR9msxy7VHUJ0aaa/lS+KxRCqJNJ4ZUE=; h=Date:To:From:Cc:Reply-To:Subject:From; b=gwexdwPe7LPbdOmPuDeoG6NiUzMDP2OJpjhIhq6Yf89xir95BgSQiYcQcEhfpZ67j bJdlpSHgL20cfyaqARoCum8VgdWG5fzXLh2yeVRsJ3cN6uGYbpF3+YEHNRUzbhpS9s YDJc9kv/kU2SXK6XGUkaQR3Vr0zgjOxAsYQTbohH0Ut+yXaBcZQ6tknfUCL0A1Xncd ec1ivs540D+nNk72VOBSp0wM6ZdyBd9Cyxh60cDtk/+A6SR19aa1vTMz8gaSEQdKzJ VX2phk8qNhhn1Digu5dZ4TeVmY3qAJPehmafJTAMskV54LSWfeObtvH1+s3kXvwyaP G5h5mMuGctLKQ== To: Greg Kroah-Hartman From: Bryan Brattlof Cc: Bryan Brattlof , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Reply-To: Bryan Brattlof Subject: [PATCH] staging: rtl8723bs: use generic kernel error codes Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current _FAIL and _SUCCESS error codes are defined as: #define _FAIL 0 =09#define _SUCCESS 1 which adds complexity (and confusion) when interacting with other submodules in the kernel. These definitions can be removed and replaced with the kernel's generic error codes. Signed-off-by: Bryan Brattlof --- drivers/staging/rtl8723bs/include/drv_types.h | 2 +- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/stagin= g/rtl8723bs/include/drv_types.h index 83d43e5726dd..5b702ff432ae 100644 --- a/drivers/staging/rtl8723bs/include/drv_types.h +++ b/drivers/staging/rtl8723bs/include/drv_types.h @@ -385,7 +385,7 @@ struct adapter { =09void *xmitThread; =09void *recvThread; -=09u32 (*intf_init)(struct dvobj_priv *dvobj); +=09int (*intf_init)(struct dvobj_priv *dvobj); =09void (*intf_deinit)(struct dvobj_priv *dvobj); =09int (*intf_alloc_irq)(struct dvobj_priv *dvobj); =09void (*intf_free_irq)(struct dvobj_priv *dvobj); diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging= /rtl8723bs/os_dep/sdio_intf.c index d2bf444117b8..e26c51d847b6 100644 --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c @@ -112,7 +112,7 @@ static void sdio_free_irq(struct dvobj_priv *dvobj) =09} } -static u32 sdio_init(struct dvobj_priv *dvobj) +static int sdio_init(struct dvobj_priv *dvobj) { =09struct sdio_data *psdio_data; =09struct sdio_func *func; @@ -139,12 +139,11 @@ static u32 sdio_init(struct dvobj_priv *dvobj) =09psdio_data->tx_block_mode =3D 1; =09psdio_data->rx_block_mode =3D 1; +=09return err; + release: =09sdio_release_host(func); - -=09if (err) -=09=09return _FAIL; -=09return _SUCCESS; +=09return err; } static void sdio_deinit(struct dvobj_priv *dvobj) @@ -186,7 +185,7 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_f= unc *func) =09psdio =3D &dvobj->intf_data; =09psdio->func =3D func; -=09if (sdio_init(dvobj) !=3D _SUCCESS) +=09if (sdio_init(dvobj) < 0) =09=09goto free_dvobj; =09rtw_reset_continual_io_error(dvobj); base-commit: 9ccce092fc64d19504fa54de4fd659e279cc92e7 -- git-series 0.9.1