Message ID | 20230214-kobj_type-dm-v1-1-f1e0ffee5373@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2746309wrn; Mon, 13 Feb 2023 20:04:27 -0800 (PST) X-Google-Smtp-Source: AK7set/e3VC2VSLkXl+QJQZ0qy9txpVNdVj8QElxLVdoihqX6llsUkFi4Ktj114rri/R7haXI1CS X-Received: by 2002:a50:a698:0:b0:4ab:b0d5:6bb0 with SMTP id e24-20020a50a698000000b004abb0d56bb0mr792200edc.18.1676347466834; Mon, 13 Feb 2023 20:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676347466; cv=none; d=google.com; s=arc-20160816; b=Z6VsPqpC8bjLbY1ezdANaApnprg6LUf+Y5UsSuPLIAxCYQ2b+/lYoL3U5VeMIH3U1W f4ARq6iMJsIpoNZe40cUYSf+TwrBZqb9a4eS/UK6/5RG8GAz74YFg4mcv5wiUE90CVyX wADxyMNUo2uwyNxzLL7qYZqGv4aFS+gAKtEL0DwD6lY3ktPSXG0+uMmyS/8+VQhAKLZF eW5RLiuD03Tc5PejcCwaeyo5UhdqhvKeyDhVxshnPfIntuRAyz9gR16KJnlidXk07LOm JCYNKGmJSdv6WwaKFVGBPw/c0l8OZMUiR61RJIMUiEaafB3T3eB4k8ypYpVv4V45tPYJ PT9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from; bh=iNJko5oYcMEDhfpo7CimMtUdap1GJco55V/SiqAb/OY=; b=T6TYji0BM8rqGUAYG36mYh8kN8b3wuqhtfanl/qTraoWRMjf+AepA3cofSh4WdaL6T XYL/JJ1f18QYRNk7xp1ae8Id+Nw+vfD5TIXUYXjlDBKekIKqgrLxBZm1NwPc3M8Q9Wqi A+f0Uz/wf8n/if5SE/MXq7QrasQPrHDwF/EYBrZl8k5zxHM0wsbsmN/IrIy109FikunN RzzgLq0b+QPSLfeNUZme/ghIjRRj04D7oG6idTIZDSPM42T+KqZOTpoz2yvHra6x3Jkr JzZj6VpHIGAyJ76nD6PkZ6tjq/5TRBelj/eEpp29VQGPgm3TavLazTeccDfkczRuDWtG 4oFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=uEkWon0w; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a17090692ca00b008775c0dd569si13325809ejx.418.2023.02.13.20.04.03; Mon, 13 Feb 2023 20:04:26 -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; dkim=fail header.i=@weissschuh.net header.s=mail header.b=uEkWon0w; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbjBNDVB (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Mon, 13 Feb 2023 22:21:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbjBNDU7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Feb 2023 22:20:59 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 065C2869C for <linux-kernel@vger.kernel.org>; Mon, 13 Feb 2023 19:20:59 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1676344857; bh=l509B6JSeU+8vu09VCB2XMYyL5OSKdktVVV0A47CNNk=; h=From:Date:Subject:To:Cc:From; b=uEkWon0wY3c84CDaPBZmrDpLx+9Y8KyUimc25s8XQcYA12YA5tTMm1yyQZFktGsUY 6uBLYcbaCFZZ1JD9F/ipnzthM6BhnlRRvVYzHOMxbqmapJoMhK9LhPUSDDqTQq6j1f kqmwymGc1Aeaq4pi3iX+A/KZu6nCbv7JtYD0xmQA= Date: Tue, 14 Feb 2023 03:20:55 +0000 Subject: [PATCH] dm sysfs: make kobj_type structure constant MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230214-kobj_type-dm-v1-1-f1e0ffee5373@weissschuh.net> X-B4-Tracking: v=1; b=H4sIABb+6mMC/x2NzQqDMBAGX0X23IUk/hx8lVJKol91rY2StKUiv rtLjzMwzE4ZSZCpLXZK+EqWJSrYS0Hd6OMAll6ZnHGlcbbi5xKm+3tbwf2LmwYBFpWpS0OaBJ/ BIfnYjRrFzzyrXBMe8vs/rrfjOAGEf9SNcwAAAA== To: Alasdair Kergon <agk@redhat.com>, Mike Snitzer <snitzer@kernel.org>, dm-devel@redhat.com Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676344855; l=991; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=l509B6JSeU+8vu09VCB2XMYyL5OSKdktVVV0A47CNNk=; b=t4RJry/Zs8Bb9v35RfLtQosyNKrTqcuQO9hoT/iSqbm11M1KXOcJVnjg9LN4Mfbo727DRCW5s bra94Dw7MyoD9+W42CErMJZLOtZ+dzTyGBA6k8njIZ6+8b9lw4ScigO X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757777721729357128?= X-GMAIL-MSGID: =?utf-8?q?1757777721729357128?= |
Series |
dm sysfs: make kobj_type structure constant
|
|
Commit Message
Thomas Weißschuh
Feb. 14, 2023, 3:20 a.m. UTC
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.
Take advantage of this to constify the structure definition to prevent
modification at runtime.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/md/dm-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: f6feea56f66d34259c4222fa02e8171c4f2673d1
change-id: 20230214-kobj_type-dm-66ebe1e40530
Best regards,
diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index e28c92478536..dc281162f1d4 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c @@ -119,7 +119,7 @@ static const struct sysfs_ops dm_sysfs_ops = { .store = dm_attr_store, }; -static struct kobj_type dm_ktype = { +static const struct kobj_type dm_ktype = { .sysfs_ops = &dm_sysfs_ops, .default_groups = dm_groups, .release = dm_kobject_release,