From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 780696AA2 for ; Thu, 4 Aug 2022 22:35:57 +0000 (UTC) Received: by mail-wm1-f45.google.com with SMTP id n20-20020a05600c3b9400b003a4f2261a7eso517756wms.2 for ; Thu, 04 Aug 2022 15:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=GjhcCM6pqUfDNnBpeTBTrm5a2+uQw6A9z6WoPf0/fPw=; b=t8yThKZC3eE9v7bQ67YqGuHSMxvZqH2fBBRFYDhtuEoV1F3JD0O1o14QmFYgIsm6CP uSkYNSebUa2MyO+wnGTok5JA0h2tHKmQue4gPHuUC2Bkhbwg0nS+YQzqUVnl/gCzgo+B uiQg609+1qsh74kxhOTfp6eNHne0Nt3pDlJELke/yiGsJtssYyPH14Esvecg02IVVXGO T5fa9tdb90W431J+9vmvF6VhqxwitQ4E/yWEJ/inpw1aLrmETElvnrehnfVgdqpVKqEq uWf9/4Smth4kO6EmaGVKqcBax9qjfeXjyawh/EGCnkUPrS48lmhaitTYjaOVaxu8dhff ip0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=GjhcCM6pqUfDNnBpeTBTrm5a2+uQw6A9z6WoPf0/fPw=; b=irvXLC7TCxC3C1WuP1EsYB7FyM+mCWB10CYOS7z1Hij3zZf5LFOv0nwl54jhUYO+5e 65JuC6+zIsF6TXGgWuNldkgoTnbICxAQ9mo6ctmgqECyJIsTJ4+eD6YpuJ1ECARHvbQd s/1+BbSisl+N53BFIQVlKuCQ3QBv9zg4hNn4I05Sb1EG6+1rJzOrX44LnZj3vLB7aXGA UaWqV/+LaOlolToNG3Mt6aF5fbgkv+n2HeOWGJW+eUZuEuALbZIrlGfg2yWoiMHrAnDi KrJUf9G1jXoVICQtGDa5H4v+ChDWHPAfcZ/TWL6OTPRTaWx1Lkd/WMa9qFthyEqcPQgN 6UDw== X-Gm-Message-State: ACgBeo1kQ598FAJWWRHKxz1DqjHiOr7IEKSk+0QWcJgTdxUe0O138KRt jmJIkt93shdzUPlpcc3qd+tvxg== X-Google-Smtp-Source: AA6agR4IdWEIrrj7cqAiF+rraowt3BssE45/V3N60GXpNXoJWEahPJtx2WjbCwON5R4BvPQCqN8dhA== X-Received: by 2002:a05:600c:49a4:b0:3a5:fa7:18ef with SMTP id h36-20020a05600c49a400b003a50fa718efmr2665854wmp.156.1659652555540; Thu, 04 Aug 2022 15:35:55 -0700 (PDT) Received: from equinox (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c3b9500b003a2d6c623f3sm7619306wms.19.2022.08.04.15.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 15:35:54 -0700 (PDT) Date: Thu, 4 Aug 2022 23:35:52 +0100 From: Phillip Potter To: Dan Carpenter Cc: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net, paskripkin@gmail.com, straube.linux@gmail.com, martin@kaiser.cx, abdun.nihaal@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: r8188eu: convert rtw_p2p_enable to correct error code semantics Message-ID: References: <20220802234408.930-1-phil@philpotter.co.uk> <20220803121108.GC3438@kadam> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220803121108.GC3438@kadam> On Wed, Aug 03, 2022 at 03:11:08PM +0300, Dan Carpenter wrote: > On Wed, Aug 03, 2022 at 12:44:08AM +0100, Phillip Potter wrote: > > Convert the rtw_p2p_enable function to use correct error code semantics > > rather than _SUCCESS/_FAIL, and also make sure we allow these to be > > passed through properly in the one caller where we actually check the > > code, rtw_wext_p2p_enable. > > > > This change moves these functions to a clearer 'return 0;' style at the > > end of the function, and in the case of errors now returns ret instead > > of jumping to the end of the function, so that these can still be passed > > through but without using a goto to jump to a single return statement at > > the end which is less clear. > > > > This change moves the driver slowly closer to using standard error code > > semantics everywhere. > > > > Signed-off-by: Phillip Potter > > Looks good. Thanks! > > Reviewed-by: Dan Carpenter > > regards, > dan carpenter > Thanks for the review Dan, much appreciated. Regards, Phil