Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp273002rwr; Wed, 19 Apr 2023 06:26:20 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+sjvZh/QOesch8OM34a1yf5viRqbMunxRvqXndBaY2fJWOjVnJM0HaBJCQatkQpWPgKxV X-Received: by 2002:a17:902:d08a:b0:1a4:fae1:d6b0 with SMTP id v10-20020a170902d08a00b001a4fae1d6b0mr4910327plv.28.1681910780625; Wed, 19 Apr 2023 06:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681910780; cv=none; d=google.com; s=arc-20160816; b=O8q8mTyvLNHTFD6RM8RQFRJ6kXGTMXOHOPJ3sZynQKxJCGR5FupmK/8mfHN9vcJioe SF/c2ZJPx/UIhmD8bvbRrfdJVXfTOBfkLymfgUs/uMwjOmUPtRo4j6s3Erz/qQSXxyvf lG0AOx7zoyg/G4bivscrgA1js2B4tfA3oJYCRs7gUWp2RrOKEhYaoHCPYMFcmbUYGQOv EfeRklzfJFGnCzDZ8JRa7A95wRWSe7SF3839XhaMw9Or0JEOzL5DRKqkJZWNxj/+2tEJ yKm/y/Gu2nwzWmMLqtc5uBI4MA83CBrAl2MMhFuNiPI/uaeF8k3WxcockFmXr/Xsyqi/ Li+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=z49Km5ll8k8olDC8BRch1bEpXe2hqK8RC88SgEAic+E=; b=ZM+0creWTqDm2rF8yuGA2Z4etu2Ed6w3fliBidsim687ihz9k3RXRPcuYPOnS6L2/Q MZVfVizRjAUGYVGDoqgkX3VN0PKm70DJTJ7qnAVwAMxdbQHbiPaSPlfDupOm2SoGhgTS DK7zMbxgNkofobDaVJyQKccfbK37Ctgr9M+0kHULgbvEhFNMXGAJEclk6k6C9aHhX6gA zJeo7xi6L0r1d/exksNjcr9kFWmYzV3wvU53MqW3NQsSAge9DPYUXGs/GsTgM2LX078P t9RXYjScHZwBI6QSY5m7yL3uKRBomXfDk3mFIqGjhcYhB9Bdok7SqLBSB4buZ1cCjsNG iAhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=EuPD8BRI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my17-20020a17090b4c9100b002474ff0aee3si2005966pjb.150.2023.04.19.06.26.02; Wed, 19 Apr 2023 06:26:20 -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=@weissschuh.net header.s=mail header.b=EuPD8BRI; 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 S233449AbjDSNXc (ORCPT + 99 others); Wed, 19 Apr 2023 09:23:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233285AbjDSNXW (ORCPT ); Wed, 19 Apr 2023 09:23:22 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF871544B; Wed, 19 Apr 2023 06:22:57 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1681910575; bh=8DxUrecEQXlbonVWV4Ctfw1+JpOz8+kV4zNOKiNZtnI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EuPD8BRIlvKUCLVjp7Upw3ZZO5pD4ibHJE9vtrc4epUR2LZaoLh9ECIH+2n32WZ4m cjxNEGlufps3Mm6d4lT5ibxTd1/9caMUNAT0U/0V9ZjKhemjWY9rC8g/1NDoV+ZNNy /9K9OkyjZ35rAPk5FiE7xu0MlAS46KPL/txh+XUg= Date: Wed, 19 Apr 2023 15:22:56 +0200 Subject: [PATCH v2 4/4] block: constify the whole_disk device_attribute MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230419-const-partition-v2-4-817b58f85cd1@weissschuh.net> References: <20230419-const-partition-v2-0-817b58f85cd1@weissschuh.net> In-Reply-To: <20230419-const-partition-v2-0-817b58f85cd1@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681910574; l=692; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=8DxUrecEQXlbonVWV4Ctfw1+JpOz8+kV4zNOKiNZtnI=; b=W8wtHEqlEeRjokNrSDbMW0sWD5kabWuQvCIsJIndbub7dUQ4ew9L9Tn1wyDt7ehZLINwcbk5q EJhucksR1XXAklmW8BR7VVTUdQzMu/jEbFgwm4/erFLRVkb9Mop3OdE 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 The struct is never modified so it can be const. Signed-off-by: Thomas Weißschuh --- block/partitions/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/partitions/core.c b/block/partitions/core.c index cb37ac71868e..302ac06708e6 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -296,7 +296,7 @@ static ssize_t whole_disk_show(struct device *dev, { return 0; } -static DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL); +static const DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL); /* * Must be called either with open_mutex held, before a disk can be opened or -- 2.40.0