Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp404027rwb; Thu, 22 Sep 2022 20:52:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KbjKyl6A/6cvMOcCkN+ox3buAayGg0NO9EVYXR7aP7Kt0Wu8DUaz7fBJ51P3qydDldndH X-Received: by 2002:a05:6402:40c2:b0:44f:963d:1ab4 with SMTP id z2-20020a05640240c200b0044f963d1ab4mr6423155edb.319.1663905132045; Thu, 22 Sep 2022 20:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663905132; cv=none; d=google.com; s=arc-20160816; b=DEuQl4jYPnDHiMniqikTa30iGFXNZdr2s/HFcTbLZnqPPhXrJC3u6laCxuGfoZCXZr FeGTsGWAhpeNsYr9eDs6+hiL9fj6YtPbrIetsSoLiJtsTRCPnWHx/563eBoLmTvqNU2I CURy7SWL3bYFz/0pf0ZwdngJFn8l+5BP4YbMYkui6uF8ob0CPOd3DgpiEFaGNiZsAqWJ uKjS62IOxQHzMHuPzY9FAJ0wReywFOIAJ2fcZPAR7mrJW2zFMw0IZz0Dtz268eP8xDPK OTiKJLPsTRX8hwASMhNXC/kF2P1DID29m13+QVv1YTSBKggnqJFQTl8h0SdTGNbLaog0 j8dg== 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=KE136BbNdkNl2HyJayKE+Tc5l4HzdsFnkKgV+KcL0ks=; b=B1BJIAqtzpEPqejRDCQUtmVinrA6S1BMglQ9MbIYdOz+dCOlDOPH8YY/6FtLTKlQyL 9UJm8QmOdnVVa8kWfdWzChUxcGWjNRGvgiqWKgQCeIt7ajPpQTf/rZG8oKd/KVVn3k24 3/ApSKYyPFNVZ+tRMbpalPOFYnQL2OTyuIu8qsYzMswRXDPRm8Hjn2eXs+kxQipsc7pe hvIvi4m8O4kguM+NiMv/RQACxKP/fT2Hd9AQo6RhZsdQylDxLiAB0Ki47+19I3u7D2TJ naS7daLyX+s5LG+cx4oAxBuKHyDmuUzivcFoeVN36UTL71FZ386J4Q+rbr5hq3nZjsYd MvsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l4dbFjs1; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020aa7d2da000000b0045152c6304dsi5638645edr.225.2022.09.22.20.51.41; Thu, 22 Sep 2022 20:52:12 -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=@kernel.org header.s=k20201202 header.b=l4dbFjs1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbiIWDhU (ORCPT + 99 others); Thu, 22 Sep 2022 23:37:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiIWDhM (ORCPT ); Thu, 22 Sep 2022 23:37:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439C0DF04E; Thu, 22 Sep 2022 20:37:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D57EC60FBC; Fri, 23 Sep 2022 03:37:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F10E2C433C1; Fri, 23 Sep 2022 03:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663904230; bh=QmPpWXopgwAL7Zd/o9BkL4CFysr+ibZl4lTx3Cwj4jk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l4dbFjs1oyMJXwiwCltNONDBQKjZID3es7CHLiQ8jZF+fRgJ8CDpKbOQZ1O45BLCO MmNAChVSB5mmH1tr5QGDqkdQ9pqTlcawgEtYew3JClA0IUh2eEnT1oNSz0hkR98+JU A7OnpUAoy9jofoV/G3dUWAWnQdU5uwoQq9BdLYPYAcwt1BV7hTgPj/7Ry5F+bAfKnv sKkJnHbewEYUY85aITfJC6A1nnpxe7kUCXtehoB359a0HYqVm2dA+3N/kN0udxzpGL nfcbDcAl81OFcajInTCY9yDUUMubg/O35BjMi/AsZkzkqitpfpvLP2T2yrpYhyPy9Z LhLqbp70tiB3g== Date: Thu, 22 Sep 2022 20:37:08 -0700 From: Eric Biggers To: Yu Kuai Cc: jack@suse.cz, paolo.valente@linaro.org, axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai1@huaweicloud.com, yi.zhang@huawei.com Subject: Re: [PATCH v3 5/5] elevator: remove redundant code in elv_unregister_queue() Message-ID: References: <20220922113558.1085314-1-yukuai3@huawei.com> <20220922113558.1085314-6-yukuai3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220922113558.1085314-6-yukuai3@huawei.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Thu, Sep 22, 2022 at 07:35:58PM +0800, Yu Kuai wrote: > "elevator_queue *e" is already declared and initialized in the beginning > of elv_unregister_queue(). > > Signed-off-by: Yu Kuai > --- > block/elevator.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/block/elevator.c b/block/elevator.c > index 7cb61820cfa0..0a72d6fbbdcc 100644 > --- a/block/elevator.c > +++ b/block/elevator.c > @@ -524,8 +524,6 @@ void elv_unregister_queue(struct request_queue *q) > lockdep_assert_held(&q->sysfs_lock); > > if (e && test_and_clear_bit(ELEVATOR_FLAG_REGISTERED, &e->flags)) { > - struct elevator_queue *e = q->elevator; > - > kobject_uevent(&e->kobj, KOBJ_REMOVE); > kobject_del(&e->kobj); > } > -- Reviewed-by: Eric Biggers - Eric