From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32233168 for ; Thu, 27 Jan 2022 15:51:06 +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> 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: <20220127152543.ttvp7gj5bzpuvr3p@nlap2> 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