From nobody Sun Feb 8 21:33:59 2026 Received: from mail-qk1-f227.google.com (mail-qk1-f227.google.com [209.85.222.227]) (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 4BFD022256B for ; Sat, 3 Jan 2026 00:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.227 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767401137; cv=none; b=LRRsv5hpLd/egdqzsm4fQjds7Rds7Yo+QB1kjkpi0frpk770KL1B1Mr+fl6avp46Zc99Yhg85PDjXL9c0b3+n3F/njQBJVkbhAkzFHqeN/fl8UsO+nme6k/5EGeKZUCnie4XfERmbAbiDT3lb/LPBqbJikSm0LZZM+d1E5tM7SU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767401137; c=relaxed/simple; bh=OHCvRTYKVhIoqJ0IbwNbmP3S0pPDKsYwK9/NPEhFebY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VwGFag65GytxQQlcQRcuU2bB7+LWUuzVCg06bRUVT2dKyTAWS+2W2Q1mh+MRa61OBpY8jke0hdnAUvrg2PbwNwXf8Jw16LyXoZ22EwmuBM6LNYJfpdI1WVI9GTMWswn2PiSOvo2+NVKcpF9boSiVhtomQmtJnSuMExApiGgb/zY= 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=ffhtsnKb; arc=none smtp.client-ip=209.85.222.227 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="ffhtsnKb" Received: by mail-qk1-f227.google.com with SMTP id af79cd13be357-8b2df1e0c10so178923785a.0 for ; Fri, 02 Jan 2026 16:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1767401133; x=1768005933; 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=59cCDgPfeatMIS2T54XZ5qKYRlkQDNaFxzaUv99tjXw=; b=ffhtsnKbL0bACNDUCOPMTDm1xPo7TQsU9JOGSFTV4HstCVXXMejFVw0Hxz9PDrCEO8 Z5rsmYl1vtSJyk7lWOeJx2fZ66qj7PgAmm0aQ7Q1/zmI/MhKbxlQvmotWr+usUPMx7Xd RaC/Q1YDSWvXFk7tstcoI8+ApoIDbjHFe0LzB/sGX8GTcVUdvboY1lrOa0cgx9pAoPZP jBjMP20P0HQG2JWnf4kdIyB/3X4ci2s2Y450GI3HfSi21Oleu4xj19udCBrc8q5Edc67 K4C1jyrHp23RVTglh8J6q5VPicVrWnGNyHqK7d4to8UxoD99ov3LshW9CTsX3Uco0Utp zBag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767401133; x=1768005933; 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=59cCDgPfeatMIS2T54XZ5qKYRlkQDNaFxzaUv99tjXw=; b=EHmDzafS9Z360DEGSqp7aT5Ovn2/eWwqEQMQW15tA0Qd61jQ75JRQnV23hruYfSNz0 /sQq/cAkT63Rxjy4xEJBUSsxSkgx05MuXLIvFBNRwuoFvJzNd6Do6S+3TuVpirjsw28K Tm3dpiYDVjEsYJqqSGGmm1p0eN0NjSo+V9nE/ByHdbV2UHk49Ng4zk4vfVekknm7iQUe WeUWKgi2hnYVxCcSWS6xiLAaB8EmirpyM5twh98T3Ulg1iEQu/EFirdfCaYqHn5n6K5C 2ZC5ras0Ad135xrtqJiCQUGJk+/kCDT/sitmCpcMONAn71zqtm6XHRUlnhSCT5u3+N7S Uv1g== X-Forwarded-Encrypted: i=1; AJvYcCWq3fTHyJv7mVHLZhyC2rVO3zSg4EpnVHTP6w01zl1HgjpZYrHxsEeeZ50XrPE4ABOFb5DRSp6C9mW0lMA=@vger.kernel.org X-Gm-Message-State: AOJu0YxgtkZGM0O4DkYYuczFypttm5J1CuTX5OsfbaRoxsljvBRVJPId x3dtVXSF1UBEUscVsvQ/+o3t+ZLKx4Z3CRWmNbule41oJgE1E4p8VuZ8bM5h8F0ZRI1hgclbkeJ 5SSv6jNvOz/gAUVJU10qvT/OGO0HOua6mXwLb X-Gm-Gg: AY/fxX41tBy4IHmtcHz6Qi26sFhR56HMs7Dv+L2GUj+S8KLLZgipnUPXVRYZb1l00yL pmSJlYC715Xoz5cPL//qzieU91Pxx6N1lc0NN+5jIvDonX240xdY2E9Id4XbcZW6ePY3Hrv1yuD KZGdLneRHLAoX7JpVYP8Z07hNNr4AZqAVh+Bw8j3XQ0K+bpCOznsTMt9LZPhFioPKRLlAnk40Gj M9gjcVGqodXtGgPDE1dNPMdZWrcGaLLzsTzthbkygq0rEgZzY4bLM2tru1h6W0mCaZZi9vPG2YZ tPl1ujfr+pXxJ4gnJWjDcHgABIw1kKRzyyNm1PNwGciA2se1FFvNIt7rS/MYd/5/0xB1ZKiyKfy zaRKqY1sqXnc7SWq84KYkhIAPlBFAtxv+sv9MEmttYA== X-Google-Smtp-Source: AGHT+IFqMJoRCOhorEZ1m5a1GSBNb1Nq8U5gwFI3EoZHHVIsX+lo7hsl8u2Cg5Ps5OOYvTTwO9tanO6Feto2 X-Received: by 2002:a05:6214:415:b0:801:2595:d05d with SMTP id 6a1803df08f44-88d83797f60mr536526336d6.3.1767401133182; Fri, 02 Jan 2026 16:45:33 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.128]) by smtp-relay.gmail.com with ESMTPS id 6a1803df08f44-88d98050c97sm55962466d6.25.2026.01.02.16.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 16:45:33 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.49.34.222]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id E36283402EE; Fri, 2 Jan 2026 17:45:31 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id DFE06E43D1D; Fri, 2 Jan 2026 17:45:31 -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 v2 01/19] blk-integrity: take const pointer in blk_integrity_rq() Date: Fri, 2 Jan 2026 17:45:11 -0700 Message-ID: <20260103004529.1582405-2-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260103004529.1582405-1-csander@purestorage.com> References: <20260103004529.1582405-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 Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen --- 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