Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4623252pxb; Tue, 25 Jan 2022 14:48:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaWTW4nM4YrRXkJ5jlcZpGq67zDWZdXSdD8mYKQu8Shjjod0EPc+Fl3fZZIy8oaTjjOumC X-Received: by 2002:a17:90a:8a02:: with SMTP id w2mr5827911pjn.177.1643150888475; Tue, 25 Jan 2022 14:48:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643150888; cv=none; d=google.com; s=arc-20160816; b=c2HG5y6iS940CDcLpKt6unJfGc9pS8GU82pa3qTujTDOPrJvb8dUQB65l1uFAfvLcO 7mj+X/8bWs0rYBbNJ0biQsKnP9CE3s8BFDrPitrvMIeVNrk2oV+dVIjbHPR/EJoBiRZb EdNmLWHpxuFq4yalxWBSIRAP6TgcP6GHHHEVQY0/H9afFE/7nQnE1kXzya8J87k25vFe 0n+l5GO+Las2pzgm0HKjbM/rE33TNZA9jhJo0H2Oba1KktKtAfDeDXf3q4KvnHq99kGy WCVPqenu6HnhbxhzLLj3rfIGGpgR2ajsR/QoY21+80fD6C4f9TiQ8WzfHrU6g8ZrsWye 54gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kPEyBV7/UfyXpC8AyOdDW50+O+oo1OIPEQ13juZtebM=; b=XgjK4ehQpmJsWJrTG0np0WGwxqXgKeDJ69KyvoFGMzpkOWZLERnST9O/xXZlnN26So a0880h4vnhrnNaJQrWVhbWRfZTgvmp9jIiJsJeTPITUPgFek1m8NA2c7VUVN9Lp38zgY Twjqo/GI/2ioSvX7ugsKgDp3E6dvFK9iycpWZwDeEX09I2tVvB9InnGoNxh8ZFK0qSq4 e6fuBrWItl1alFhBDhjwuhO2bMqYMrU6/G/mkxd1kxoHelaak/Kflq91mHfk80A+DHBe BHAv2aGDOU5y7BYcZTAqe35R7E2RaB/qwWFCr0+hUNpgnxAe+4M9wuiNu8zp8QiMytMz KZ3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ivYtKLAc; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si15951484plp.15.2022.01.25.14.47.56; Tue, 25 Jan 2022 14:48:08 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=ivYtKLAc; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581824AbiAYPN3 (ORCPT + 99 others); Tue, 25 Jan 2022 10:13:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1581627AbiAYPLD (ORCPT ); Tue, 25 Jan 2022 10:11:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2DF7C061759 for ; Tue, 25 Jan 2022 07:11:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6137861669 for ; Tue, 25 Jan 2022 15:11:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 099F9C340E0; Tue, 25 Jan 2022 15:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643123460; bh=QktJHi6QpRk8SetsALi9mJL7sWv/IP6LVhyDznyywto=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ivYtKLAcLMQP+KOX7JVvnkPcbUPnscUZ7z6UPkUgud/ZjMnVxYhymrwcjfDQ66ffD FIIvOP1LeubjaVl+9aJ/ulxwC8NoVUnCbByvDH9h8xcdKeTlUKSICc3gE/ZZuAGarX r4pjhLj1AsWhN1eI6QHPYLUJlreAzbeVqOSuPHJI= Date: Tue, 25 Jan 2022 16:10:57 +0100 From: Greg KH To: Abdun Nihaal Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, straube.linux@gmail.com, martin@kaiser.cx, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] staging: r8188eu: remove unneeded ret variables Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 07, 2022 at 04:05:40PM +0530, Abdun Nihaal wrote: > Remove unneeded return variables in ioctl_linux.c that are initialized > to 0 and are not assigned after. Instead, return 0 directly. Many, if not most, of these functions should either be having their return value checked, or be void functions as no one checks their return value and they can not fail. Please split this up and look at each function to determine which is is and how to fix it up properly. Just returning 0 all the time is not the correct thing to do all the time. One example would be rtw_p2p_get_status() It can not fail, so why does it return anything? thanks, greg k-h