Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp926834rwb; Thu, 4 Aug 2022 13:41:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR74laGhFkA948F/VE2MC8cbDQByzB7iAJRYIbnMpKCn4bDp5BzPOz4bxDrCu89m1mUJWeRH X-Received: by 2002:a17:907:3111:b0:730:6535:b3fb with SMTP id wl17-20020a170907311100b007306535b3fbmr2608704ejb.490.1659645670154; Thu, 04 Aug 2022 13:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659645670; cv=none; d=google.com; s=arc-20160816; b=PWJPlBhMQajufKzBSX2+YvFGT/w6OTOvOLau6gCzTO//L5pkn+OdxqHbZ9O7n/5XP6 I4XNfdkdadC/8bzjWJOivEYqOG2VbgWKA0h8AEcC5Rd4jIlOerwiKZWcumz+cPG0Vwnc WIurYRVaTfcHXbnuRAI+YAcOlMP7+EAT7rlAOvFvzKJsobw9ZW/yNu4uKgtGo0h0imNE yItJbr5q0EVR1OYpSHDvo8pFabJy/IBmxtgL8SnyEQrBY8eycKp50jowBZxIVkO3DseO lVLHIX9k9J6CL3fozPnh1Tc7w4VE8iYObWcIWFCQFwF/WudVnT+Kkuc3w5zEJ9XkqtbL WuoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gcpgRFm5vs+rWDh+VychUN2x/2sAeZ2CGnsyB4UULJc=; b=UJqG26HV9h84cAIXhQVNHxWtt2vDXTdZqcvFPHNoG3DY0bQb4vGqiYKbGOAs1SuNKI 5EBX8KYOIpD6T3AErDu+OQgUlu8cVW8y3CdlM/0rX/zxd6itElG6cfgyE4Ijbjb6zCR2 Pq2gYjB0w5P0N3lpfxuZatG9NAwgElkKZXxHNiV94CTRRwIcKAqHtpqkC1qmyHn1crLw S7QQq/ghsARO+NlgLymaXrSRk706CfjiP1Dg9oMR5JpIjozOsGHlzgobk3K5oU3qZP4e vNlIGfCvsbFLKBBqgVihmmpMnzC2w3nkePG4psYaWv2rRfBRY4xoogvlk7R8q1vy58Uz nsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U+0+6h8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb2-20020a170907784200b0072eda634546si1549318ejc.560.2022.08.04.13.40.45; Thu, 04 Aug 2022 13:41:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U+0+6h8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239715AbiHDU0o (ORCPT + 99 others); Thu, 4 Aug 2022 16:26:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbiHDU0n (ORCPT ); Thu, 4 Aug 2022 16:26:43 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC261704C for ; Thu, 4 Aug 2022 13:26:42 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id i14so1329140ejg.6 for ; Thu, 04 Aug 2022 13:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=gcpgRFm5vs+rWDh+VychUN2x/2sAeZ2CGnsyB4UULJc=; b=U+0+6h8r128HlTmUDQKULCIe7qAmbEWPanQmIrXi5N5AgdgxB6E53mTzNW8+LiTNtK vqtsohxdorLfeMTsSQ1rt0Oj0/jtS/+ZbFc0kOazgBgl98+GPTXVP8JJW4OfQqDOzLWI fwpuRgM7WggNA6TnZLCWhFsHA6s3+5Gt3FcpviGfa5l2PUFtju4sH0eE0LCCjbKaQwS2 bMvLN28ZcZa9/T12bAKWV+pGpPWVKgGYaanp+adVRtrJ1cXmsA7vkfnB4Ybnbczy7XYz 5Dz+hRaUZ/D9jmy1kEYU+cAJTn5rOC3szgO+Kvg+hX1lPuxZ/nmT8tBceE2/GtG1cdBK 8+8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=gcpgRFm5vs+rWDh+VychUN2x/2sAeZ2CGnsyB4UULJc=; b=cjsIcKFBuDa6HMhkDTAEmOtj8qkz5JJTS38f5bUtaifDJW2unCsGyvb7DjxtftgSUu RYq8t2DW6+qs3himYO+tsKnGHAfw2mRQGZS+Y1oAWCEo1HyQX6S9ohuSFk1ZQcCWHY0r 4RZVmSzOd//alQF87HP/U8VXwOKrX60UAIMghx3NCu4kFgNbwgkroJqRMvmYwLWcGYXG hW/BBGkxdW1co3gjbJ/J0ezLBQDcNbuBR2wGQJHn01JneUblxUfpp7ZyoS9bhVYsjf1y /OPn8ExHfFtuMPD3jMOY1YHIOzUdxdPinNORvFRINcjDnnAEisTKRFGK23lJi7WQqhYJ hF+Q== X-Gm-Message-State: ACgBeo3BBHp5JeF/ZYrSK8lbUVcdOo8Vj7YNtlkMTIm2wg6scx/k5YWD RM0ZCZNh2TEI593PqeXNyjE= X-Received: by 2002:a17:907:6d04:b0:72e:e204:a70b with SMTP id sa4-20020a1709076d0400b0072ee204a70bmr2657688ejc.432.1659644801394; Thu, 04 Aug 2022 13:26:41 -0700 (PDT) Received: from [192.168.1.103] (p54a07b82.dip0.t-ipconnect.de. [84.160.123.130]) by smtp.gmail.com with ESMTPSA id z7-20020a50cd07000000b0043bea0a48d0sm1122480edi.22.2022.08.04.13.26.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Aug 2022 13:26:41 -0700 (PDT) Message-ID: <99ee7f1d-62fa-a873-403a-445d8d8b096a@gmail.com> Date: Thu, 4 Aug 2022 22:26:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] staging: r8188eu: convert rtw_p2p_enable to correct error code semantics Content-Language: en-US To: Phillip Potter , gregkh@linuxfoundation.org Cc: 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 References: <20220802234408.930-1-phil@philpotter.co.uk> From: Philipp Hortmann In-Reply-To: <20220802234408.930-1-phil@philpotter.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/3/22 01:44, 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 > --- > drivers/staging/r8188eu/core/rtw_p2p.c | 19 ++++++++----------- > drivers/staging/r8188eu/os_dep/ioctl_linux.c | 12 +++++------- > 2 files changed, 13 insertions(+), 18 deletions(-) Tested-by: Philipp Hortmann # Edimax N150