Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4632135pxb; Thu, 14 Oct 2021 08:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgRrch5ZhB8EGnVk/I5odR8ZHtyXUXKQXJ+ccSR1njcxFYUmH6c0ZQBLvkNPg9lCeyU9JQ X-Received: by 2002:a17:906:e85:: with SMTP id p5mr4747979ejf.159.1634227024870; Thu, 14 Oct 2021 08:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634227024; cv=none; d=google.com; s=arc-20160816; b=YLm2OE646+hrdxJOb9XbFws7lmvtSLWYy2lj76vOm3xjd8DIuWJx3MSVKSIxUI0LFD 74IKEhLTDgW5rR48jhfIFsMin7uM+H0xXHTIIiZvw2P0RKoayMPXg6X9o5bGw4xlHgcH 2QcqjwU4v/2zvp+pooAaa6KR/hgEB1dFXGapBP6G923V2eJmS1JJUAqjsan12wKl+23f VvI6/dE0AYRhxpqhr+ViYvDPoS3OSCkX8/0yWp/KvPsjmHuvCX0rNRO/8x7X6ALr5TsD o/S1L6gaVpM3d09yTeqvs/bf3RGu2io4u2G1teXesb3w5dW3Q2be+y1WZqF7VjKD/Xtd hcAg== 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=g/M0VPQPCmDS/ThDDG7eh8tsIkYMa5f8AOpIimNMu0A=; b=R+njEtGyKiV7ZHWPdL9q1oMA7TljaUjjJFiF3ej7db0t+2Ixi9arJv08cLqURmB4F8 gJachV2rw2QmDbTA84d/mib4aYBJZYauyLobqH5s1APfINzbXyVc4MxPwcAuTHUlUpwU frLNnZXTS/CNwg8VqquAaEIseFR2NwBa7+PUlf0Wv7/3tVoX48P5UK/QYM+JWMyg6sYc fCC4nCZ/OGgUR/VUmZQ/MwFcA/P5suJ7UQROR8DuNQGzxDxG56iV4RtMmPBduid4051P 03+J7gJk6PFFyGgkLj8H6cU2Gd6WJQt9wcMnd+aOIpQ38XdjWKISGvFJ1WrrZDnX8fBX ZH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ES2SPPOy; 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 hs33si5896441ejc.549.2021.10.14.08.56.41; Thu, 14 Oct 2021 08:57:04 -0700 (PDT) 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=ES2SPPOy; 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 S231744AbhJNOv1 (ORCPT + 99 others); Thu, 14 Oct 2021 10:51:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:39658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231396AbhJNOv1 (ORCPT ); Thu, 14 Oct 2021 10:51:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BED29606A5; Thu, 14 Oct 2021 14:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634222962; bh=8qehXygtz+uMQbMsOlGXOq4amdYCvB24FnMrOuWFdGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ES2SPPOyBr+obO6gXcobl2iQRBJjIUgMedvY/1H5OnDGtsGfxuGFI4k/moWjvNG6X EISO1nlgOBpOypRGZHQMa4YGv5BLvxQ9kod0qAIckrMUH4T7K9Os8K0y1MTwRDzi6/ IuF3mU5DVtRwaXZZUvBcD+09vGXLwS9mYz3hZozk= Date: Thu, 14 Oct 2021 16:49:19 +0200 From: Greg KH To: Saurav Girepunje Cc: fabioaiuto83@gmail.com, ross.schm.dev@gmail.com, marcocesati@gmail.com, insafonov@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH v3] staging: rtl8723bs: os_dep: simplify the return statement 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 Thu, Oct 14, 2021 at 08:10:00PM +0530, Saurav Girepunje wrote: > Remove goto statement where function simply return value without doing > any cleanup action. > > Simplify the return using goto label to avoid unneeded 'if' condition > check. > > Remove the unneeded and redundant check of variable on goto. > > Remove the assignment of NULL on local variable. You are saying _what_ you are doing here, but not _why_ you are doing this. For example, this last sentance does not make sense, why would you want to do such a thing (hint, I know, but you need to explain it in the changelog...) It's getting better, but the changelog still needs work. Often times that's the hardest part of writing a kernel patch. thanks, greg k-h