Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5298921rwj; Wed, 21 Dec 2022 00:16:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXslUnbyvHyqzY+wf4OfTFefKFgwlPkLOTF1Gk4tlOMLJ+TbRlWOflOGZUshtFSA80pfmUZG X-Received: by 2002:a62:31c3:0:b0:574:c62c:2f55 with SMTP id x186-20020a6231c3000000b00574c62c2f55mr14212628pfx.3.1671610612994; Wed, 21 Dec 2022 00:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671610612; cv=none; d=google.com; s=arc-20160816; b=jE03ZK/u5S6b+JNIAmqu3hHKcisURGicZ1d9xmGVxAP0P8QQO6cO29fimh9za6Xm5m g5JG7Kj7AVS/jy680CZeTeTHNUX0Vc7UvWYxgm/cW+ujBGtHf13CUB5qPSY8EeZjeZWI RFTc0endeP9EVTY0HQJQIyLpspQLhnGJkM1AqBl8DCyGOHH7CDyQOFgWJs9sH0/BKQis ha4isNDsOEH2XtlXQM8sK3Yu8kC6nRdXFmt8gF+s1CCiBW5wI6WWXrJ9PHQk8prqAkq4 BvNydknf4Ks1aB6uMZpe6txsVLEFjUHwkExBmS6gQSUbdjKMAtEyj4wcLYr+KY973rIP +zFA== 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=YVmJkuC3yOgPgAzeVFQCBAXIsAOBoXhPj2fcENS00hc=; b=FgDLImg/KDUcaxbiUQS4u3DdrmbLXSfqslY+KnvItUB7w2112N0RFKDf8nJ7R/lci1 ISPIyahd4N5O8n/VSXEiNa1esrQGwg+/acVwAiuaWFj+n4TgHcELDf8okoBUQSAKrSG9 3tpqepWtwsg8kWNQj+0/oEMvJDa9omZqn2en0CYepy2rLcIXDLWIMztHYNFFAizBbKtq Q4yrHAaBzm7ttS7lJMId49BWthGvNouuXE6Dg8twenU9UsCMqcSC4WZlyDpd3YmAXuKU 99WUHoVXeiYtRo4VlJcgcFEI4NQvwgRhcIv+OVHKaKAz1COzGN/nbS51e8wW6kr4Rz4+ 2/lg== 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 s21-20020a056a00195500b0057e5373b7b8si1493213pfk.68.2022.12.21.00.16.43; Wed, 21 Dec 2022 00:16:52 -0800 (PST) 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 S234533AbiLUIDo (ORCPT + 69 others); Wed, 21 Dec 2022 03:03:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234450AbiLUIDZ (ORCPT ); Wed, 21 Dec 2022 03:03:25 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EA9D21881; Wed, 21 Dec 2022 00:03:19 -0800 (PST) Received: from kwepemm600002.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NcQrx22nnzmWjK; Wed, 21 Dec 2022 16:02:09 +0800 (CST) Received: from localhost.localdomain (10.175.127.227) by kwepemm600002.china.huawei.com (7.193.23.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 21 Dec 2022 16:03:16 +0800 From: Zhong Jinghua To: CC: , , , , Subject: [PATCH] blk-mq: cleanup unused methods: blk_mq_hw_sysfs_store Date: Wed, 21 Dec 2022 16:23:53 +0800 Message-ID: <20221221082353.732275-1-zhongjinghua@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600002.china.huawei.com (7.193.23.29) 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 We found that the blk_mq_hw_sysfs_store interface has no place to use. The object default_hw_ctx_attrs using blk_mq_hw_sysfs_ops only uses the show method and does not use the store method. Since this patch: 4a46f05ebf99 ("blk-mq: move hctx and ctx counters from sysfs to debugfs") moved the store method to debuffs, the store method is not used anymore. So let me do some tiny work to clean up unused code. Signed-off-by: Zhong Jinghua --- block/blk-mq-sysfs.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index 93997d297d42..40450e469ba6 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c @@ -70,28 +70,6 @@ static ssize_t blk_mq_hw_sysfs_show(struct kobject *kobj, return res; } -static ssize_t blk_mq_hw_sysfs_store(struct kobject *kobj, - struct attribute *attr, const char *page, - size_t length) -{ - struct blk_mq_hw_ctx_sysfs_entry *entry; - struct blk_mq_hw_ctx *hctx; - struct request_queue *q; - ssize_t res; - - entry = container_of(attr, struct blk_mq_hw_ctx_sysfs_entry, attr); - hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); - q = hctx->queue; - - if (!entry->store) - return -EIO; - - mutex_lock(&q->sysfs_lock); - res = entry->store(hctx, page, length); - mutex_unlock(&q->sysfs_lock); - return res; -} - static ssize_t blk_mq_hw_sysfs_nr_tags_show(struct blk_mq_hw_ctx *hctx, char *page) { @@ -150,7 +128,6 @@ ATTRIBUTE_GROUPS(default_hw_ctx); static const struct sysfs_ops blk_mq_hw_sysfs_ops = { .show = blk_mq_hw_sysfs_show, - .store = blk_mq_hw_sysfs_store, }; static struct kobj_type blk_mq_ktype = { -- 2.31.1