Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20762060rwd; Thu, 29 Jun 2023 06:48:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CDwohm2m+lwBE/u14pQf5GI7T82Vc2Jd5rGAJqdNEj/nXBCwq/bRxehigzf8Mu0F9yePF X-Received: by 2002:a17:90a:fe14:b0:262:fc6f:88c7 with SMTP id ck20-20020a17090afe1400b00262fc6f88c7mr5480666pjb.23.1688046515581; Thu, 29 Jun 2023 06:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688046515; cv=none; d=google.com; s=arc-20160816; b=VvDJTJRCZ50+7UrC7kBfqbD5xZNZxRYtUjtn8kqXFL/IQY8PDHeUp4XLdUNayHH+Rb T07tzHNpGJ/RZlY0D/Ne9CBy1oaVIAvqv5okmz0ioApZUFzTaMIRFWn1B2sLaaa+r/6N mfUx4/U9URnlhR85S8Ntm1WXhCemb1IpXGR7C/AA7FKV/CI8JqHcnPTFQJLE0hGHoM7C qYRppj31UFSUeYXTy5VCFmQ99DDfSrGxEmKwlApS3Yy76BELUIZM2ENLmipPU/psEXl6 5s9zeTf40WKc3tyFnWlE8iw8u5F5qJlUK5WX+8qcEDcBShC3k8630DOtk5eAoXSFmeba fMfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mAb2qc50QSgKTFPb8asa69yU5CajCxT0KNO3XuPxDPY=; fh=CeCc+e2GkFxgLs4N3E6Pxm3zWFg81Nz7hWE2ZgcFIdE=; b=K8iw6AUOpxRvExg6lvfxcCDa3CjeYcpmC9a+5PXUpRDqBtDkE1GSAzjoTV1X56e1JR uwTAUeG7YtqDwigDKyCc9KMvwroJzuIKL/cGTFKysMo1BlmnFoGOTgjnPnoZMOET7Nzr 3mErV6Khw0ba38mRu9GWbJjcmJFhNu3NQpKdXTt9tySWMK7pYcdr4EnDwYjHjv9rvHlI iUGt7LVdMgg6t78wsXCXZdomk++pENQ8QhhJBGzjTdzjuDBCAX3A+qi9aEsKD6CqqaYQ NJI+VcL4zpDAEQLmNL4g5xMHvsNpJRhocMYTTcV2qvLF7nduhCBIvkq688vH6Cl8GGtd 5sfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=seMchDwO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a17090a86cb00b00260e4b41b3csi3609448pjv.68.2023.06.29.06.48.23; Thu, 29 Jun 2023 06:48:35 -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=@gmail.com header.s=20221208 header.b=seMchDwO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjF2NkB (ORCPT + 99 others); Thu, 29 Jun 2023 09:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbjF2Nj6 (ORCPT ); Thu, 29 Jun 2023 09:39:58 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48BF9E72 for ; Thu, 29 Jun 2023 06:39:57 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-51d7e8dd118so835957a12.1 for ; Thu, 29 Jun 2023 06:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688045996; x=1690637996; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mAb2qc50QSgKTFPb8asa69yU5CajCxT0KNO3XuPxDPY=; b=seMchDwOJbqHygqfbhjvgY6zDaScUTNRxVMu/9mAyvW6b42bFIcLzIXNyo9+eKrY3X rkQGc3UjZVrSYJZp5UkuECuFdz3uFxnBD4wjYAMk+l9XvT9PnltDdWb3es1ZCXie0VSW g2+wneFn8BnS4Oc86rxaCZ0B2zJqcyS0Wiv0HXZgMHG6QIGCyUMjYPESK6RMISeZ9YDk gQqTgqolkqBBUJMnNoqvqD8Y/tYTb0mNPLq2uD1z2e6sT8ZX8fdCSSDbVvh8mMUANtfU I2AV3BG7HTp8uceA2okpB3Y7rQCdD4Q1Xcnsm9/VmA/0W78YFrvj8ZQ8/022thh3AJ61 /n3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688045996; x=1690637996; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mAb2qc50QSgKTFPb8asa69yU5CajCxT0KNO3XuPxDPY=; b=CvANBcAqDPCz4BEfMq/woEtRzdYQd7aRLg9dlssDGGDSC+u28/gZnuUG82uBAsAzo5 SFK/3WMOi4l+cGe4MpgSJ/sCbjdgMtBNtR5LzgbBZrEMBxoZlBCW5Lt+sAUa1GE0u/8S rpw6w2P/yupJ9OHtqN/u1ddM6ujZdgGNZUvx0PKXg6HnwNdS6RCcdM90K8b/z1PBNqpe 67HdoMMwKRdERhsX/FhlJKLGaT9CQL9e8tGFYFyWuUO53gflwhlXJGd7Kn8jhIItTZq1 4Medchd+h6ZAO+R0u++Ap2g9wxQg175gzASswxGwaMuVejlBLyVtESUBb0+WdHRNwUE8 Y8Ug== X-Gm-Message-State: AC+VfDxdv4hQLKIoFNLfQgMJith8SCzP+4y/+Qg4Yagjvio8wj77tkph qOKefGV69RKRhg5gBqgNKtsyIMteotHnMdS8+I8= X-Received: by 2002:a05:6402:1206:b0:51d:8a12:d267 with SMTP id c6-20020a056402120600b0051d8a12d267mr10404875edw.3.1688045995567; Thu, 29 Jun 2023 06:39:55 -0700 (PDT) MIME-Version: 1.0 References: <20230424123522.18302-1-nikita.shubin@maquefel.me> <20230601053546.9574-10-nikita.shubin@maquefel.me> <35bc18b2e685e8596b1fdc1a2e6212dc98725cd4.camel@maquefel.me> In-Reply-To: From: Andy Shevchenko Date: Thu, 29 Jun 2023 16:39:19 +0300 Message-ID: Subject: Re: [PATCH v1 09/43] clocksource: ep93xx: Add driver for Cirrus Logic EP93xx To: Nikita Shubin Cc: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Daniel Lezcano , Thomas Gleixner , Michael Peters , Kris Bahnsen , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Thu, Jun 29, 2023 at 4:10=E2=80=AFPM Nikita Shubin wrote: > 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: ... > > > > > + irq =3D irq_of_parse_and_map(np, 0); > > > > > + if (irq <=3D 0) { > > > > > + pr_err("ERROR: invalid interrupt number\n"); > > > > > + ret =3D -EINVAL; > > > > > > > > Shadowed error in case of negative returned code. Why? > > > > > > Majority of clocksource drivers shadow it. Same like above. > > > > 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. 0 means no mapped IRQ. > > Can you use fwnode_irq_get() instead? > > Will it help ? Yes, definitely, in two aspects: 1/ it makes code less OF-dependent (helps also OF people to clean up the spread of OF headers and APIs where they are not needed); 2/ it takes care about proper error codes. --=20 With Best Regards, Andy Shevchenko