From nobody Mon Jun 8 07:24:34 2026 Received: from outbound.baidu.com (mx15.baidu.com [111.202.115.100]) by smtp.subspace.kernel.org (Postfix) with SMTP id C78F72030A for ; Fri, 5 Jun 2026 00:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.202.115.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780620071; cv=none; b=Mu4W+BLJtzsdeilukrPrDTlwtMHgaVBNIEOKjqxwbQBYvoDBYk3b5/0iKHD4V8D5gsxbdfVYXzXN1OrtdpNxUURu9OdMOsg5RwncMXjTRiK8L6U0QQj6xS3ZGDH5883sA8cJC0QyTCBgHJtvlaheIkka73Q1ksFGyUfjTgfeLP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780620071; c=relaxed/simple; bh=YqxJaUeKsr3Q7DXdpyCeh7iuHWcgzb5Zzv8kxCng33k=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=oln5TtYoJvbDPx5bM1MUlN26Rj2nUjHgE4JhFPlAxGRFhBnPtyEIHHdPp7l2t/wvhnMFLpMIj+T3Fmz0sN/53ESusPFNHsZjl/w4FuS8rfBFz9G7CN3KaHwAlAucTqmkiMlY/8pTyDCdPiSXLCunr3/ASZzTPm4vAGgsRoExBn4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b=VUGO7kDv; arc=none smtp.client-ip=111.202.115.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b="VUGO7kDv" X-MD-Sfrom: lirongqing@baidu.com X-MD-SrcIP: 172.31.50.47 From: lirongqing To: David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , , CC: Li RongQing Subject: [PATCH] iommu/intel: Use logical OR operator for privilege mode check Date: Fri, 5 Jun 2026 08:40:53 +0800 Message-ID: <20260605004053.1867-1-lirongqing@baidu.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: bjhj-exc10.internal.baidu.com (172.31.3.20) To bjkjy-exc3.internal.baidu.com (172.31.50.47) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baidu.com; s=selector1; t=1780620062; bh=RuANLm17uRgcZ9HYHQfy2FLkCmrRcAta6xUPY12kNFQ=; h=From:To:CC:Subject:Date:Message-ID:Content-Type; b=VUGO7kDvyoewVlnhvEDVy2dBqQ8OQ1lid9VVrti9mSe583HeTmtPPeJ2qFwbPYCmm 833XlVnhqDFVx6Cf12ccQKfcte27A0gd2W4FH1//WK/GW19bDhe3jmzM4I2witcZBj nqjxoeluGLZR7tLwefTOBhwLFTv5ZFihZyU1TJ6yphff2qLKUxG5otQMTXWUVCoIdq OI26K64Pn8siD+McPpHMjXFJhnuLNlz++weKRPgtCRI02O2lqATKvbqvK1xSIfgrz6 IpGzBmy/agGgmm8hhuN6DQrDveGZqbjruyhLTUvOBmqFIrre7OEONQJLI+Adxq4GSR u5t5cxJaD/nIg== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Li RongQing Replace bitwise OR (|) with logical OR (||) in the privilege mode validation check. While both operators produce the same result for boolean values (0 or 1), using logical OR is semantically correct and makes the intent clearer. No functional change, but improves code readability. Signed-off-by: Li RongQing --- drivers/iommu/intel/prq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/prq.c b/drivers/iommu/intel/prq.c index adf2bab..b89184a 100644 --- a/drivers/iommu/intel/prq.c +++ b/drivers/iommu/intel/prq.c @@ -223,7 +223,7 @@ static irqreturn_t prq_event_thread(int irq, void *d) goto prq_advance; } =20 - if (unlikely(req->pm_req && (req->rd_req | req->wr_req))) { + if (unlikely(req->pm_req && (req->rd_req || req->wr_req))) { pr_err("IOMMU: %s: Page request in Privilege Mode\n", iommu->name); goto bad_req; --=20 2.9.4