Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp693105rdh; Sun, 24 Sep 2023 07:45:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYpm+1TgbX06tqGbTUNppDeyjtNaZOOcifUt2Kn/X9bgutufr53cW1cK95p+te99rRL5f7 X-Received: by 2002:a17:902:82c4:b0:1c5:f4c7:b4d5 with SMTP id u4-20020a17090282c400b001c5f4c7b4d5mr5490104plz.34.1695566721839; Sun, 24 Sep 2023 07:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695566721; cv=none; d=google.com; s=arc-20160816; b=EE+fU8X789LIAJbiyNTtRW5/ddvlV9pvhoveKkQ64AufJw//pi7E0lqkjmsyKb9iFq 7QVVudkoq68GE/fCBF8PFzzFMfYW2JwnjM9RD3XkCF34hs/mYSZRGG8v8MD0WgwgmAYo zlvK4OAqU+/GAmuS35U6thdkTn5w+E+FZ7+hqX1mHFArBNqx6PN4BLebZtrny/znoJ+U ZcGgY+7EhUqLmh55TR7E9fqwrAwbvsQ6F5y9Hnd5nLExgbYFtf1LfisbnbnbHIhWAT8s ZQoxxJohrSjgVOn7H9QhZO+4drna+uMkIpcClA46P/rypobAEpR7KP2IJOZkvW6JZjXC BXTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DmGyCBQAHmjeBS0vkEvgn/fb8DOR1oVjNQmbaMrjvLU=; fh=gOYK1mICg2WLy4KeniTd8RoSUUUJxzuy1fcHcjAPWgw=; b=aPjgis2KekuzIk6bcpOu8KGnc2f7/JXVODPpnPbPKyIsxzG84efMwyPmMZMFGSKcK1 oxeydJu4HTMGAjxNxdCXVN0oGhywADk4NbFKbStzyRLoARc5/p0003yHU24b1wPi1W6L TrfiFB5xEfxRH+czt8BAkhl2EW5u0hkCOWNIJx53x2F21t4txEKfd1b9k/ZalGQmKpg4 Z1rnMhLLgTk6Y9nFaYX0duV73nwDFCfiCYCdv8P956IiWh7Wp61VW2DQBiEsNANF4YdO E6f+h/Q4gDixB0ekNBoeEdNR73cD0bSl7WPsRfGsVAzpHn0h3ALlKSSvKuvaT/baonUX ZB2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mv4+2JfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z3-20020a170903018300b001c4352c2ca6si9033539plg.591.2023.09.24.07.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 07:45:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mv4+2JfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7A9958080EE8; Sun, 24 Sep 2023 04:41:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjIXLle (ORCPT + 99 others); Sun, 24 Sep 2023 07:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjIXLld (ORCPT ); Sun, 24 Sep 2023 07:41:33 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED87103 for ; Sun, 24 Sep 2023 04:41:26 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-52fe27898e9so5472070a12.0 for ; Sun, 24 Sep 2023 04:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695555685; x=1696160485; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DmGyCBQAHmjeBS0vkEvgn/fb8DOR1oVjNQmbaMrjvLU=; b=Mv4+2JfPZsZBM+49lzb4pjYK2eAjyiol4TgzHPbIRFKx2/LYg6Vg6AsPQ1mYC9fxAS wjjKKMIYMKKhjl+0Of7hgOO7pTBy4FGWNh/7rUFNQCxO7MZTal9Brq+OKvIx8usbahQT qtD0dNxsrYIxawRr4Qyk5AfCkkXPCBs6P9rWohgjO0xr3uhvgIKpQ2Wxi+hg3Ff0Joks iVSHeKvqdI6ol8c+SQ63DtfmmtOfpsItvYqEykWIomop5bAYMKLYumUsFTWtG5xVc5Za rhWpU/LEOljT/CQsb/hVXmwnOWsOUK8YWIMMrkKW0PSChD99HEARNJga5tsXP+7IDdZT coxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695555685; x=1696160485; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DmGyCBQAHmjeBS0vkEvgn/fb8DOR1oVjNQmbaMrjvLU=; b=VwGFcJdzfLwi9Bw6N+WfTYH4AqSP8I2dSoXM2iWCwm0BMqFCq03xkn8u+qRgUgSPUW hSUtcCMKMyc2SDhbNKs42M3t3YYLSTJZ3FycsLlhfBseEJtgWsHSGadi7LvSizXjJx04 +ishFkt0jfvbeFZoP8SNcQGIaXZmHxdrnuN5pGWeDjvsEKG6LB3nDL4nR/C7Ie6v1qih RQWOoaQjoTyUGau83mgGRc2bU9YyzWPEFzrT3RDn3/b5AUtYhy7f7TtU2B5w1qAsk6kN xb/OAttRNaNEFjW4lm3hkTVm5THKnhZv90Ie5HNiIl77Edu3urVbMEpIX/fuGNjiqapH xk2g== X-Gm-Message-State: AOJu0YyTrsA5TnAQ+dpoIUSRsl8uKRZlOrmT/HbNtT5Uv1ZBN9ZGaTHk +4Z3pXlQooVWWIZX5HYld17plw== X-Received: by 2002:aa7:c741:0:b0:533:5c03:5fce with SMTP id c1-20020aa7c741000000b005335c035fcemr3479696eds.5.1695555684782; Sun, 24 Sep 2023 04:41:24 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.100]) by smtp.gmail.com with ESMTPSA id w25-20020aa7d299000000b005329f1aa071sm4265405edq.10.2023.09.24.04.41.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Sep 2023 04:41:24 -0700 (PDT) Message-ID: Date: Sun, 24 Sep 2023 13:41:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: ERR_PTR(0) in a couple of places To: "Dr. David Alan Gilbert" , matthew.brost@intel.com, mgreer@animalcreek.com Cc: linux-kernel@vger.kernel.org, airlied@gmail.com, intel-gfx@lists.freedesktop.org References: Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 24 Sep 2023 04:41:34 -0700 (PDT) On 24/09/2023 02:41, Dr. David Alan Gilbert wrote: > Hi, > I randomly noticed there are a couple of places in the kernel that > do > ERR_PTR(0); > > and thought that was odd - shouldn't those just be NULL's ? > > 1) i915 > drivers/gpu/drm/i915/gt/uc/selftest_guc_multi_lrc.c : 47 > > if (i <= 1) > return ERR_PTR(0); > > from f9d72092cb490 > > 2) trf7970a > drivers/nfc/trf7970a.c : 896 > > trf->ignore_timeout = > !cancel_delayed_work(&trf->timeout_work); > trf->rx_skb = ERR_PTR(0); I would guess that code is relying on rx_skb being valid pointer or ERR (if (!IS_ERR(...))). Best regards, Krzysztof