From patchwork Wed Nov 13 05:00:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 842873 Delivered-To: patch@linaro.org Received: by 2002:a5d:6392:0:b0:381:e71e:8f7b with SMTP id p18csp22588wru; Tue, 12 Nov 2024 21:02:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU/yB6EGlJLtnMDISbdGHqYneunMBGTZa6wKJD8ID3nsCPP3r4rxJ/wUCsm00XYv3TEfb5www==@linaro.org X-Google-Smtp-Source: AGHT+IEEQwowNAhZTK9Feku99ORHJCLnMFTKvW/+Lay2dsAaAj3E+nzLbXahFnm4um3uSQVh8A4S X-Received: by 2002:a17:907:7f1b:b0:a9a:17be:fac7 with SMTP id a640c23a62f3a-a9eefeb5cb4mr1749294266b.14.1731474150482; Tue, 12 Nov 2024 21:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731474150; cv=none; d=google.com; s=arc-20240605; b=CaJUuxPQLZAGdLGWxVMe51Wi9AVXE1Z2sbOCDI6lbnJVHW50SwS8TUuqBbL96EQUHM MeITgd5xFPmJ0tiNV/RyqqoiydEj8EZPNTpMnTGJX1JFbzq/BMe5xtVsXey3wsNqUf0v frpjzAn/ImQv7bTw3ey/huEqXBLDKFoJIYVSMjYT2+u2LnMqkofWjWthfyjAexj8rAvN NLi1BDQfTL8o21wVmwfentUEqHOaKshUAmBs35r8+Nu3KumTSWCow75ZuIyPLCF9sK34 ufDQ7J2gxlTk/OywSSsO9J0ERkMM7LI9/DwGP5N/mgqrDFvhbnd38qa0bbxGriJCJGTh dcmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=PTrLx9rGOU4GevWWvms6euuZqxw8xH5TTZS1820SDPQ=; fh=NFuWEX0BD1rfd2W0GJvWqKgshunHVC/GMLAcN3UdWpk=; b=QSy9jpeEKppMGifMU19JSOhUbEtN5PPZXiJkWXIbz1JwcWWpPmY87w2Xfs3Dzk1D4X Glnlb1LZsHZpdxVIRbTZL8XFoOvoY4YDpRcIOIia3gmwWrytdBJl6Oap0xXhOj2AZmoI TIeQhWGp2YvlN2vsfFYl5HFYhapBbQPkBg4jVi7IJziijq0CVkzEBYlLjfiG21CKgG88 SboSbQ21kdsbiNFss6DJYQqZUQX81c7XBHCv7Dbp8bHZSP5MVn3k9gqjhwk2m9hIfQSM vOg3Ehw6CU6uFXvUB59k9nop3OirBAqfZqh5K8emNKrwCyOiAfjL0ifMD43IPUguVqS7 OTnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mK/fCPqa"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a9ee0a08e68si930925266b.27.2024.11.12.21.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 21:02:30 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mK/fCPqa"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51EB68952B; Wed, 13 Nov 2024 06:02:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mK/fCPqa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2A87D89534; Wed, 13 Nov 2024 06:02:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 061C8894FE for ; Wed, 13 Nov 2024 06:02:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a9acafdb745so73465466b.0 for ; Tue, 12 Nov 2024 21:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731474145; x=1732078945; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PTrLx9rGOU4GevWWvms6euuZqxw8xH5TTZS1820SDPQ=; b=mK/fCPqabKfkeRMCNA/XcgWxW99goC97nB0gjLVsovMGpZRPttDzm6P+m4ncskjSkv VR3aMzx02orpW13aimPiXw2s6hb4ho+hbs+mFzhnHQDvv4YQ59yg83p3HhyfvSOsjHyx oL/3ih/PGQolUzwWHVq8RzIkyWIfIa0OXOU1ow3TV+iqMC3Ouja+F2UXZHZc0dXc1l4H i1HtD7hreTu0flLiJcYDLzHMUxzG0CCyyDjLi9JELdnrzUPkHPsopCQk11qmu1MNj3r3 wWA6LsRPDxI662MEvqpjA8lnhzt3xm+H8G/yj32t9ez+u3abjFiChoBWlJevFbAzK3Ef bxeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731474145; x=1732078945; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PTrLx9rGOU4GevWWvms6euuZqxw8xH5TTZS1820SDPQ=; b=Heaot26VNmwKqYstgO7yLKIKMe7q6tLL7gFJNwJdWdyU85OHG/YG1Vq/DuLRMV+As9 oyWyGZDZnGAKf5bw8wVWRKqqObyFXSYjYpNP6vebElD5APNOt2hZVcyqzrkC05sOLA7O IryE10LCny8rANcL6QEs7cM27jOoyYYTnugfYwSFSlE+F7AXe8M9rk6WhQxJksWWh3f7 imcfGYfdQNjCHc0+Bd20Q2IqJ/atDy0Y2jrW7GeGV3sdkmO9IGJS5/pQjOh5Wq0/hv7C rT+mvaEBWh+KrjI2M3cwqmCi1bnHw78j+l+KnCxdCMv6aES8BMJz1dtpHMwax/3Ul9jo 45lw== X-Forwarded-Encrypted: i=1; AJvYcCWZDN1TSrg0/yW/tlvMFudyu2Zn5F6lPZi7wOW7MYmxqDWiacztwQFyca/1bw43wBry8AJU25w=@lists.denx.de X-Gm-Message-State: AOJu0YzuLKByVRn1E0UwyVRMqGDbzUNshWANthiukf3vCZo7GdSfuM18 2UMlgz9cUifNkxDzw7H8+9/Bbjo6wF1edjw5QleSeRcp2/J7cJ1fa7lkflH8O4w= X-Received: by 2002:a17:906:ee8c:b0:a93:a664:a23f with SMTP id a640c23a62f3a-a9eefe3f3famr1852503866b.5.1731474145348; Tue, 12 Nov 2024 21:02:25 -0800 (PST) Received: from lion.caleb.rex.connolly.tech ([2a02:8109:888d:ff00:ca7f:54ff:fe52:4519]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0def87bsm820905566b.143.2024.11.12.21.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 21:02:24 -0800 (PST) From: Caleb Connolly To: Caleb Connolly , Mattijs Korpershoek , Neil Armstrong , Simon Glass , Sumit Garg , Tom Rini Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de Subject: [PATCH] iommu: qcom-smmu: allow SID 0 Date: Wed, 13 Nov 2024 06:00:56 +0100 Message-ID: <20241113050214.1845595-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean It turns out this is a very real stream ID. Who woulda thought? Drop the 0 check on the SID, there's no reason for it to be there in the first place. Signed-off-by: Caleb Connolly Reviewed-by: Neil Armstrong --- drivers/iommu/qcom-hyp-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/qcom-hyp-smmu.c b/drivers/iommu/qcom-hyp-smmu.c index 1b5a09bb7b39..7e07487ad384 100644 --- a/drivers/iommu/qcom-hyp-smmu.c +++ b/drivers/iommu/qcom-hyp-smmu.c @@ -133,9 +133,9 @@ static int get_stream_id(struct udevice *dev) struct ofnode_phandle_args args; int count = ofnode_parse_phandle_with_args(node, "iommus", "#iommu-cells", 0, 0, &args); - if (count < 0 || args.args[0] == 0) { + if (count < 0) { printf("Error: %s: iommus property not found or wrong number of cells\n", __func__); return -EINVAL; }