From patchwork Fri Mar 10 22:40:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13170314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEED1C6FD19 for ; Fri, 10 Mar 2023 22:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230427AbjCJWkf (ORCPT ); Fri, 10 Mar 2023 17:40:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231681AbjCJWk3 (ORCPT ); Fri, 10 Mar 2023 17:40:29 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7338D12DDE2; Fri, 10 Mar 2023 14:40:22 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678488020; bh=nk1tYStc/zzpUi5AGWWqN1WDZEH5Vm0XZdrqk1ma6QA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lwWEYmoeA5l0k+a7OqgPVUExJxAu0/qPVX/T6s69SNvi9pknteXzI85IPj4MoXl+U AsMtu8W+sWPHuSP2Wdx2c6WBb64LvVA/kWo6c335kL/6RiWwMaLmv8cqGqnTeZX+yD 0Pjn4cRcJ6PGCt+0WzTko1jF97VOwp97lyMpeocE= Date: Fri, 10 Mar 2023 22:40:02 +0000 Subject: [PATCH v2 1/4] blk-integrity: use sysfs_emit MIME-Version: 1.0 Message-Id: <20230309-kobj_release-gendisk_integrity-v2-1-761a50d71900@weissschuh.net> References: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Martin K. Petersen" , =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678488015; l=2402; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=nk1tYStc/zzpUi5AGWWqN1WDZEH5Vm0XZdrqk1ma6QA=; b=A0U/T61qUiZ+MOyWS3HHovGCrry1hKKc5vALP14Kt9Yk8q8VAlXS9YRvG0Kqj18SJvubIdbOj qjwYYiHyRnFD7buy2DSglL6JHmjA7jYxHalKfhyk1s4FiHBHcwty+iZ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The correct way to emit data into sysfs is via sysfs_emit(), use it. Signed-off-by: Thomas Weißschuh --- block/blk-integrity.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 8f01d786f5cb..5dd820ee4d1c 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -248,20 +248,20 @@ static ssize_t integrity_attr_store(struct kobject *kobj, static ssize_t integrity_format_show(struct blk_integrity *bi, char *page) { if (bi->profile && bi->profile->name) - return sprintf(page, "%s\n", bi->profile->name); + return sysfs_emit(page, "%s\n", bi->profile->name); else - return sprintf(page, "none\n"); + return sysfs_emit(page, "none\n"); } static ssize_t integrity_tag_size_show(struct blk_integrity *bi, char *page) { - return sprintf(page, "%u\n", bi->tag_size); + return sysfs_emit(page, "%u\n", bi->tag_size); } static ssize_t integrity_interval_show(struct blk_integrity *bi, char *page) { - return sprintf(page, "%u\n", - bi->interval_exp ? 1 << bi->interval_exp : 0); + return sysfs_emit(page, "%u\n", + bi->interval_exp ? 1 << bi->interval_exp : 0); } static ssize_t integrity_verify_store(struct blk_integrity *bi, @@ -280,7 +280,7 @@ static ssize_t integrity_verify_store(struct blk_integrity *bi, static ssize_t integrity_verify_show(struct blk_integrity *bi, char *page) { - return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); + return sysfs_emit(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); } static ssize_t integrity_generate_store(struct blk_integrity *bi, @@ -299,13 +299,13 @@ static ssize_t integrity_generate_store(struct blk_integrity *bi, static ssize_t integrity_generate_show(struct blk_integrity *bi, char *page) { - return sprintf(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); + return sysfs_emit(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); } static ssize_t integrity_device_show(struct blk_integrity *bi, char *page) { - return sprintf(page, "%u\n", - (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE) != 0); + return sysfs_emit(page, "%u\n", + (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE) != 0); } static struct integrity_sysfs_entry integrity_format_entry = { From patchwork Fri Mar 10 22:40:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13170315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8BB5C6FD1E for ; Fri, 10 Mar 2023 22:40:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbjCJWkg (ORCPT ); Fri, 10 Mar 2023 17:40:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbjCJWka (ORCPT ); Fri, 10 Mar 2023 17:40:30 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7862C14416B; Fri, 10 Mar 2023 14:40:23 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678488021; bh=1YcGn9Ce/hGsN09h+fYjmhHySGAzKoYW3nej9+GPO+A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ehMMQbmvhDOxdGGCpMIJyGiUMN8zm+OrtLsSLxllebonTNUi8fvVneOvxdg80v0Yl SgyTcSxNtqf+DbrgMDGgbw3KsorNuCv3pMLOjb3e9Hs+Mo4gVWm+z1A17Q0w4k/Tst sl2PUuPisTqvmK3jJr7MKLM1AnCiK1EW987wW+yk= Date: Fri, 10 Mar 2023 22:40:03 +0000 Subject: [PATCH v2 2/4] blk-integrity: convert to struct device_attribute MIME-Version: 1.0 Message-Id: <20230309-kobj_release-gendisk_integrity-v2-2-761a50d71900@weissschuh.net> References: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Martin K. Petersen" , =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678488015; l=7077; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=1YcGn9Ce/hGsN09h+fYjmhHySGAzKoYW3nej9+GPO+A=; b=7Etw8djoaPtdrIKm3OVT2q7SotBvCDegYUPRFSiDPMfC9hhWUwB0GYOATMcRE+7eub9zkde39 4tKi/PXzvHmDEyLeppTaNpvScp1EHeX0/lQj+mQqRqud8DYGVk+4Z+V X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org An upcoming patch will register the integrity attributes directly with the struct device kobject. For this the attributes have to be implemented in terms of struct device_attribute. Signed-off-by: Thomas Weißschuh --- block/blk-integrity.c | 117 +++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 63 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 5dd820ee4d1c..e1c3e3591c82 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -212,21 +212,15 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, return true; } -struct integrity_sysfs_entry { - struct attribute attr; - ssize_t (*show)(struct blk_integrity *, char *); - ssize_t (*store)(struct blk_integrity *, const char *, size_t); -}; - static ssize_t integrity_attr_show(struct kobject *kobj, struct attribute *attr, char *page) { struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); - struct blk_integrity *bi = &disk->queue->integrity; - struct integrity_sysfs_entry *entry = - container_of(attr, struct integrity_sysfs_entry, attr); + struct device *dev = disk_to_dev(disk); + struct device_attribute *dev_attr = + container_of(attr, struct device_attribute, attr); - return entry->show(bi, page); + return dev_attr->show(dev, dev_attr, page); } static ssize_t integrity_attr_store(struct kobject *kobj, @@ -234,39 +228,52 @@ static ssize_t integrity_attr_store(struct kobject *kobj, size_t count) { struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); - struct blk_integrity *bi = &disk->queue->integrity; - struct integrity_sysfs_entry *entry = - container_of(attr, struct integrity_sysfs_entry, attr); + struct device *dev = disk_to_dev(disk); + struct device_attribute *dev_attr = + container_of(attr, struct device_attribute, attr); ssize_t ret = 0; - if (entry->store) - ret = entry->store(bi, page, count); + if (dev_attr->store) + ret = dev_attr->store(dev, dev_attr, page, count); return ret; } -static ssize_t integrity_format_show(struct blk_integrity *bi, char *page) +static inline struct blk_integrity *dev_to_bi(struct device *dev) +{ + return &dev_to_disk(dev)->queue->integrity; +} + +static ssize_t format_show(struct device *dev, struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + if (bi->profile && bi->profile->name) return sysfs_emit(page, "%s\n", bi->profile->name); else return sysfs_emit(page, "none\n"); } -static ssize_t integrity_tag_size_show(struct blk_integrity *bi, char *page) +static ssize_t tag_size_show(struct device *dev, struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + return sysfs_emit(page, "%u\n", bi->tag_size); } -static ssize_t integrity_interval_show(struct blk_integrity *bi, char *page) +static ssize_t protection_interval_bytes_show(struct device *dev, + struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + return sysfs_emit(page, "%u\n", bi->interval_exp ? 1 << bi->interval_exp : 0); } -static ssize_t integrity_verify_store(struct blk_integrity *bi, - const char *page, size_t count) +static ssize_t read_verify_store(struct device *dev, struct device_attribute *attr, + const char *page, size_t count) { + struct blk_integrity *bi = dev_to_bi(dev); char *p = (char *) page; unsigned long val = simple_strtoul(p, &p, 10); @@ -278,14 +285,18 @@ static ssize_t integrity_verify_store(struct blk_integrity *bi, return count; } -static ssize_t integrity_verify_show(struct blk_integrity *bi, char *page) +static ssize_t read_verify_show(struct device *dev, struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + return sysfs_emit(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0); } -static ssize_t integrity_generate_store(struct blk_integrity *bi, - const char *page, size_t count) +static ssize_t write_generate_store(struct device *dev, struct device_attribute *attr, + const char *page, size_t count) { + struct blk_integrity *bi = dev_to_bi(dev); + char *p = (char *) page; unsigned long val = simple_strtoul(p, &p, 10); @@ -297,57 +308,37 @@ static ssize_t integrity_generate_store(struct blk_integrity *bi, return count; } -static ssize_t integrity_generate_show(struct blk_integrity *bi, char *page) +static ssize_t write_generate_show(struct device *dev, struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + return sysfs_emit(page, "%d\n", (bi->flags & BLK_INTEGRITY_GENERATE) != 0); } -static ssize_t integrity_device_show(struct blk_integrity *bi, char *page) +static ssize_t device_is_integrity_capable_show(struct device *dev, + struct device_attribute *attr, char *page) { + struct blk_integrity *bi = dev_to_bi(dev); + return sysfs_emit(page, "%u\n", (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE) != 0); } -static struct integrity_sysfs_entry integrity_format_entry = { - .attr = { .name = "format", .mode = 0444 }, - .show = integrity_format_show, -}; - -static struct integrity_sysfs_entry integrity_tag_size_entry = { - .attr = { .name = "tag_size", .mode = 0444 }, - .show = integrity_tag_size_show, -}; - -static struct integrity_sysfs_entry integrity_interval_entry = { - .attr = { .name = "protection_interval_bytes", .mode = 0444 }, - .show = integrity_interval_show, -}; - -static struct integrity_sysfs_entry integrity_verify_entry = { - .attr = { .name = "read_verify", .mode = 0644 }, - .show = integrity_verify_show, - .store = integrity_verify_store, -}; - -static struct integrity_sysfs_entry integrity_generate_entry = { - .attr = { .name = "write_generate", .mode = 0644 }, - .show = integrity_generate_show, - .store = integrity_generate_store, -}; - -static struct integrity_sysfs_entry integrity_device_entry = { - .attr = { .name = "device_is_integrity_capable", .mode = 0444 }, - .show = integrity_device_show, -}; +static DEVICE_ATTR_RO(format); +static DEVICE_ATTR_RO(tag_size); +static DEVICE_ATTR_RO(protection_interval_bytes); +static DEVICE_ATTR_RW(read_verify); +static DEVICE_ATTR_RW(write_generate); +static DEVICE_ATTR_RO(device_is_integrity_capable); static struct attribute *integrity_attrs[] = { - &integrity_format_entry.attr, - &integrity_tag_size_entry.attr, - &integrity_interval_entry.attr, - &integrity_verify_entry.attr, - &integrity_generate_entry.attr, - &integrity_device_entry.attr, - NULL, + &dev_attr_format.attr, + &dev_attr_tag_size.attr, + &dev_attr_protection_interval_bytes.attr, + &dev_attr_read_verify.attr, + &dev_attr_write_generate.attr, + &dev_attr_device_is_integrity_capable.attr, + NULL }; ATTRIBUTE_GROUPS(integrity); From patchwork Fri Mar 10 22:40:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13170316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C2FC6FA99 for ; Fri, 10 Mar 2023 22:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbjCJWkh (ORCPT ); Fri, 10 Mar 2023 17:40:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231328AbjCJWkb (ORCPT ); Fri, 10 Mar 2023 17:40:31 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50A0712CBC2; Fri, 10 Mar 2023 14:40:25 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678488023; bh=+UTAaXGkgmAmWSjDuYQAkSUNuPdrcalL9bcOhrDdMuQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OQ8tyTwN5R40txrQUsBdTu+rcZWbmZoMOeUNXbMCOjhN1/Sg2FGZjL0FyEoNZorJ/ Ycuu5chL06HeN493xHqo2z04KS6fGv0omZs//xzjERvkfVZh/DBMIUUqxVrqxo2nII Tqupoqaog3m/qGvvdxjSvEv45axu/YoAhEJyfpEs= Date: Fri, 10 Mar 2023 22:40:04 +0000 Subject: [PATCH v2 3/4] blk-integrity: register sysfs attributes on struct device MIME-Version: 1.0 Message-Id: <20230309-kobj_release-gendisk_integrity-v2-3-761a50d71900@weissschuh.net> References: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Martin K. Petersen" , =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678488015; l=3028; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=+UTAaXGkgmAmWSjDuYQAkSUNuPdrcalL9bcOhrDdMuQ=; b=hIgrVmHSDQ+sqtFKQql3Y2uN1i1jm49G9gDuB+fGgjgl9Jsi8TneswZKYnJ8fb+C5fSEfSL6B VgguqewROs8ALZ/5NzMxCF4hJahwRwF0Jn09Ryc70BtzlxVjdWvuf/S X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The "integrity" kobject only acted as a holder for static sysfs entries. It also was embedded into struct gendisk without managing it, violating assumptions of the driver core. Instead register the sysfs entries directly onto the struct device. Signed-off-by: Thomas Weißschuh --- block/blk-integrity.c | 50 +++++--------------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/block/blk-integrity.c b/block/blk-integrity.c index e1c3e3591c82..79eb21482036 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -212,33 +212,6 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req, return true; } -static ssize_t integrity_attr_show(struct kobject *kobj, struct attribute *attr, - char *page) -{ - struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); - struct device *dev = disk_to_dev(disk); - struct device_attribute *dev_attr = - container_of(attr, struct device_attribute, attr); - - return dev_attr->show(dev, dev_attr, page); -} - -static ssize_t integrity_attr_store(struct kobject *kobj, - struct attribute *attr, const char *page, - size_t count) -{ - struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); - struct device *dev = disk_to_dev(disk); - struct device_attribute *dev_attr = - container_of(attr, struct device_attribute, attr); - ssize_t ret = 0; - - if (dev_attr->store) - ret = dev_attr->store(dev, dev_attr, page, count); - - return ret; -} - static inline struct blk_integrity *dev_to_bi(struct device *dev) { return &dev_to_disk(dev)->queue->integrity; @@ -340,17 +313,12 @@ static struct attribute *integrity_attrs[] = { &dev_attr_device_is_integrity_capable.attr, NULL }; -ATTRIBUTE_GROUPS(integrity); -static const struct sysfs_ops integrity_ops = { - .show = &integrity_attr_show, - .store = &integrity_attr_store, +static const struct attribute_group integrity_group = { + .name = "integrity", .attrs = integrity_attrs, }; -static const struct kobj_type integrity_ktype = { - .default_groups = integrity_groups, - .sysfs_ops = &integrity_ops, -}; +__ATTRIBUTE_GROUPS(integrity); static blk_status_t blk_integrity_nop_fn(struct blk_integrity_iter *iter) { @@ -431,18 +399,10 @@ EXPORT_SYMBOL(blk_integrity_unregister); int blk_integrity_add(struct gendisk *disk) { - int ret; - - ret = kobject_init_and_add(&disk->integrity_kobj, &integrity_ktype, - &disk_to_dev(disk)->kobj, "%s", "integrity"); - if (!ret) - kobject_uevent(&disk->integrity_kobj, KOBJ_ADD); - return ret; + return device_add_groups(disk_to_dev(disk), integrity_groups); } void blk_integrity_del(struct gendisk *disk) { - kobject_uevent(&disk->integrity_kobj, KOBJ_REMOVE); - kobject_del(&disk->integrity_kobj); - kobject_put(&disk->integrity_kobj); + device_remove_groups(disk_to_dev(disk), integrity_groups); } From patchwork Fri Mar 10 22:40:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13170312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C7A9C6FA99 for ; Fri, 10 Mar 2023 22:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231496AbjCJWkd (ORCPT ); Fri, 10 Mar 2023 17:40:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231616AbjCJWk1 (ORCPT ); Fri, 10 Mar 2023 17:40:27 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 749EB12DDEF; Fri, 10 Mar 2023 14:40:22 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678488020; bh=LhiQNQDzGsVSilvdHxI2IkQhBsPFCK1RowivwifIxYg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sE22RVsHgnpqRoENj8xKSVxDb2gLhErFnxi24EOtLc5snn2SPouPKXHI1+QZeTMwc Tmin05cTU2K/1qp6kH/cc/4EEeBFI/pwWSi/yw8oysroY7SEWHU7ebJzUXq0dLKY5E WBa77Ug9kJYI/0rNqoh+944i97WJC+wQ7jCDMRfE= Date: Fri, 10 Mar 2023 22:40:05 +0000 Subject: [PATCH v2 4/4] blk-integrity: drop integrity_kobj from gendisk MIME-Version: 1.0 Message-Id: <20230309-kobj_release-gendisk_integrity-v2-4-761a50d71900@weissschuh.net> References: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Martin K. Petersen" , =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678488015; l=688; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=LhiQNQDzGsVSilvdHxI2IkQhBsPFCK1RowivwifIxYg=; b=ws/Wvfp/YWGMguSZpa/0eVK1Y4chRivP0mRHGaoxtKT2wcJAWRAh4rzknNcDs85r+jURGecyF N6tZ3b6U93xD2Yt5BoOJT7vvlBNRO3UdsEN1iErpgkLDTPMMzK7+VJ2 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The previous patches made the integrity_kobj member in struct gendisk superfluous, remove it. Signed-off-by: Thomas Weißschuh --- include/linux/blkdev.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d1aee08f8c18..b5bc85c3166f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -163,9 +163,6 @@ struct gendisk { struct timer_rand_state *random; atomic_t sync_io; /* RAID */ struct disk_events *ev; -#ifdef CONFIG_BLK_DEV_INTEGRITY - struct kobject integrity_kobj; -#endif /* CONFIG_BLK_DEV_INTEGRITY */ #ifdef CONFIG_BLK_DEV_ZONED /*