Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp155484rwb; Wed, 28 Sep 2022 00:23:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4b3v/X+IqdnbhPsj992+pQEOGjBRGHWQCnzNmQwLIFVx7r0yCUm/ITXSMFbXi16lSQpO1r X-Received: by 2002:a05:6a00:d57:b0:541:987:1ced with SMTP id n23-20020a056a000d5700b0054109871cedmr32883263pfv.16.1664349825375; Wed, 28 Sep 2022 00:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664349825; cv=none; d=google.com; s=arc-20160816; b=JtftV473y/tttjbgzTGpWXrdQ43Fzk8exWalSogjPeM3AkcBrV5uyicwkMugPBFBcJ tnmJoxuaUkV1Vg+IiNW7HxlrbdW/toEfqiRTvd5gk/ae4oR8q+9TetyZ9XQY88pl4uWx C7qcurF70liSBErrpuzHF8icQxYrrJUEFKJKaDM2fpTY3ZJfnU3UZrkwE6b7CaWPpFQx TKXjFnCvw63m9/pkjIgbGJ5o8lNiqoLNhwRv8eNv6cEI6QkA2UXm/AmzCLCAHRAZJ98s tV+261fXkEnrRg9eBFFFjhsoJaGQSnf4unLz/1kLKbocQl4+sGa4chGeKNSRSZMi1cT8 bZPA== 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=Y6zUQ1QeMABO48yK91yy+7BFQ5QVaCICeA10q23nqLI=; b=DfBhJJWFb9t5Pk6qTT58zMHb8EW/zEEP8awXx1+7V1UprFL9rc90KtAtOhP2iy2cuy vdYkwNANaP+pAhiyjyG4fFREJlw6NVckXN9CLBB/kEZr0+ipmflt1TGOH7C4QGDvo1NE ArvyNiyqCp3hjsVNsvuUrApTuWk38nQ82vef1GYISOfHvsHz8FnYh+eAXn4NHm2ONj16 OsjDkJM1MhH8OMyuWkl8kDBY2+m1tMdwSOVyoQPYWi4tdnW3SjLzD+54JPqpjKw71Huo 0k7l6CdtyDnTZRpbSUo22wXehPHAD6UoJVTtBqwcmhw2oU2GQUZaz3pDJAUA12WuZ8Hr cPfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JCpJ519b; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot17-20020a17090b3b5100b001f2a654d564si1640935pjb.16.2022.09.28.00.23.17; Wed, 28 Sep 2022 00:23:45 -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=@redhat.com header.s=mimecast20190719 header.b=JCpJ519b; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233260AbiI1Gu7 (ORCPT + 99 others); Wed, 28 Sep 2022 02:50:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233289AbiI1GuN (ORCPT ); Wed, 28 Sep 2022 02:50:13 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC181128 for ; Tue, 27 Sep 2022 23:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664347742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Y6zUQ1QeMABO48yK91yy+7BFQ5QVaCICeA10q23nqLI=; b=JCpJ519bqqMtxTq3XqcX9c6IePAjBmVXdl8DHH1LKhtNmzq27d2FnP0QaPWeha+xl67nc0 VcksHIWD1wwjaJyX5dq3iMS8YRFXqmwMtUKuikijxG498culhAzJxwmOD/wyS2wntk/DCT wyqO130ItB+56E6vS9XYbsMtEVWx9lo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-nxBisCmmNtS3aDH23RHAfw-1; Wed, 28 Sep 2022 02:48:58 -0400 X-MC-Unique: nxBisCmmNtS3aDH23RHAfw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB28E85A5A6; Wed, 28 Sep 2022 06:48:57 +0000 (UTC) Received: from localhost (ovpn-13-211.pek2.redhat.com [10.72.13.211]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 961F82024CB7; Wed, 28 Sep 2022 06:48:56 +0000 (UTC) Date: Wed, 28 Sep 2022 14:48:53 +0800 From: Baoquan He To: cgel.zte@gmail.com Cc: ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, ye xingchen , Zeal Robot Subject: Re: [PATCH linux-next] kexec: Remove the unneeded result variable Message-ID: References: <20220908010352.342820-1-ye.xingchen@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220908010352.342820-1-ye.xingchen@zte.com.cn> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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 On 09/08/22 at 01:03am, cgel.zte@gmail.com wrote: > From: ye xingchen > > Return the value kimage_add_entry() directly instead of storing it in > another redundant variable. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen LGTM, Acked-by: Baoquan He > --- > kernel/kexec_core.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c > index ca2743f9c634..969e8f52f7da 100644 > --- a/kernel/kexec_core.c > +++ b/kernel/kexec_core.c > @@ -561,23 +561,17 @@ static int kimage_add_entry(struct kimage *image, kimage_entry_t entry) > static int kimage_set_destination(struct kimage *image, > unsigned long destination) > { > - int result; > - > destination &= PAGE_MASK; > - result = kimage_add_entry(image, destination | IND_DESTINATION); > > - return result; > + return kimage_add_entry(image, destination | IND_DESTINATION); > } > > > static int kimage_add_page(struct kimage *image, unsigned long page) > { > - int result; > - > page &= PAGE_MASK; > - result = kimage_add_entry(image, page | IND_SOURCE); > > - return result; > + return kimage_add_entry(image, page | IND_SOURCE); > } > > > -- > 2.25.1 >