Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2674406rwb; Mon, 19 Sep 2022 08:21:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/AoQedvqhhDhACHVs0fiLtCict2NWcF7XmlP8yHf47cAq/tUx4+YnXvwKhT54t2ojYgYo X-Received: by 2002:a17:903:32c2:b0:178:2ca7:fade with SMTP id i2-20020a17090332c200b001782ca7fademr249131plr.71.1663600891845; Mon, 19 Sep 2022 08:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663600891; cv=none; d=google.com; s=arc-20160816; b=AD/RpwPxeyBCz7JwMk10lyjcUODDY4ihCDW25hSMNlvrLMs3qC5vio5QyVeM3M9s37 fI0lIAuXkw8I2nkWXHbpTK87zECuL31VT9Km0eYKBB6v+kBrm7KHEtH4oS/GuhIzUhMZ LSPn6TKyHpBFYMHlJGNkpCErsKlRbsHdKwGM9SNRUGcudrefKdexuHFI8KLda15BrWMa +gQVChT+XCuSK+PyUbuLwK4X5HkmzQrxdkOrU9RyFjN3ar7G1e0MtjZBivsFEiIG4AjZ vXVTfY7+1a3aA7nuWoNWWme7pnPgwbfBEm+PJ4vqZE7do/r6VxQZTcH7D/0Ttll63D/e DABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6kXjt9klxOIJxkIvtVJsSintQwVu+1ck8KoWsUDYBGo=; b=nfabPjmu42fhsmFi23gUckvAJmcVStnAPpswtvEGiKoNFP3KvIB3Sub3GKtCjweu83 5/oUh9HAorw1XhriAtAWBRD3ZJq/escwsV0qeiqYKPwkWVHwwgynfJpyZiGyggvVnx+b 69Q3Znu8HNE7/iqyzPQf4YU/L2nHJDfdS3owydH8Bs0qCGpkINKF2BDRneVXDbuhMmq5 /y3OU5ia6vYcoT3rbau8VmFEbXVUxv9UKjzBam57cS2C9MnKx+rBOWaT0+dJSHpg26Y5 ZvSURFssXi3+xQjCG5zuQVFNZ2+owchJcs73dt92c5Hz/FXyLgLT9bIkfQ3+p5JAj0bj 9S0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a63ce0e000000b0041b64ff7fd9si30843857pgf.517.2022.09.19.08.21.20; Mon, 19 Sep 2022 08:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbiISPMP (ORCPT + 99 others); Mon, 19 Sep 2022 11:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiISPMO (ORCPT ); Mon, 19 Sep 2022 11:12:14 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767A82A712 for ; Mon, 19 Sep 2022 08:12:12 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VQEvWFT_1663600327; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VQEvWFT_1663600327) by smtp.aliyun-inc.com; Mon, 19 Sep 2022 23:12:08 +0800 From: Xin Hao To: sj@kernel.org Cc: akpm@linux-foundation.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xhao@linux.alibaba.com Subject: [PATCH v1 1/2] mm/damon/sysfs: remove unnecessary variables Date: Mon, 19 Sep 2022 23:12:00 +0800 Message-Id: <20220919151201.66696-1-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just do a little change here, the 'err' variable really no need to stay here. Signed-off-by: Xin Hao --- mm/damon/sysfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c index 0cca1909bf67..b852a75b9f39 100644 --- a/mm/damon/sysfs.c +++ b/mm/damon/sysfs.c @@ -1109,9 +1109,8 @@ static ssize_t start_store(struct kobject *kobj, struct kobj_attribute *attr, { struct damon_sysfs_region *region = container_of(kobj, struct damon_sysfs_region, kobj); - int err = kstrtoul(buf, 0, ®ion->start); - if (err) + if (kstrtoul(buf, 0, ®ion->start)) return -EINVAL; return count; } @@ -1130,9 +1129,8 @@ static ssize_t end_store(struct kobject *kobj, struct kobj_attribute *attr, { struct damon_sysfs_region *region = container_of(kobj, struct damon_sysfs_region, kobj); - int err = kstrtoul(buf, 0, ®ion->end); - if (err) + if (kstrtoul(buf, 0, ®ion->end)) return -EINVAL; return count; } -- 2.31.0