Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp47179pxb; Thu, 15 Apr 2021 22:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp5wLKRL40xLD/i7aihzf2dUMNB/Ua79uR4GlZxFg7Rr5OogyFtoOL68fYSPnQ9xO6bqVa X-Received: by 2002:a17:906:28cf:: with SMTP id p15mr7061229ejd.191.1618550549421; Thu, 15 Apr 2021 22:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618550549; cv=none; d=google.com; s=arc-20160816; b=L24/QB5ybFvQrXIYgfDUQfeAVIc8mzPWy2K7+czZyTZyH9x7qE2kOv/D9OaS8Q0E3N 6vhasjT5obTPr/iJ6wVFGoVUAhxgG9o7c86Ju8ZGUAqCvtEK96Qyst/OTnnZBaY5QJ1o 3gTtd4XiK4/G2NePOObUXgLwtZoKPXAbQrhSun5LiGROiNy85AN4be0HpBLmEy1HEZ+y qtEEcrWG8bwZ30UvDcjN6dlm6uFFzeX+Lxnc2CVsllulW3o1KkSHtMdQZQOSwJGa6Ez/ JDwxvjtf1HQ8Neyv/yUG/qQPNJgSiboya3GuQ9ZKZ3CbU03OW2v4gU3nCdZIrIybqNpu ZfpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UzHh1s1A9xZLwKQW9CzUH80x6lRo4mY2afOfWgLd+34=; b=DY5UkzjnfF4gUaI6JU+xYRVcZD8lFIxkvw2JfIMPB3h7Q4Jc3G2Y6oNhRHOPGL0ajD IwFMdxL9UO1XW9cAAjZTAFCprlwjEdKwbVsCj/BQWXpanFm1xl1h5o2TW915O2Sul6CA TYgjHTzaqL2Ty6IySIpqXFuC0ZPMlWQwBPUYh0x7z4eyCInccAiXLYt2AgI9hXZj5s9a HHZsD851OG9lMFFWDTv+bBkzBuN1f7rHyjB41Y44zn6DYHl3yYAZWpWdNs7mGahVNUt9 WhIO2FWvE8pjPLsU6zXjmvoZO2enbAnlIjOkuej/MHKsdNDnYl9/JP+5v+layrzyoliX ZxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=O3AN2e6F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si3874753edb.348.2021.04.15.22.22.06; Thu, 15 Apr 2021 22:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=O3AN2e6F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235615AbhDPEeS (ORCPT + 99 others); Fri, 16 Apr 2021 00:34:18 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:40342 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234735AbhDPEeS (ORCPT ); Fri, 16 Apr 2021 00:34:18 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13G4UGuk120220; Fri, 16 Apr 2021 04:33:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=UzHh1s1A9xZLwKQW9CzUH80x6lRo4mY2afOfWgLd+34=; b=O3AN2e6FVhdjRUxyhQIZFAw8cRDklDeFRqA3Sga7B1le4vBWyVmOKSIDTSzhTOdIniG9 vd6xDTzMYAKinHvdiir1n/OGLDYlnRbmEqks/0juzKPNF3TTnsL2PZ6aBNOvBGqV9HYT sS1pkddCYkIQQ0yb9UMrOBLk0iJxYtQ0Lb6QGGuW/8x6b3V/5SPFnPY3L+7m33uNNut3 s+WwGu3GaKYmG9Q/5xicJRil6bB+UKxcCRuB95ePX6Y3bKrHXfpBGMYXDfChNh/vaNxV ijPc5KvUqPUtw3cYrtlGbyFqcBlHqcwZ5Sy+hXRxBTwZyb7xkNq2MxR+75yMmEOifsYj Lw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 37u3erqumm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Apr 2021 04:33:47 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13G4TevP160557; Fri, 16 Apr 2021 04:33:44 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 37unswmt5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Apr 2021 04:33:44 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 13G4Xhvm012119; Fri, 16 Apr 2021 04:33:43 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 16 Apr 2021 04:33:42 +0000 Date: Fri, 16 Apr 2021 07:33:36 +0300 From: Dan Carpenter To: Rob Clark Cc: Akhil P Oommen , kbuild@lists.01.org, lkp@intel.com, kbuild-all@lists.01.org, LKML Subject: Re: [kbuild] drivers/gpu/drm/msm/adreno/a3xx_gpu.c:600 a3xx_gpu_init() error: passing non negative 1 to ERR_PTR Message-ID: <20210416043336.GM6048@kadam> References: <20210409093738.GH6048@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-IMR: 1 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9955 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104160033 X-Proofpoint-ORIG-GUID: 24_kf9yiqzMsssr6F_2R75Yr0qp1Mo42 X-Proofpoint-GUID: 24_kf9yiqzMsssr6F_2R75Yr0qp1Mo42 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9955 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 clxscore=1015 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 spamscore=0 impostorscore=0 suspectscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104160033 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 15, 2021 at 04:21:01PM -0700, Rob Clark wrote: > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 571 icc_path = devm_of_icc_get(&pdev->dev, "gfx-mem"); > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 572 ret = IS_ERR(icc_path); > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 573 if (ret) > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 574 goto fail; > > > > > > IS_ERR() returns/true false so this will lead to an Oops in the caller. > > > > > > icc_path = devm_of_icc_get(&pdev->dev, "gfx-mem"); > > > if (IS_ERR(icc_path)) { > > > ret = PTR_ERR(icc_path); > > > goto fail; > > > } > > Agree. > > > > > > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 575 > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 576 ocmem_icc_path = devm_of_icc_get(&pdev->dev, "ocmem"); > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 577 ret = IS_ERR(ocmem_icc_path); > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 578 if (ret) { > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 579 /* allow -ENODATA, ocmem icc is optional */ > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 580 if (ret != -ENODATA) > > > 5785dd7a8ef0de Akhil P Oommen 2020-10-28 581 goto fail; > > > > > > Same. ret is true/false so it can't be equal to -ENODATA, plus the > > > caller will Oops. > > > > > > Btw, this patch removed the assignments: > > > > > > gpu->icc_path = of_icc_get(dev, "gfx-mem"); > > > gpu->ocmem_icc_path = of_icc_get(dev, "ocmem"); > > > > > > So I think "gpu->icc_path" and "gpu->ocmem_icc_path" are always > > > NULL/unused and they should be removed. > > > > > Agree. Will share a fix. > > Thanks, Dan. > > gpu->ocmem_icc_path/icc_path is used on older devices.. it sounds like > we broke some older devices and no one has noticed yet? This is error paths and dead code. Probably no one is affected in real life. regards, dan carpenter