Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6876659ybc; Thu, 28 Nov 2019 07:01:49 -0800 (PST) X-Google-Smtp-Source: APXvYqysyAtXSLcMmlvh6zaInRJhQjVbufdWIb/jtCp4IVJUUn3O1x55mqqkCuJcyPTaUheFuSWt X-Received: by 2002:a17:906:524f:: with SMTP id y15mr48597998ejm.3.1574953309665; Thu, 28 Nov 2019 07:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953309; cv=none; d=google.com; s=arc-20160816; b=tPGgJ91rQVpw3NLdBa9jf56B/xC7Xpc1TVG+sA5Wqaf0V2oRbwE/A2vTJbKobBfpyK j0d35Cn6p4PKY2fKQ0NQ1rMc3aZwzXvCbgus/d5Cef5Wvr2kBkaOikxkrxy44GZwi8Nq Y8s4ypwYm2OePimBx/ganJDsnnABMuuOrBG7J9889VX9QBwajXQ0swtlj2sTKOcOA3cm KCeQyUNs8GrLgP8/xzXWv4qd4ZXsWwJADLYdyZksYicLKmOMrRkq6LBormZSgwud0EMe ADSKq5QpriPuONuWiTVrqmUP6i+gbCEHKQlKgqYfftIC+LLlD6zzGJoy7jBgD2inF48c ZVpw== 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=A3LxCwaWF3+EjSkH3Z11+aFYy5ZGZLaMI8GPoISP0aQ=; b=UVte+r+JnztAfyx225zTuE0/7Jdmyikt7tZan1Rp4AAV9hNoUuoCMRypKt/axE4n73 0c4c2QOjE5RFunrQ6DzMtqpNXfzRJHQjeWryFR7MOnqkqrkJslYyrDEhqkI8AUNISqAS k93uCU+08u/8g4LGdfRbaLcEfQ5naePCF0lbJpQ9pn7Amy1CNo+NOo6BpxGYgbn3PuI2 g0RZZCWpE4VPMldOvS46TacVWEWOOnMQE1gvwvz57J93LjCFxVXV0a/GmFUaoKk6SsUE /QydJwcV1DkVMoDXnGJmWV57pnOoZJSXFnaTJ5JJ2y/uOdk5OKY6B+yXd9KyIxf5bcOZ 5AfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=h5Ofrh1l; 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 t26si14074515edc.102.2019.11.28.07.01.24; Thu, 28 Nov 2019 07:01:49 -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=h5Ofrh1l; 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 S1726692AbfK1O6I (ORCPT + 99 others); Thu, 28 Nov 2019 09:58:08 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34002 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727549AbfK1O6C (ORCPT ); Thu, 28 Nov 2019 09:58:02 -0500 Received: by mail-lf1-f67.google.com with SMTP id l18so2230425lfc.1 for ; Thu, 28 Nov 2019 06:57:59 -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=A3LxCwaWF3+EjSkH3Z11+aFYy5ZGZLaMI8GPoISP0aQ=; b=h5Ofrh1lS1SdvEU2TywQndew2wv/s6SlshVIlXBQI587u1AT3EXJXpyq2oJdPtVTHA ffPQYYcE3fOicrEVwVc9YzvRFsFG48tQ72uf4CxV3GNrG6HUW7b3FV+oHlayfUO2uleS drOU4bl3A8RKImHPPcr3Gta017yms39ACmP2Y= 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=A3LxCwaWF3+EjSkH3Z11+aFYy5ZGZLaMI8GPoISP0aQ=; b=hWRaQXqTythx8O+bRz37qV9LP10MElstnQltZWD18sdd1P8pOstmOu4OVzuyDFUyzH Rv5ZhgfFedWoBF5a+EUe0QvTycH/Swe0hw5WoQlIO7xeEBTnorcejPAmNDWNZUn9CyvZ 43p2A1yhq0cWTQiCkcIRMaPr+PgSbFBp0KaHgG1Ch1ihCl9LZbK0SVnw5cDLokcfUXdc 7zSurUqweJ9cOa3uuE/kg/PyEe535odeK8/QaVirluzic8cnWj9ukzQmeAkw6tMmAsxB mckVbBZFWkDAn72SLNosZ+Q0SKjQEIE1XIRZ21XiVFF5q2F7vcGYXaBmVGvtEUoFrqOM mKPw== X-Gm-Message-State: APjAAAVksQNsCamzkaHy+pc5fVk51IchfMzu3Y+Yt/RpbZ0Jdrbmryr0 vb+Nl2/GoHwCVm9qOWMivMcoYg== X-Received: by 2002:a19:c3ca:: with SMTP id t193mr19540921lff.40.1574953078637; Thu, 28 Nov 2019 06:57:58 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u2sm2456803lfl.18.2019.11.28.06.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 06:57:58 -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 , Timur Tabi , Rasmus Villemoes Subject: [PATCH v6 41/49] soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init() Date: Thu, 28 Nov 2019 15:55:46 +0100 Message-Id: <20191128145554.1297-42-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128145554.1297-1-linux@rasmusvillemoes.dk> References: <20191128145554.1297-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. Reviewed-by: Timur Tabi 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