Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp448759rwe; Wed, 19 Apr 2023 00:55:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZT0nl755naPNs2HEj+PumJH7WgeY0H6J5VIX9T5OGBIZc75yU8S6q/AwhrSS767v9+D9lv X-Received: by 2002:a4a:49d8:0:b0:547:1c45:ba59 with SMTP id z207-20020a4a49d8000000b005471c45ba59mr411205ooa.2.1681890923795; Wed, 19 Apr 2023 00:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890923; cv=none; d=google.com; s=arc-20160816; b=DgQJ4txkANHe6nvEg4ryFSlGC5BF6NNjsI5UqoXiAmscvbAtT2DxtGR1g5M9mDrBsF hEC8cnUoMf6pIYwSdCix4t2BKDKa2fM8I+4FbSPz40+TmNB1naYDOpC6vsaGB1tP1257 rJ1qRwSOS39h73XiqE5B/Wb+6sfnO3J1PdLhCjz0Ta3IgsE7md1SmXHYhN77BJYWQ+RA uKkgUCiuzyZdOm9gjrDf/dwoa0bNjGCnWjX5I8R7G3xm6EZqnoOUroE9MgRH3Z6lDrDi qjVHazgM6MiRSm3RZGBunc8a0XqYx2Uep3C9O8TEpgkko7u0lnAM1xzzQv0GfhGUBd2r 1Ncg== 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=aVc0DWJRFn7SfpDsP60uvX1ez+3koVzjxEn5Aj3R67E=; b=SjYLre0wzGBmUsKAy87uOeCb3Jc8yq5ZHOJ3etssaCqQAnkHTyUj4Kos39rRYS3sFs zpVeD1XQhvyPVeses3VpPh6Ydy4rmj/DAo1AuDgfH3O0PPyQJpH+Y0Dq/+/Z3WUqI4un RCdyRDGJSpwk/OQwswMXnsk2I44tIcM7WWH340FxWwuV/SUSSiG3a8YbsE6lG+5nL86f wqf4kQBeFjg2bvBai6PhNmeNbF4Okck0OJ/IYRL+0HXJMfzuehOR9JASFcfrcvW47U/p hi8l+GONbxsbGjaILAsmpN6Ui5JxwreXPMlMDFDL06Z1X8uFss85iFr9XgY4XZAlzlZH NvvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=l8DYAJVt; 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 o8-20020a056870524800b00187aec08eb0si12296623oai.257.2023.04.19.00.55.11; Wed, 19 Apr 2023 00:55: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=l8DYAJVt; 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 S232656AbjDSHvB (ORCPT + 99 others); Wed, 19 Apr 2023 03:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232398AbjDSHuj (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 E1749C175; 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=kSlTxie2Ksev8vTGCDWHXnNc4gL+EGM1NG1+H1a+m6E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=l8DYAJVtorw7L4oqC+eL7xArCxF0pNZgDiJh5GTlfkWKPhqU3+9dyZEB5ePCv4+VD Rl0xSBuODwChxCxKuoWOWqxnzlPqZD5y44QD/iH97YYQOfZBaAQCVCMfpwcNpiAzna YgEb+VMGmvp69gQCYdFJMZt8IhD8ozmqO6boHrfw= Date: Wed, 19 Apr 2023 09:50:01 +0200 Subject: [PATCH 1/4] block: constify partition prober array MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230419-const-partition-v1-1-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?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681890605; l=698; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=kSlTxie2Ksev8vTGCDWHXnNc4gL+EGM1NG1+H1a+m6E=; b=DjdLzIs3C9Vi612gPssij7yXcJOt4k/kQJmuexW0wQ7fSreII52rD8l2eI00RFP7uk3Udg0Tq joRXaGTK8QDAKCsrAasX3qd78urpEuX/9fQCfnv/27kCSKmCm7m3uym 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 array 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 7b8ef6296abd..667f3dcebd59 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -12,7 +12,7 @@ #include #include "check.h" -static int (*check_part[])(struct parsed_partitions *) = { +static const int (*check_part[])(struct parsed_partitions *) = { /* * Probe partition formats with tables at disk address 0 * that also have an ADFS boot block at 0xdc0. -- 2.40.0