From nobody Fri Dec 19 07:20:14 2025 Received: from mail-pl1-f226.google.com (mail-pl1-f226.google.com [209.85.214.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F4B82264A7 for ; Wed, 17 Dec 2025 05:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.226 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765949715; cv=none; b=BOYeVO26sUod/bYBauRO7FbkEHNVN+J7/5MGBS/6mrpxsu+6DhCFB6QdVpKUyBf/+ilQn+UiRwcHsvS7SLSCz4sjxBG9GAhmue56ODIccuBYpuJj2It3CK6ek8ybuYJifKWWXZrUHjUg5JRoMrJ4r6LtgnF6JFPaVxl8yvBXlys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765949715; c=relaxed/simple; bh=venmX+xFUUA0UpVlm0dl+mDk8JNjcEjxZwCydjYWYrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LIAcEfHxu5Y3CG3bVZDrRzHCv2sbe2wInjG007NO/qixj7jN6vVdY7kiG0nJ5Sn1ScgVxkpLJlaB+ywLZuQRrrY05avE9X4gYYBycMSyAAqZfrbznwxgbjxbWCL8kRz1O0rIJYF9YfppF2MNRG0rqWzUcgqnlBGADt9pIEe8oSc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=RtgLSXZW; arc=none smtp.client-ip=209.85.214.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="RtgLSXZW" Received: by mail-pl1-f226.google.com with SMTP id d9443c01a7336-2a110548f10so5594705ad.1 for ; Tue, 16 Dec 2025 21:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1765949712; x=1766554512; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6deGWS+C+ZX6CkDTMG90zDsqNjHQte7F2hl6ze0/JAI=; b=RtgLSXZWwY9bYQA08x+/+In3lvdMQ/ijKXjtWz/27ugbLog5uKyd+QnPz9W5Dk0OG5 Zg2XMekCycmimBLKAkN2M2dpFky5f2BvHMJgN9JmLm3/0fEEwjkltmRIPMIZpFUKNYwu aQvWpedglkurTz5tP/y7UNEms0Xs5oh3TVPHMk8IZyfsjcQcoGdnqed16dlM1ShdyA/p V36qWqEUg4CkOBEf8f96XOTQhns9/k5YdvISjF+AFbmqSWODKMh8SQUvrZf6B1/pArW4 H6MUipu1SCZc03hUGPeZ3NYOE2b5IndS4gAdp4fmLn2z/O4HlCgKdC4LNIQoSjqxjAdx HKlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765949712; x=1766554512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6deGWS+C+ZX6CkDTMG90zDsqNjHQte7F2hl6ze0/JAI=; b=aUhT3MUSMMeQciN4prQ0uRaOd58N2cwiPZo6l6JW+2wZSaYy3zNWyzPmAEkTWZ3SOC VXjnwaussEa03piszmf6YBdVUSW3JxWw+Y+83u3VN89CDdCnpPq7M5Tl+s5enVQ3nEZB aV6zgYlrSMWpRLDuPsiivzS1UWydA1VhDUvSEcoH51tK0pgpKuRoPWFYZerzCuZDCYGb TuUIEs8rnaU8DEZyKsgnEzgROZQxgAIAMrPL+FhC7VZUyCqnMl7IRgMZJ5RjSkxcsOgJ 65/Iul4+ihV+9gb48UUduKd8qj2pHoxvz99yYRgP+YKfOg50oa5VnZ68Uj/wjwEp0WPE QvJA== X-Forwarded-Encrypted: i=1; AJvYcCXSMKm98xp8tLcZ774xpkMfkWGYtfyizaLQcWfQIxAvcA/NgrZM4por0rFNT0Z+xIhh6MWbtZ6booZRh74=@vger.kernel.org X-Gm-Message-State: AOJu0YxXIdwTDv+DsZpBAsW8M5eCrH/0sM7Hj+hYg4CpS/77bg3xFUds TQ8QgI8blZQ/qNMOWWO8ssi0RGSxYbwp1w4J7O27h0eykW7hT6TjVYsOb5O5rBLQU5ZZeDpkTsO +c529/mcxfwQygQeGSorgKZ8IV1OtXw+IQ1Zc X-Gm-Gg: AY/fxX4lWxBYZXSD9kQE9cvxpPJ7ArSBlmHU+dz0b6FU9iweTrPB5beMVABeMgtvcWS F84KuhyyUYUKB3Itwn1WvLWebVKEYQmK7N6SMZ67WfUFnr2/4uPuv0vDbKI5ia3Ph8vM05gNttc oS6qAQ9wH2EB2Q7gXvHmoAVIJf9D1HgHCyisvCY0Tei/+uGL1OMxK1psHBDW1FsyZi63eX855rw JOma8e60KgOa1BPZnI6h4Oq1TALb1p77U4dUMvCWIIw4p1FlYJMbm6E/LKoAdUmUrXrsGY105J6 aOl8m1dv+aenxkUOdiQDi5D+9YEGzdaaZqhigxJQtfmlnEVrSiaHLsWLybAESBlyZtw9NrXP2YU SHvCzSPKm9jzphJc8w9VcPneGddiO2l7ivV/0rBEvWg== X-Google-Smtp-Source: AGHT+IGN6JHAHDS/K6rl0nUyK+Z/ER5lvYDtEq56HR7i2Pc/7hcthk8RgG5mE7Ltq0iDaECSRtWvto2Z+B2u X-Received: by 2002:a05:7300:d213:b0:2a4:3592:cf89 with SMTP id 5a478bee46e88-2ac2f395b31mr5118805eec.0.1765949712106; Tue, 16 Dec 2025 21:35:12 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id 5a478bee46e88-2ae5e423a86sm96829eec.1.2025.12.16.21.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 21:35:12 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.7.70.37]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id AA4A23420E8; Tue, 16 Dec 2025 22:35:11 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id A81EAE41A08; Tue, 16 Dec 2025 22:35:11 -0700 (MST) From: Caleb Sander Mateos To: Ming Lei , Jens Axboe , Shuah Khan Cc: linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Stanley Zhang , Uday Shankar , Caleb Sander Mateos Subject: [PATCH 03/20] blk-integrity: take const pointer in blk_integrity_rq() Date: Tue, 16 Dec 2025 22:34:37 -0700 Message-ID: <20251217053455.281509-4-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251217053455.281509-1-csander@purestorage.com> References: <20251217053455.281509-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" blk_integrity_rq() doesn't modify the struct request passed in, so allow a const pointer to be passed. Use a matching signature for the !CONFIG_BLK_DEV_INTEGRITY version. Signed-off-by: Caleb Sander Mateos --- include/linux/blk-integrity.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/blk-integrity.h b/include/linux/blk-integrity.h index a6b84206eb94..c15b1ac62765 100644 --- a/include/linux/blk-integrity.h +++ b/include/linux/blk-integrity.h @@ -89,11 +89,11 @@ static inline unsigned int bio_integrity_bytes(struct b= lk_integrity *bi, unsigned int sectors) { return bio_integrity_intervals(bi, sectors) * bi->metadata_size; } =20 -static inline bool blk_integrity_rq(struct request *rq) +static inline bool blk_integrity_rq(const struct request *rq) { return rq->cmd_flags & REQ_INTEGRITY; } =20 /* @@ -166,13 +166,13 @@ static inline unsigned int bio_integrity_intervals(st= ruct blk_integrity *bi, static inline unsigned int bio_integrity_bytes(struct blk_integrity *bi, unsigned int sectors) { return 0; } -static inline int blk_integrity_rq(struct request *rq) +static inline bool blk_integrity_rq(const struct request *rq) { - return 0; + return false; } =20 static inline struct bio_vec rq_integrity_vec(struct request *rq) { /* the optimizer will remove all calls to this function */ --=20 2.45.2