Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20721050rwd; Thu, 29 Jun 2023 06:17:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5RxLiH4spkUY8whcVwzdSgAK2nPeSDK7HiwjAc/JVmUUiWUoTVBZDMaSLgqID7vBs7fwhi X-Received: by 2002:a17:903:22c6:b0:1b8:2537:5428 with SMTP id y6-20020a17090322c600b001b825375428mr6218106plg.50.1688044641232; Thu, 29 Jun 2023 06:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688044641; cv=none; d=google.com; s=arc-20160816; b=0bpKSVDuTgReF3AUYVjLFHD/s8EKi46d61ECTq0PoHJ182rGkcBiZ3avZoqNC9W4XA mDIshBHFshtoD3ztcKRDkZ3lOUNfAq/jKqkkIkDyIEsgDoUW2Lv1hv+kkDPtn2tBJrOf 4aoFhxgFNw8pc8ooSjbNaI5RKWr2fTLyR66t4zf7a2kc2VnvT3G7TTf6rlMmgtUBjP7c WMI+x5jbROszcWOfbhAXTgnRNOOa5R2HGL3+U2Ep2FUg2SdJumr6gaJdzlPGuuhbfGUG qDXk9rr9XWCSmTW8QtT/uqZsLW6ayUxaLTzVBlCROvaTorUBGE0/14qx+EBFOJ8wcRZ0 wqlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=if8XJsQm2fMxTwCzbVNbyTJKRzaYnPHv/zYS+5MnX44=; fh=cuX1NpGORS8SMkppqUPfHNXYnE0c/JaprWFl+l9VQJM=; b=FDCGKOCNQl+UChlYAzIxk2ZpIckokqy+R1S9k8/VeZYSHlWyy3Hq2CNGWP44NXGSrC utWmWCnvYUD7qOKYo0PA/bxoru6I1KKhKR7VEHsgj+1LTkrmati8znnG3Gvod9Gkz5wL f990XK5TeFebl65fyptr85/mmZvn9d9q4nnSGAy5+zPNDA6P+AjtIUbVmZ267xh4NbAs 5IZbvNR9MlBQMrQp7xHe3T8gHGXVIk1cPIH9r/zTmK4CqpUvTMEp0qF0nIe48cg21iMp uXZwjsdcHbn6sDSKw/U7H32oXtAOjXI9/WG5zrrB8K1o5NXPMKikppFtI/llDvjLVdEd RaIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=Y3z7XniS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s17-20020a632c11000000b0054288b91d66si10754663pgs.635.2023.06.29.06.17.06; Thu, 29 Jun 2023 06:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=Y3z7XniS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232000AbjF2NKv (ORCPT + 99 others); Thu, 29 Jun 2023 09:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231743AbjF2NKl (ORCPT ); Thu, 29 Jun 2023 09:10:41 -0400 Received: from forward501c.mail.yandex.net (forward501c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d501]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 802AC2D60 for ; Thu, 29 Jun 2023 06:10:37 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:a497:0:640:fcbf:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id 5AA8C5F186; Thu, 29 Jun 2023 16:10:34 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id WANpoa3WqW20-RlclWTAv; Thu, 29 Jun 2023 16:10:33 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1688044233; bh=if8XJsQm2fMxTwCzbVNbyTJKRzaYnPHv/zYS+5MnX44=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=Y3z7XniSE24LqosSp/6ckbvUicVly6zS+/ky6FHmuP9a1dzx2n4fCNmGj0klWJGHT 7VUahasxmSN132C+3EofvB3xp4Tvne/CLfLXTCkoF22Zq265Us9vTru4D4UKWkYMkO RFXxEfKLmtJz8ZHlTi1wgSeLjOcBnMIKDqUUdwuQ= Authentication-Results: mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net; dkim=pass header.i=@maquefel.me Message-ID: Subject: Re: [PATCH v1 09/43] clocksource: ep93xx: Add driver for Cirrus Logic EP93xx From: Nikita Shubin To: Andy Shevchenko Cc: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Daniel Lezcano , Thomas Gleixner , Michael Peters , Kris Bahnsen , linux-kernel@vger.kernel.org Date: Thu, 29 Jun 2023 19:10:33 +0300 In-Reply-To: References: <20230424123522.18302-1-nikita.shubin@maquefel.me> <20230601053546.9574-10-nikita.shubin@maquefel.me> <35bc18b2e685e8596b1fdc1a2e6212dc98725cd4.camel@maquefel.me> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Andy! On Wed, 2023-06-21 at 11:28 +0300, Andy Shevchenko wrote: > On Wed, Jun 21, 2023 at 11:22=E2=80=AFAM Nikita Shubin > wrote: >=20 > ... >=20 > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 irq =3D irq_of_parse_and_map(= np, 0); > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (irq <=3D 0) { > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 pr_err("ERROR: invalid interrupt number\n"); > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ret =3D -EINVAL; > > >=20 > > > Shadowed error in case of negative returned code. Why? > >=20 > > Majority of clocksource drivers shadow it. Same like above. >=20 > It doesn't mean they are correct or using brand new APIs. Or may be this because irq_of_parse_and_map can return zero as error, and returning zero from timer_init means success ? Please correct me if i am wrong here.=20 >=20 > Can you use fwnode_irq_get() instead? Will it help ? From docs: * Return: Linux IRQ number on success. Other values are determined * according to acpi_irq_get() or of_irq_get() operation. * of_irq_get() * Return: Linux IRQ number on success, or 0 on the IRQ mapping failure > The shadowing is most likely due to nasty =3D0 comparison. Indeed. >=20 > Also that ERROR is a bit weird, pr_err() is already on error level. >=20 Completely agree.