From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05932C001B0 for ; Wed, 19 Jul 2023 17:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbjGSRVU (ORCPT ); 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 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