Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3401583rwa; Tue, 23 Aug 2022 04:17:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR471VW4A3bksbAoYj9UZeoKAldVyZ7oqsxvTbmFPzOTa8tq7iV6S3MzoUyst/UdxHEgeOo3 X-Received: by 2002:a63:5c26:0:b0:429:fe34:2944 with SMTP id q38-20020a635c26000000b00429fe342944mr20089966pgb.354.1661253451645; Tue, 23 Aug 2022 04:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253451; cv=none; d=google.com; s=arc-20160816; b=LrV+FSNoIbT4RO0bv+GV2ghRlqAOPTXHFAE5tOuf3vjNgghDIltszDlObmF/hFip2j wW9gXZ8M4IHEkx6jOJsjlC6N7mV1JrduN5xwEYA4Gqk8SCgE7KmDKJjslYJE37JzwIFU A3KuS/0DS8wYwGdZMZtc8PW7L852MQ6+ciz7lDpUtDy8hjE78xiGUvAARzMsffVaShKq J9Rc8nomBKNdFIq4JrQjnuyZW4OpS0HLEne8H8EY2kxzLnjf1/hyRIprkuAz3+5/XpuF imLyjfMCHHUk/6C5GG3IjbKnNBcfodsMF86Fr35qz5+cQ7ICNi8FPjOXHPLsA/+vsYFt 1mXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=y2+gfSM2pVPpDUIFDptSeizvM7Y4XC7yjqvLtiCZN3I=; b=XJfCYOIo4Rjm0R4n6xCCzNK/2hhBBo6xHQEPN+mvQbC8PwHRFPSZZP2ddhujeHRDjQ HRhskwkLbBQxprIQLfhx3X/iQiAwbrBzwtsdYZEs9tqhdpHbaCPhnCzNBI48TQpLEiJJ 2iZdY3PMvL3A2kOnNMEeqqQiqbWMZg7Tkwu7nX5FZqf0DffQc9QOmW+LHJCT4jw3AYex DNon1oRKaQ219cgEbWYd++TY9tTHH6AKenQOMzfi8Qf7kPnvByI5YTb8fcteICyxqppk 3M50jKhN0P6UlFGDkJOkbLqtUyjikyBSwisd+m6gSc8tBgmJ13mLrBUl2cEWwuAHnorQ NJqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IHlPVqui; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q142-20020a632a94000000b0041bbcdeba6fsi15591918pgq.597.2022.08.23.04.17.20; Tue, 23 Aug 2022 04:17: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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IHlPVqui; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350718AbiHWJej (ORCPT + 99 others); Tue, 23 Aug 2022 05:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350666AbiHWJd5 (ORCPT ); Tue, 23 Aug 2022 05:33:57 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E72B9413C for ; Tue, 23 Aug 2022 01:39:05 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-33387bf0c4aso359963137b3.11 for ; Tue, 23 Aug 2022 01:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=y2+gfSM2pVPpDUIFDptSeizvM7Y4XC7yjqvLtiCZN3I=; b=IHlPVquiuZ906a77Ewu9nBq5xEoT22M9O+IkdFA/5OREtwtoXe/FJVKv9yNBqjKrcF 06DqztKqt0GY1oqa0NmpJpf13Lk36/LWlK3kt5OSrEfhUp7z1povhqQmlbr4fEvNhXwS QeJO/bNa4TCrVQy4VbzMMOtLVOXpsJz25LfzBe5V6JG0oY/mTEzkD1qcykJCtjcVtBP3 wyxgVQLDl/BhPn2UA0Hu3t+eP/pSWHouLIm4kfJxOHLysWKgrqpK1oZ8cCOq3U04czCN pVV0H8KvkALznMgqxvqab5t9uDV+wWBUnn+q+JLkKMTC7EaII35I4PdaTBKIFkdaTxqV 7OHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=y2+gfSM2pVPpDUIFDptSeizvM7Y4XC7yjqvLtiCZN3I=; b=Auu1w7m8DPTqxDjBcC2y3GNZ42Iw1MwNUNgj1j3QMCNUV+LFK4KXEcbV+ggPMsHVDs qxCZONoiFsOQzKobeqgA5au4Q7RsgjH9tU4NZSKKFD79DGgqhvGI2FjQ/CDoKnPLadmW /kst51TyuG1bxmpyHIRxiKKLeg44DMxfUhqWFKCPL4jt4Tr1Y2U5sZIQ0N+MuaP98jmB aycl8x1IfggzYdCyWwtz2/gRwvxSO/syj/goVHZLY2daTBBnsXB9B5vM+LM02ae1AVhM Rq0NyRjPxRiy2cwgiUhMf2D9I+1n9PQre7Yc1eIWVa1JP0ju3xw9LzJYKQJKl4ey9o/P p3JA== X-Gm-Message-State: ACgBeo3dRJWjpEYwykbfs7soc8E6tFBu0qwtqWbd8vclDm34xIe1HGoc Xy0keux6IlMOSL4Tm5AoQkeS6LUoY/C3VIClCGRkTuD6 X-Received: by 2002:a81:7c2:0:b0:335:90cb:1962 with SMTP id 185-20020a8107c2000000b0033590cb1962mr24531628ywh.173.1661243882670; Tue, 23 Aug 2022 01:38:02 -0700 (PDT) MIME-Version: 1.0 References: <20220823075241.209009-1-ye.xingchen@zte.com.cn> In-Reply-To: <20220823075241.209009-1-ye.xingchen@zte.com.cn> From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Tue, 23 Aug 2022 17:37:50 +0900 Message-ID: Subject: Re: [PATCH linux-next] mm/slab_common: Remove the unneeded result variable To: cgel.zte@gmail.com Cc: cl@linux.com, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ye xingchen , Zeal Robot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Aug 23, 2022 at 4:52 PM wrote: > > From: ye xingchen > > Return the value from __kmem_cache_shrink() directly instead of storing it > in another redundant variable. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen > --- > mm/slab_common.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/mm/slab_common.c b/mm/slab_common.c > index 17996649cfe3..0dfa3cfb6be5 100644 > --- a/mm/slab_common.c > +++ b/mm/slab_common.c > @@ -495,13 +495,9 @@ EXPORT_SYMBOL(kmem_cache_destroy); > */ > int kmem_cache_shrink(struct kmem_cache *cachep) > { > - int ret; > - > - > kasan_cache_shrink(cachep); > - ret = __kmem_cache_shrink(cachep); > > - return ret; > + return __kmem_cache_shrink(cachep); > } > EXPORT_SYMBOL(kmem_cache_shrink); > Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > -- > 2.25.1