From patchwork Wed Apr 19 07:50: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: 85243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp198288vqo; Wed, 19 Apr 2023 01:00:48 -0700 (PDT) X-Google-Smtp-Source: AKy350Ztp0PiXf9Ey5wuUWRneYcL4OQotyCLpDfJAw719Zxs+8ccqpnnz9aGqy2W5m8ANOrOVsqG X-Received: by 2002:a05:6870:3516:b0:184:2bd0:7300 with SMTP id k22-20020a056870351600b001842bd07300mr3075707oah.36.1681891248743; Wed, 19 Apr 2023 01:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681891248; cv=none; d=google.com; s=arc-20160816; b=xjiuYTsbFIIzFFSgWHLF4HdAGJBGEkPAnMx4ETNWtM2j9NkIBtUk1rJhfe//kkhJt5 PydGE45CFtr0LpEyjeWLsmZgrfhwNdO7wJpbuB/ZitoODheBhcSp7oHhb0zsCNkyyo1S C9wGN4LoCuuNtAexmEWJF7FyTN5lKxb99Op0f2MLPxfNuuhrGBaz6TIE4I8CnNI7JnP7 xJg43jokgY+6DNRqBnLX7RlmpoSIqExQa+tEGSRIcZVl2KTocI4Zfl9BcnzqisMJpv11 X/KQY6WhsPqhYBKct4T6g0wAWlMjBqZV45zOoWEz3hWWv+LEU3M0Z82UZBWW7yBMRpe8 HkcA== 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=aT4aHUxRkvngYHd8ykWh8GXz9FiRWTlfn8sLvdMRLz4=; b=aHSfizRwHGgrYLJbXifuqQ4CYfqvsmKEkhOZGufgfZHBCG3sVrPSnIyjQIqBFS3AbE sD9yg339M3s4S1LmpZ1rYHVaBcKL6YfPGExqQW3bz7GSaB1vO2720mGm21cW6E0Bl3rz RR0A+GP3bOBdTPk/d6kBrMdmMesaq542L8i7ssBEbKa21RQxWs0/LYYouhQZE0wMHt+H 17Tl53EDXmc/0ebd/l3N6CcM4DFDLC4x2UFm1VpOojnVxPU3pByvBcOpaukwOQ0Mtf9a xZ41cTtUpD6FQ57m56FpM/ZOddmgAkxKLr5NI3Jrdnf2ui7XouZg6FZsc3Bn5Ju75PVX rf+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=NyyuVOq0; 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 u9-20020a056871058900b00184667e01a2si15058675oan.185.2023.04.19.01.00.34; Wed, 19 Apr 2023 01:00:48 -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=NyyuVOq0; 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 S232661AbjDSHvE (ORCPT + 99 others); Wed, 19 Apr 2023 03:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232480AbjDSHuj (ORCPT ); Wed, 19 Apr 2023 03:50:39 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13D6AC661; Wed, 19 Apr 2023 00:50:09 -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=1681890606; bh=+BWDSAdjFIxcN4cSYW2nKSzd7xdEBdtngZoCQpaUs9w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=NyyuVOq0wU0MqJDnYPJa5VSqrfwPaWKLJpYHbP92zONHYlxLMpK1CBm2WXHkx5H7F Jlyp6HyboCrYmp238RVTZTIqD3mrPefNIEvw1GlIOlwGLC/DI5zLjyGG7uDBwG0FRU sUDOKZd0HT5Mh0QrwY5ynKcDxIVJMes1ZGlN6ZYU= Date: Wed, 19 Apr 2023 09:50:03 +0200 Subject: [PATCH 3/4] block: constify struct part_attr_group MIME-Version: 1.0 Message-Id: <20230419-const-partition-v1-3-2d66f2d83873@weissschuh.net> References: <20230419-const-partition-v1-0-2d66f2d83873@weissschuh.net> In-Reply-To: <20230419-const-partition-v1-0-2d66f2d83873@weissschuh.net> To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Tho?= =?utf-8?q?mas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681890605; l=600; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=+BWDSAdjFIxcN4cSYW2nKSzd7xdEBdtngZoCQpaUs9w=; b=s7SU+6Q3vLf9/5zFRUxMbk2GkvuT/h+4uDo7UJ/0fT30OjxJdFEV0JZkGR8VXzZScEVeCnbi8 7Q2n3iAfQX4BuRsBtnY97fCWHLSAJOJmWKzAfFgWcd+YIqLuMvAV11y 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763590798463151316?= X-GMAIL-MSGID: =?utf-8?q?1763590798463151316?= 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 812407ea38e9..032e415618cb 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -236,7 +236,7 @@ static struct attribute *part_attrs[] = { NULL }; -static struct attribute_group part_attr_group = { +static const struct attribute_group part_attr_group = { .attrs = part_attrs, };