Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4824729rwd; Tue, 30 May 2023 10:22:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ471uFyD3AUZDAfldByI8/xaOZW7Fw7cKLWDGKGGC3a2h3ZIM+pmLgeuACJ1ijgErmPETW0 X-Received: by 2002:a05:6a00:230f:b0:64f:6c01:d580 with SMTP id h15-20020a056a00230f00b0064f6c01d580mr3549157pfh.14.1685467343197; Tue, 30 May 2023 10:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685467343; cv=none; d=google.com; s=arc-20160816; b=d6yK02Z77kZ5AVO264rhJQFJdv4bzkf+0akmrnCJl2WfI7YxMzgP7pToRAk5sqlIM/ a2mrmiY92siOdBG2MgZONnkEJhkQ+2H7UOD9/8tOzbH907RXcVvl/Ufa4HNX+vcmNm6A sFbzn8G+opFjY8/Cfjs6WKs1bNoY3Twg3y7x8ym1Rb9cDCScpDE7WH4rk+q11OkqDt8+ KWkOxlqZNiKGjCa4YBUnNm82orFRrhPk6pSMMK7Ju+uyKUCeYGLKw4LCVOrBeWt49FEm Zl5XoKVDfOKLglABsuz5GVNsqXhqkqvnrfO3VNpbhuqP8NkAq5nF9zbk9dhgphD9KIHM y2SQ== 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=n94ns8qOOhLF68lz+gxntxOt7haEl5HK8kqHePhhBfo=; b=tMpmZL53SirmpGpE/wfw9qNr0ruQJ7jXpeGeV6OFRJA8HgftvT9/WqfIgjX5hEBs3D 7ZT8LP0lOdBDBqINyH84e+jWgDA8Y1NAQSFpyQvApLIC7p4yPCU9nDufZIrEcrVwTY8P aXddx3+w0hI5mO1J+yPIYBtHyulFqhewElpMvIQhuhLGXQS7wiETMdxBcDRopt3naB97 LT/aOGmvco+KIw3ukdSajCVJrUZsCr57oka1I2/5nFL+f3roSMvEgFUd3D9tKHsGLnU6 JZqdpIoMzYAwyapKVf9Gvr9zwo/argzFto3sq38M5yhlqqPhPN481lu739PcEr3c1hCA CUng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="dm5eUFL/"; 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 b145-20020a621b97000000b00643c4345942si2054635pfb.134.2023.05.30.10.22.09; Tue, 30 May 2023 10:22:23 -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="dm5eUFL/"; 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 S233146AbjE3RKM (ORCPT + 99 others); Tue, 30 May 2023 13:10:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjE3RKD (ORCPT ); Tue, 30 May 2023 13:10:03 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D97BABE; Tue, 30 May 2023 10:10:01 -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=1685466599; bh=hwbEAsSX9O3Q/FuzB+mJE3YvogxYgzykVJP1zCu7+7U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dm5eUFL/Yka8KKt3Elb7WyHilwbgTER89Scv87Yw00J6QKGMcZSyfiUp3TZm/mEHQ 6uD706PdJm/hf8D42aD6iVBxmJZ/IzJrlmIf8VubNXHEv9DoFbRrqG/MpAojAD0mqm RQSSC9Jnbjq25duMBmt3HiqgvWID9DqTt9cEvrVM= Date: Tue, 30 May 2023 19:10:00 +0200 Subject: [PATCH v3 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-v3-4-4e14e48be367@weissschuh.net> References: <20230419-const-partition-v3-0-4e14e48be367@weissschuh.net> In-Reply-To: <20230419-const-partition-v3-0-4e14e48be367@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=1685466599; l=692; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=hwbEAsSX9O3Q/FuzB+mJE3YvogxYgzykVJP1zCu7+7U=; b=7NcHib0T8ZH6rifFN3Q7kFkaNeaNU7I9XZVb1eBcPLgzE6m08e+M8Gl0HbY2viAm80dmpnutw S6PR66DIfqTCCyKdlad2aDDWuA7RusQ/vaGZnqjDuw5E9eFI/dahrcx 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 d5f5633bf725..82d26427deae 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -288,7 +288,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.1