Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3982530rwl; Sun, 2 Apr 2023 20:13:35 -0700 (PDT) X-Google-Smtp-Source: AKy350aX34K2ky3xPpKQSEGADII1tnCM6VDH0/fbrbWy6vO7n/+Xgv5WDSwp5eaIVz1EjXJ6j9bQ X-Received: by 2002:a17:903:110e:b0:19e:9807:de48 with SMTP id n14-20020a170903110e00b0019e9807de48mr45604651plh.23.1680491614940; Sun, 02 Apr 2023 20:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680491614; cv=none; d=google.com; s=arc-20160816; b=yhYQ7pmINbIlD352bCH8G4nw9GcpkZJLLyvE6J6jSBP+ufK1Hi1Unz1cTL9qNuQa0O Nx5LSpstoDJEFdazztFlnHDxuDA4JD5Eko6/ffoSXztQ0Pngy0fW7v88j+LJMyef1J6h D4ug+JrYsKVu3YwF70Z1+gvLZrURdKV83Gtu+j/FBFM2G+OtqBKBGbDNejesik+sKO/+ vv6nXsin2efMNx09reuLZxCojcPgMczGKJbfCTCioAdcXYXs3GXCfonzVooVaFMlgr+f KHoNWZkDsFIk+TmuquoDYyrLwesZXFKnk9MBuF+k8c2y8tN4iURy0rY6oM/Rk38MZkfH hHHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6ZiC8x2TxSpfaDY/GGxtcGRpHf563DumSF0wtef7P0g=; b=iVei7TVM8cHXeZ8Fu4Wj6O0uukAHO1tHDBoDjUZ3f8ULsq2RcHoEXoqTSOO+bkJK0X PVRX10Bt3lcrScCCS5iSrBtfRNB8AJ8bNFyaogkngGvu+uzjas2gMXmu0tpMDIiOGF3X n4Zvehb25WslvuOUeTgsAkkH+ovviYzk/HP/7RrAssW6pY4pWWUL+pvfdW4wEYieEGg0 RPDCf7i8ZnnHNKEMOBqe6C4PLk7SFxTOqmnkQk0US6bw3kzpQXMPRhrtETzi8Vl0c9HX pLvQZB6liyYKFzGYyKu4Gnixn4EIb6+KKQzp+Zdalz6Q0/8EJ7m9hJf79dUw3C7uup9m ElZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c5b65u6b; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170902e5c600b001a23cfb3517si7203144plf.359.2023.04.02.20.13.23; Sun, 02 Apr 2023 20:13:34 -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=@intel.com header.s=Intel header.b=c5b65u6b; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbjDCDHd (ORCPT + 99 others); Sun, 2 Apr 2023 23:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjDCDHb (ORCPT ); Sun, 2 Apr 2023 23:07:31 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FB1C65A9 for ; Sun, 2 Apr 2023 20:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680491250; x=1712027250; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GcmrPwQweEDsU0TZJLAO5H0U9qjIpMTqPTXgYTBWRRs=; b=c5b65u6b/Vnd0WzclWStUas/ZZC79q639p4Q8uKXCVBe/fYDYtCeBKsm upBKxcLRSJ8dMkZHjbiBDAQDW9690tRgNYDzIzjlCfd1jOSfllsBz5T74 opNlstFXcp558lkdpl+5Xg41QpSoipj6XMu2WXDA7S5hBJ3ZqDG2iHW08 nvvin+2ubfwVgUZT3WUFw165rnyA6kEwjyjVCLSXYg4LORy/hmSxszjgt pahcech2BAMnAQ6hq0RHl4yziP/TF4Yl+MW85rL5lrNrNEGZ1Cy9lcALs TppoJZ5yTgEXPuEOnJTIPQOGO9V89GOmtQxTaV/tT9LdKAjXJFI9krZHr Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10668"; a="428084309" X-IronPort-AV: E=Sophos;i="5.98,313,1673942400"; d="scan'208";a="428084309" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2023 20:07:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10668"; a="663048941" X-IronPort-AV: E=Sophos;i="5.98,313,1673942400"; d="scan'208";a="663048941" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.209.19.220]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2023 20:07:29 -0700 Date: Sun, 2 Apr 2023 20:07:27 -0700 From: Alison Schofield To: Khadija Kamran Cc: Ira Weiny , outreachy@lists.linux.dev, hvaibhav.linux@gmail.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] staging: greybus: add a single exit path to arche_platform_wd_irq() Message-ID: References: <642a1fdcb2648_394c3829469@iweiny-mobl.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=unavailable 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 Mon, Apr 03, 2023 at 06:21:53AM +0500, Khadija Kamran wrote: > On Sun, Apr 02, 2023 at 05:37:48PM -0700, Ira Weiny wrote: > > Khadija Kamran wrote: > > > arche_platform_wd_irq() function has two exit paths. To make the code > > > more readable, use only one exit path. > > > > > > Suggested-by: Alison Schofield > > > > Reviewed-by: Ira Weiny > > > > Okay, noted. > > Also, would it be okay to send a patch revision with the changes or > should I wait for the feedback on Dan's comment. Here is a link to it: > https://lore.kernel.org/outreachy/6ce8aa34-e600-4d6a-adad-ead8255342e5@kili.mountain/ Khadija, It's customary to wait for folks to respond to your follow ups, and address all the current feedback before sending out a new revision. Ira asked a question about using positive instead of negative logic. I probably steered you down the negative logic path, perhaps it can be flipped to a more preferable positive logic. Alison > > Thank you! > Regards, > Khadija > > > > Signed-off-by: Khadija Kamran > > > --- > > > drivers/staging/greybus/arche-platform.c | 7 +++---- > > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c > > > index fcbd5f71eff2..a64c1af091b0 100644 > > > --- a/drivers/staging/greybus/arche-platform.c > > > +++ b/drivers/staging/greybus/arche-platform.c > > > @@ -153,6 +153,7 @@ static irqreturn_t arche_platform_wd_irq_thread(int irq, void *devid) > > > static irqreturn_t arche_platform_wd_irq(int irq, void *devid) > > > { > > > struct arche_platform_drvdata *arche_pdata = devid; > > > + irqreturn_t rc = IRQ_HANDLED; > > > unsigned long flags; > > > > > > spin_lock_irqsave(&arche_pdata->wake_lock, flags); > > > @@ -180,9 +181,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) > > > WD_STATE_COLDBOOT_START) { > > > arche_platform_set_wake_detect_state(arche_pdata, > > > WD_STATE_COLDBOOT_TRIG); > > > - spin_unlock_irqrestore(&arche_pdata->wake_lock, > > > - flags); > > > - return IRQ_WAKE_THREAD; > > > + rc = IRQ_WAKE_THREAD; > > > } > > > } > > > } > > > @@ -204,7 +203,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) > > > > > > spin_unlock_irqrestore(&arche_pdata->wake_lock, flags); > > > > > > - return IRQ_HANDLED; > > > + return rc; > > > } > > > > > > /* > > > -- > > > 2.34.1 > > > > > > > > > >