Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2482718ybx; Fri, 8 Nov 2019 05:04:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxnocy70GCNTKm1xzzLAaJYEMqrHsMQn12YKb9bsb6k8yRUgsEyPaeUQflmtAdCiAfHBC4x X-Received: by 2002:a17:906:7094:: with SMTP id b20mr8568526ejk.134.1573218260754; Fri, 08 Nov 2019 05:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573218260; cv=none; d=google.com; s=arc-20160816; b=BNtcIov6X0R1VIvGaeTsFsnk67Uc9rdkxNTufhDNTF2R3j1GTsyse9rRdCM6jcrLwn VQKZolI7HB/mnJ5yb1AqcTCzEU5G9hrpq2jiFxJixIMozKhuwdAHPDL6Rt+uG9KrNism X9n5PLTIrQCO0gGrXIllSCj//46+z2G/DfKuLw7nCgilLIV5hbw1siAjozLtUQYzFasU B/4zo/Oy7Bvn8cAYXtbywfYpByhgvRW7mldWarNMR25jjHYYxu7HjenYuVdeIinql3yE Ic1QolRYzd4+cfjiuX9aF1HZE5IV3Z3lz9tEMTYJtxDlnzZNsjU5UJ0xCw2egR8GVaI4 PlVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zHMD7aDRcAnceTlZ0tE45j1n7viMV+uwJbkB9Il7bT8=; b=m8G9oeloOht1YScOMHCz53gHvPAHl8akSk9WcSUf31QSZq9iZm84YA0ix4yENMJB8K fnfmMUKqBagH5ZVJi0zfQDaMsxMPd9Zul12LfGNIFwQUjnO9IQzT1GKexIJbh8/xaFLm SRagxJBk7zsUs+XcsF3/xfGZMFK5yH9jKiECy185j0v3FLYeIfvhXHC5O8aBAV9v2LDc 3KQzdFqo6dLyF6td40Ixu9b6lUptRTGOsss1WAvuH89m/bYRFHOGAbpPOCMLO7UdSgb1 wkPnK5SqG9bauM7vJIJVZn9pllr8SmQeKrDD0qu1+hbNhn84LfA3mPZoLcnDBmFsAv8k K/fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=eGaarsbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jp18si3470639ejb.318.2019.11.08.05.03.57; Fri, 08 Nov 2019 05:04:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=eGaarsbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731040AbfKHNCa (ORCPT + 99 others); Fri, 8 Nov 2019 08:02:30 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40450 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730134AbfKHNCU (ORCPT ); Fri, 8 Nov 2019 08:02:20 -0500 Received: by mail-lj1-f195.google.com with SMTP id q2so6132974ljg.7 for ; Fri, 08 Nov 2019 05:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zHMD7aDRcAnceTlZ0tE45j1n7viMV+uwJbkB9Il7bT8=; b=eGaarsbw1EKw6pefhZScDY8YR32XWY0OK62VQmAXGwS02Lsok7Cew24ssbH7+23CdV pCNtXVY4hCMr1BBWQwaJnKG9A3nmttVVy/tw2ceMFowkpf0wPbzqZCdgPNs2LC+HYuL1 fGPRoMpFjxf4hp3B19FgA4ZCX5/HrxQzcKJAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zHMD7aDRcAnceTlZ0tE45j1n7viMV+uwJbkB9Il7bT8=; b=Z6neywXBVqrMoyYkbeqsmAzjQB52RlldKSk2LiXps6ezUNrbq1paGhzh9bfe9hpgjf NI4LQCXyB4m7L1jmqbXbHfWe52jOs0hbBqYMmsskzTjYl6iYx0Dvvluyg1NuIVe+ubaM woB8lPnozerbgyPE/e+OXUJhXuUvJLos0cjlqm7+p2bGzBuRL1R9AGfsykNUkatXLPpu O31+IkMOpJnrFeV5UR6+s1vNd7WPj6j8GDu2f9ge+lv+AbCGXmvYFGhW/PvEzx2Odq6E PtMJUcDwDBoO7raOpok8y0YHZflxC05ogvfs7EeKQGe/0tOZ9dDiHEWwuVmCmDE2wqbR ciLQ== X-Gm-Message-State: APjAAAWHynuUD7icRwSNMqRCP02EUsFc5y14fuR+oZKdwZhAKbF1Bvbh PmcP30OiZnK2IrNAnC2zqhS4nw== X-Received: by 2002:a2e:94d6:: with SMTP id r22mr6708575ljh.7.1573218138299; Fri, 08 Nov 2019 05:02:18 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:02:17 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Rasmus Villemoes Subject: [PATCH v4 40/47] soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init() Date: Fri, 8 Nov 2019 14:01:16 +0100 Message-Id: <20191108130123.6839-41-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that qe_muram_alloc() returns s32, adapt qe_sdma_init() and avoid another few IS_ERR_VALUE() uses. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index ec511840db3c..5bf279c679ef 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -365,16 +365,16 @@ EXPORT_SYMBOL(qe_put_snum); static int qe_sdma_init(void) { struct sdma __iomem *sdma = &qe_immr->sdma; - static unsigned long sdma_buf_offset = (unsigned long)-ENOMEM; + static s32 sdma_buf_offset = -ENOMEM; if (!sdma) return -ENODEV; /* allocate 2 internal temporary buffers (512 bytes size each) for * the SDMA */ - if (IS_ERR_VALUE(sdma_buf_offset)) { + if (sdma_buf_offset < 0) { sdma_buf_offset = qe_muram_alloc(512 * 2, 4096); - if (IS_ERR_VALUE(sdma_buf_offset)) + if (sdma_buf_offset < 0) return -ENOMEM; } -- 2.23.0