From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 957C9CE836C for ; Mon, 30 Sep 2024 16:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ak/OpaHZla/c5uUaOqdAyJ559kbBrFZymGfhIpH/FxU=; b=gLiLE3FsmIa7lH8t7G/Ro75zY0 vjuva6Akv7nbpent4Q/Gnb6vpFs5IZLso+I5M6Sb6Y3A/GEreFdlaeSvevPW499iqzFhmi7jHgAzp Q3fEa35KGwCrG48ulzODVU8lz5iXTYPzaSPskgyXtBi+KVkZ+YBiSgOitUWnJLd0GIzriNbCG2/zs tl4IFcVySD5qLkbn8XUGlOQNe0CWT1agTvtds/cNbLrdkHv/vXY7bphE4tJv1Szmt6JBbUxtDuvWr RCahoJiX+ohr5aeo9Oiv0PjoCBi8/QzuSsVeG0NNmmh+XuSE4o0ViDdk2Rhg5bjEeVJcWja26QBGw Kcyfbkwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svJD8-00000000E54-0uTM; Mon, 30 Sep 2024 16:25:22 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svJBu-00000000Dpi-1XYy for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 16:24:07 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id AD5FEE0004; Mon, 30 Sep 2024 16:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1727713443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ak/OpaHZla/c5uUaOqdAyJ559kbBrFZymGfhIpH/FxU=; b=N5riAqBg5lyO1VUxKxPagcwP2FZzNvzdMFcKizPj+jDk0tofSyjgNg2xdso0NxS/uQe/qk ylcLtuChL/mF9pp9os7j3nPbhcIfMERAt9Uf9y0kpf8e38O7CTfgnU8bHa+Vvckb43MmgQ qQytaOBRZNO31P3uurZsEI8XFAbr3dE0ZCRbKsnvglGTrR0METsx8JAIFh9/cPo3tOVnMf YZEO0N8xPkjCHRM8amWhfnpNMVNZSNsHzKeYD1mzdQULVRXR0lOl1SoqUvSRRhUzyE+Gd0 K8wxLHahoXSNIK+Oco0JEQ3Vbo9Z6tAe05Knrl0xmILzqOzwy/W4fxV5TcBggw== Date: Mon, 30 Sep 2024 18:24:01 +0200 From: Herve Codina To: Geert Uytterhoeven Cc: Qiang Zhao , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers Message-ID: <20240930182401.3dd15aaa@bootlin.com> In-Reply-To: <8b113596b2c8cdda6655346232cc603efdeb935a.1727708905.git.geert+renesas@glider.be> References: <8b113596b2c8cdda6655346232cc603efdeb935a.1727708905.git.geert+renesas@glider.be> Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_092406_560458_45CFE666 X-CRM114-Status: GOOD ( 15.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Geert, On Mon, 30 Sep 2024 17:08:31 +0200 Geert Uytterhoeven wrote: > ppc64_book3e_allmodconfig: > > drivers/soc/fsl/qe/qmc.c: In function ‘qmc_qe_init_resources’: > include/linux/err.h:28:49: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > 28 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) > | ^ > include/linux/compiler.h:77:45: note: in definition of macro ‘unlikely’ > 77 | # define unlikely(x) __builtin_expect(!!(x), 0) > | ^ > drivers/soc/fsl/qe/qmc.c:1764:13: note: in expansion of macro ‘IS_ERR_VALUE’ > 1764 | if (IS_ERR_VALUE(info)) { > | ^~~~~~~~~~~~ > > IS_ERR_VALUE() is only meant for pointers. Fix this by checking for a > negative error value instead, which matches the documented behavior of > devm_qe_muram_alloc() aka devm_cpm_muram_alloc(). > While at it, remove the unneeded print in case of a memory allocation > failure, and propagate the returned error code. > > Fixes: eb680d563089e55b ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation") > Signed-off-by: Geert Uytterhoeven > --- > Compile-tested only. > --- > drivers/soc/fsl/qe/qmc.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > Thanks for the patch. Works on my side, no regressions found on my MPC8321 system. Tested-by: Herve Codina And of course: Acked-by: Herve Codina Sorry for this mistake. Best regards, Hervé