Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8508984rwp; Wed, 19 Jul 2023 10:47:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOEqAaMHhKbYztIp0C4sQhYR9G4T1PVUTjQCRR1Cs14zB/bVX+SQQ/xevBX3m1zF7vmcWk X-Received: by 2002:aa7:d508:0:b0:51d:955f:9e17 with SMTP id y8-20020aa7d508000000b0051d955f9e17mr2820222edq.16.1689788862751; Wed, 19 Jul 2023 10:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689788862; cv=none; d=google.com; s=arc-20160816; b=fbqHT7vRezJ1e8PdW2orCrBlaOQGpFLUpmDOq0Mj0whE9WLPDOwX/RAgk7+yKxep31 AT9CQvvLk9sjL+k9ZmaQRnnzYRA3deSDJvX0c+2OBLCAH3m3YTH7PAi+JlO91GKqRshl +5s0tKgyYgQKGP0zQUczHDzwV4b+vMnhqz0DD2R9cHNLrHCdbj3Q6n5sLrR2U5WvpaqR VuhPJm3PEDAAfNl/3Pb91muZyu4nuYZl97hQrA8Hl7b3mHfsJ8xkcFzd3+CZXoLBsYQh hoqCkD2YohJtsd3cJKm4FUJJVv7IqGBR7ABnD8OiVsV5ToWSpUqy7Rnp5sKAGh2dhJQc rFtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=en+e8QF5ThuyfzwC0sCxy6LpbDBNFF0iVesplUfpVLo=; fh=cA0Ln4kADB9MaxBObWf36lXo0Mdqh7yUk2YEczCWWws=; b=jHD0Z5kXUolrm08nFRzcHHsxDYcmVM4GHStlk2EWbXOs33iG0EHzcEVYhuYT2QikE/ 7pGnIM7dIRtHgqLYaiD8EgXWMmetpGsK/VZE2bU9hncYEdKXnplYxjqNEKJjFTlx+uej KJ6eEe+Vqc+7Lzf/Qeg7Y6WOwKGPeon8CDMgyYEpuV3279HhhfyvkI9etwr3mCbkp5TF rrMzA7Ery8sl6cJszN0fxRJEnnt2RCUB97wn45h/4VTOlg/JsXAu7WiRGPylrbbg3wHA ii9v/tEotK5rMbwWzjFSl3jaIYnmsOwfhlWFZIow/zJTpH5vWrtADiDzsD7YmiZVO7d9 rtFQ== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a056402028600b0051df7bb12d4si3276553edv.525.2023.07.19.10.47.17; Wed, 19 Jul 2023 10:47:42 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbjGSRVU (ORCPT + 99 others); Wed, 19 Jul 2023 13:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjGSRVS (ORCPT ); Wed, 19 Jul 2023 13:21:18 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2561F189; Wed, 19 Jul 2023 10:21:18 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="351395026" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="351395026" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 10:21:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="794128236" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="794128236" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP; 19 Jul 2023 10:21:14 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qMArQ-002Uz0-1V; Wed, 19 Jul 2023 20:21:12 +0300 Date: Wed, 19 Jul 2023 20:21:12 +0300 From: Andy Shevchenko To: Samuel Holland Cc: Linus Walleij , Bartosz Golaszewski , Emil Renner Berthing , Rob Herring , Frank Rowand , Palmer Dabbelt , Paul Walmsley , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 3/4] gpio: sifive: Get the parent IRQ's domain from its irq_data Message-ID: References: <20230719163446.1398961-1-samuel.holland@sifive.com> <20230719163446.1398961-4-samuel.holland@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Jul 19, 2023 at 12:03:46PM -0500, Samuel Holland wrote: > On 2023-07-19 11:54 AM, Andy Shevchenko wrote: > > On Wed, Jul 19, 2023 at 09:34:44AM -0700, Samuel Holland wrote: ... > > Also, can irq_get_irq_data() return NULL? Needs a comment on top > > of that assignment or an additional check. > > No, the earlier loop already verified the IRQ number was valid. I don't think it > can later become invalid. In any case, we already dereference the result of > irq_get_irq_data(irq_number[foo]) in sifive_gpio_child_to_parent_hwirq(). Thanks for explanation, just add a comment. -- With Best Regards, Andy Shevchenko