Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3438728pxv; Mon, 28 Jun 2021 04:42:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaNE59HlBFDgyffLgcPGOSFcWU8TtkmpZVdTZp+rSPSOetEdTGHTd6mcYqcXbJza8Cgxba X-Received: by 2002:a17:907:62a7:: with SMTP id nd39mr23995709ejc.502.1624880538457; Mon, 28 Jun 2021 04:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624880538; cv=none; d=google.com; s=arc-20160816; b=eUuLSbjqesBdLcYLoBKx2SwQ7LF0PxPadTStD3UpoyikiEXRiM28EnekTeLZoqbUT8 fmjIA49xLBfBS8TUk9wQB2nB53FYNITFAdtCQuRTyOJT+XU+mrmRW6DqYH1Bo+YJ2DH/ UIp+PgK6BifVHidITWlX9attBG8an6/ZzUQHnSgdHMfoxvEFIA/LvPE+JkKZeDZmdjMs 9ZmkYaWUTBffjq56wSziVdHJYg49dqDYeQdP396uRJATghYCyAevbUyhBBvHLBm01cdX AghKl1JbeczsT3C/UPO2gM26H10W1wRuTr7ef81/hA7acZsRoD695mDhQzuGiMIH10q6 1IoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to:dkim-signature; bh=+Rz0FDG7okXfz3p3qC4lEED6Rmq8Z0icRIXmiilTH8k=; b=jRTp5PwjsWO6c1NV69Ka4PCSd7uf73P2MXHJOZjfU1iBKC0RFmKlIRaNV5K+HmWxK8 TxrKyV+BYYaVbx10WcJ4JYa4yrcA8zyvcI0qawqrSR/Kxq15NMAoqDzFWgWqlxYYFrjW umy0IPbUcmlM0qEqEp7DMb0dRB0mvK2C9JW4z01hGY+ygfmUeAJxeZ84dDsj5fxfz+wn 2NxqxhP+tb2xJEbGOQkBtmNbF9YsgO/j0Y+g9Vrl7zXw+hrLbBuzi0f+2mV6nEfcCrTV fFP5rxbRrPF6XjSbnp+BRAb8r0adICYT7afNiiqTsqezB3kGao+VYsdDLdw22eCkaTer SlQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=GO0RHG3V; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si14457859edy.85.2021.06.28.04.41.54; Mon, 28 Jun 2021 04:42:18 -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=@gmx.net header.s=badeba3b8450 header.b=GO0RHG3V; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbhF1Llv (ORCPT + 99 others); Mon, 28 Jun 2021 07:41:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:35287 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbhF1Llt (ORCPT ); Mon, 28 Jun 2021 07:41:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624880317; bh=00G7pzR1O9LgCBM7CPR6hiHOXgoARTMTk2Q1Z8dY/SY=; h=X-UI-Sender-Class:To:References:From:Subject:Date:In-Reply-To; b=GO0RHG3VZRfL5Pzr7ZNlpYaW8LfPDxEjvHKW+C2dnhcusSFnFLKLhPEM3GuY/m0qc FtJIPSnzvyfMHuiLNv3x9ij29vgOWcT5b6jE+UNcWCA1dLF1mSqE6nNI4oDKXVxM0f t0sb8fI0uAtPJsAfJayMVSBBQBK9m+i2NBhu5Dzk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1N3KTo-1lGHaI2TlS-010MPK; Mon, 28 Jun 2021 13:38:37 +0200 To: 13145886936@163.com, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, gushengxian References: <20210628083050.5302-1-13145886936@163.com> From: Qu Wenruo Subject: Re: [PATCH] btrfs: remove unneeded variable: "ret" Message-ID: <0220a6b0-a948-daa3-331e-1332588057e9@gmx.com> Date: Mon, 28 Jun 2021 19:38:33 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210628083050.5302-1-13145886936@163.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:cAubsysGtGV03CoD+DkB53fjInzdFpm4lB5hSQ28jADKa4bZoaT 85A1bXajtVYGlK570yt3tDL5bCamEjsMlEdbusnlfSvpfuqnUl8v9JLsVQKnIwq/UhZJJyA eFd79N4ok/GWNCKNqsIuE5xbZjYiICaDYei+G0h6QG95Z4iNrqkR7KMD6YLLr25zi5W7eIQ YKjYRKQALjoyTMxogeokQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nNAC8qQi56A=:I9IZBgeEvImvPX96jiUo85 SqTzTuYnFRdscy7QajwIrgPBUDBFnQM4Ff1iulPft710X2psdFhNnfmy5PIDQDx6hC2nzzvo8 qDIOO3mHlzjZt7d6dB8CvmlCJyw9nlVdEiRFfcejzhZ/PZoTENpZ39FYklkDRbgM8YfYkRfQm qoJoDAen31zTRtcITrXg6MVS0Yf2NxZ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wrote: > From: gushengxian > > Remove unneeded variable: "ret". Considering you're really a newbie doing new contribution to the kernel, I think it's better to give you some advice to encourage you do more contribution, while also be more professional, and hopefully to help other individuals in your company to contribute. And I hope this could also be some guide for new developers to learn a trick or two from. =3D=3D=3D WHEN NOT SURE, LEARN FROM OTHERS =3D=3D=3D First thing first, if you have something not sure, like how you should setup your name and email in your git config, try to find some merged patches to learn from them. =3D=3D=3D EMAIL ADDRESS =3D=3D=3D Firstly, your mail is sent from your 163 mail box, not your company mail box. Peter Zijlstra has already mentioned this in another patch. Normally if you want to send a patch to represent your company, it's common to send using a mail address of your company "@yulong.com" (Isn't it called Coolpad Group nowadays?) For how to configure git-send-email to use the SMTP server of your company, I guess your colleague Hu Yue has more experience and you can definitely learn from him. If you want to the patch to be CCed to your personal mail box, you can use "--cc" option of git-send-email, as most reviewer just reply-to-all, thus your personal mail box will definite get the comment. This will make the SOB line much cleaner. =3D=3D=3D MAIL LIST =3D=3D=3D This is not a big deal, just something optional but really helpful for your next contribution. In this particular patch, you only need to send the patch to btrfs mail list , even no need to CC the maintainers. LKML is fine for your first several patches to get more comments, like this one. But when you get settled to a certain field of kernel, it's better just to send the patch to the related mail list. =3D=3D=3D FOR THE CLEANUP =3D=3D=3D As I mentioned in another thread, if you use some automatic tool or script to expose the problem, that's fine. But it would be even better to provide the tool. Fix one small problem is OK, but fixing a type of problems is really what we want. If you really just found the bug by manually scanning the code, kudos to you. But if you do more contribution, one day your time will be too precious to be spent on things like this. Just like an old Chinese saying, give a man a fish, and you feed him for a day, teach a man to finish, and you feed him for a lifetime. And since the patch itself is fine. Reviewed-by: Qu Wenruo And really hope you can do more and better contribution to linux kernel. Thanks, Qu > > Signed-off-by: gushengxian <13145886936@163.com> > Signed-off-by: gushengxian > --- > fs/btrfs/disk-io.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index b117dd3b8172..7e65a54b7839 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -4624,7 +4624,6 @@ static int btrfs_destroy_delayed_refs(struct btrfs= _transaction *trans, > struct rb_node *node; > struct btrfs_delayed_ref_root *delayed_refs; > struct btrfs_delayed_ref_node *ref; > - int ret =3D 0; > > delayed_refs =3D &trans->delayed_refs; > > @@ -4632,7 +4631,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs= _transaction *trans, > if (atomic_read(&delayed_refs->num_entries) =3D=3D 0) { > spin_unlock(&delayed_refs->lock); > btrfs_debug(fs_info, "delayed_refs has NO entry"); > - return ret; > + return 0; > } > > while ((node =3D rb_first_cached(&delayed_refs->href_root)) !=3D NULL= ) { > @@ -4695,7 +4694,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs= _transaction *trans, > > spin_unlock(&delayed_refs->lock); > > - return ret; > + return 0; > } > > static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root) >