Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp370245pxb; Fri, 28 Jan 2022 00:36:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIXJar4mUEqNomYx3NtM/XmC77pZroeLknwGaSAEZpqjd9v6HBx3IMWA5f0uw42tKCjvFI X-Received: by 2002:a63:e1e:: with SMTP id d30mr5990041pgl.352.1643359017531; Fri, 28 Jan 2022 00:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643359017; cv=none; d=google.com; s=arc-20160816; b=MZYsxpz34eSqt/gNQWgmmV2zVu4GdT4pS4M8SpQiZM2JkiE3bMlFGFm8ibv9FfzV/D 8cwjKXRZ3rbBgcBoxmhuf9AU7grvlq2OU0xRi0Z2FlrvWJI+vNsJPhJKmeo/zxJJNA16 S9jrP7oz9FKTyzVtTmF9hnIAt5+OM7u0RS+IOs3X9IHLmeUSkXTVYd797Mk06lNMav9Q jwNU5/2KAEPYxvpZkZjMFS5xLYrqkAH2ms+ga4qJLPDeQfVkEXRmiSVSri4K0gR8+Zlo /naokaFXg2IwtBjOCqXuugVL5W1IADc/EvcZKoJj4yaOBFo2UlXPYQsRrVDdUXG56Iaj U8Iw== 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=oT2JHkTdL7h5Ss//xfwSKVhid3KC1Dc+KRRkWvKSOEs=; b=p8rg3sG8Ytm3roNTFon1Zl4i57i2v/BVupPz1FAudrhHELa1vMmmTPiDSIzvtKGaUc 8k+gGzMvQ362aYhwwqxzoD3ZKBruECZNqPtF418kyYZjguHvNsKGGYuj70GCWB4Y8K9i S593InhR7g4nSr539Dw8Yuw+ylfCY2NtLxLo6A9WnyfUTpZBfYWoVChDXbnpkvRdaFto 7dmxjW6muhClpuo+BrDC7pEapax2nOq1t3q+ryMaGTeCAXKWWLENNpAcaeDLQNb1TD2u flT0ZxcHobyXgFK72w70vn3xeUW4qdVHQ1GaGfZVXsK+KfzJRKIqWo0JI84ADVXwOfB0 RmlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lfT1lJkW; 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 k7si4987899plk.448.2022.01.28.00.36.46; Fri, 28 Jan 2022 00:36:57 -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=lfT1lJkW; 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 S243230AbiA0PvL (ORCPT + 99 others); Thu, 27 Jan 2022 10:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243227AbiA0PvJ (ORCPT ); Thu, 27 Jan 2022 10:51:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA81C061714 for ; Thu, 27 Jan 2022 07:51:09 -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 ams.source.kernel.org (Postfix) with ESMTPS id 19761B80139 for ; Thu, 27 Jan 2022 15:51:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68692C340E4; Thu, 27 Jan 2022 15:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643298666; bh=DNoQV3+BuDvj03mxhp8NClXgSuG6Ri+NZixUbJONTGM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lfT1lJkWbH8L2JkHsqYfGaRoM0DxsJDqGDeaK9JEACpuRKZUAeTqsg42Ye9Dy7iAq sLWw1ZFb8I4AsrU2BJjS/RAmLkVtGjLn0qxXL4uflaNNR4BbYevpn6eh4iNr7n2jsX qJrsPMHdTfUh/Sq+Q91DcYrkfHOmvdfZzfofqa+0= Date: Thu, 27 Jan 2022 16:51:04 +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: <20220127152543.ttvp7gj5bzpuvr3p@nlap2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220127152543.ttvp7gj5bzpuvr3p@nlap2> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 08:55:43PM +0530, Abdun Nihaal wrote: > Hello Greg, > > On Tue, Jan 25, 2022 at 04:10:57PM +0100, Greg KH wrote: > > 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 for reviewing the patches. > > I had split the changes in a way that the first patch removes the > unneeded return variables and the second patch converts the functions > (changed by the first patch) whose return values are not used, to return > void. > > But yes, I now think, it is better to just convert the functions > whose return values are not used, directly to return void instead of > first removing the unneeded return variable and then converting > to return void. > > I'll resend this as a single patch. A single patch per function you are changing is a good idea. Do not mix them all together, would you want to review something like that? Always remember that you want to make changes obvious and simple to review. thanks, greg k-h