Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp628524rwb; Thu, 22 Sep 2022 04:36:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vqf6f7wInlMiqnO6zdpUJ8p2dd2ZAF2bAD8Y70lxdXd09qVvfYpzQx+S6sGkpNFsZBK24 X-Received: by 2002:a17:907:1b1f:b0:72f:56db:cce9 with SMTP id mp31-20020a1709071b1f00b0072f56dbcce9mr2275614ejc.605.1663846596331; Thu, 22 Sep 2022 04:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663846596; cv=none; d=google.com; s=arc-20160816; b=mCsN0TgcaEDbQ8dyHIAqpd3Jo+McsSw5VkuOLHMewsTb79F3BVLcmCJqhSC04F5yUh ZA1IPtNkNdnLbeVsM+pbmvJUBUjW4WQ43jtqW6dapz05QRyJylTfBl5/DN4TIrzts9GK 34NfW7mm7UVzhlZCMkYOWp7fmtBrCbetz/ws98CsFtg1HRXkDW/B4EHsG/P6iZO+q9Fe lbNJ6r96BkI8IhwWK6hpOKCJVV+jiiHmJJCRX3OpGnN1NHC7XT+/2aeeck5vtBw5N+gh ohZWotk5qN5cETpaj3QO2PfH0BGJBLQH+k86pqyseQQ9pAg+Xi1RUkHaz3v46lyuSm4d JIFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3WE81fkW2mEpRcHaRqj6DZ8c1qV2qvNqPFbh8tcNVUw=; b=sumAdfqCBjYeHlhD/ez7OOY46zaxbCgtt1LvG1MUB1KQn5UcccE4KtdCElaenKmLP7 O/5okiEkOv48oFcMAIthxiM3m0cUdf9AARMlRGqLji47qdep6+5wLgpZr5ze/Libe0n4 ej7qys5j8dBSBy44NzxBQ5rlMMiuAmjXVp/FVvP8qnzWmM3bO+ZhjKqocysBMa8jvZkP bvZd9PbHHfKhUBxlTgePfc3uz2xm1dOtHJopIEKnmJregCXsrJEzZHV4hMm1O2e8tW3d o20Z0OMeE9QXSyIlcpe/9vkVI4w9zOCnlMSgaQtZzzswlC2xL0LAb8Hfqp7sMiW/Wa73 whaw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a05640227ce00b004520b01a355si5847464ede.52.2022.09.22.04.36.09; Thu, 22 Sep 2022 04:36:36 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbiIVLZg (ORCPT + 99 others); Thu, 22 Sep 2022 07:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbiIVLZS (ORCPT ); Thu, 22 Sep 2022 07:25:18 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9C87AE9E3; Thu, 22 Sep 2022 04:25:16 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYCWN3jdRzMpM5; Thu, 22 Sep 2022 19:20:32 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 19:25:15 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 19:25:14 +0800 From: Yu Kuai To: , , CC: , , , , Subject: [PATCH v3 5/5] elevator: remove redundant code in elv_unregister_queue() Date: Thu, 22 Sep 2022 19:35:58 +0800 Message-ID: <20220922113558.1085314-6-yukuai3@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220922113558.1085314-1-yukuai3@huawei.com> References: <20220922113558.1085314-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 "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); } -- 2.31.1