From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 010EAC25B06 for ; Thu, 4 Aug 2022 22:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240033AbiHDWf7 (ORCPT ); Thu, 4 Aug 2022 18:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234746AbiHDWf6 (ORCPT ); Thu, 4 Aug 2022 18:35:58 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB2266267 for ; Thu, 4 Aug 2022 15:35:56 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id b21-20020a05600c4e1500b003a32bc8612fso509492wmq.3 for ; Thu, 04 Aug 2022 15:35:56 -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=uYyIja9NiU3RXkpdD/yJkpTbPEhRKe6zHrEoajNWBucouEgMbfMCrp5sB8zv0btIrD H8z2WKl1XcmOu3WTzf/w/8q8/t+BCZdbAFYARW3/yGXbyOwCHwLqQqkrNQSt9BWm8sao UbwbnvcRhQOycvQsWt1Z6PEZlIzVoRYQcKdKCdSHv7B8hedXHp7mX6/AVlUg4yqKDfrn 7fjixUJdocAgHDW9xir6zPVbhHZ9U2xxbXxwUv28KV/pMnBrN6nf2RVl9ooKKkVzOKsr UagvS70UwQh4GxXr6FlOX4XL3V9RLqkQ0UjBTfkjfyoWDIezYQKM9ngHQWfczl+Kos4I XvTA== X-Gm-Message-State: ACgBeo37tKhtsq358SkTYfI6tndcFWgkCn165P83Ex2oVrjpuzAX3bxt NCVaQtpCRS0QEGSdmPEc7LapMw== 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220803121108.GC3438@kadam> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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