Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3429150rwl; Mon, 27 Mar 2023 14:02:48 -0700 (PDT) X-Google-Smtp-Source: AKy350YpprWb8Dqw4b+yzm68NK7Nb0k8Ytsw0d/WIIHtrKjztph3xATqKnzLKhKUudo1P7W+CHrW X-Received: by 2002:a17:902:d2ce:b0:19c:e664:5e64 with SMTP id n14-20020a170902d2ce00b0019ce6645e64mr17251164plc.2.1679950967842; Mon, 27 Mar 2023 14:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679950967; cv=none; d=google.com; s=arc-20160816; b=tsiaX/hNcvOnNVG8THshmcRpqpo4CJsPDSyaMAYiDwloMDpkWO9tAIUTmSdE/tOT0/ LvSSzkyHKtXsAdm1W/11CSMUaKpJ9AWNRQEMEXkJZIM3/76ccpO0BJaW0fxihioGF5HC z3OeBSRlzaM1OI+aVi1qbDYwgVDzaNw/ReV8BMkjnM0AFOMb+g/JJ7CFs7/PW5OCtWfk Vx2oeswudTbt6FrgZIKI7VF4aYgrPbvdxqoiFs5Uqh+FG5GzkeUH48jaFEVHlg5TD1Wt ntC/Ozpgu2PrfTlfmMJsbRUGSgc94z5gRH/x3o/0mm5JhMRLZytf5JJdu7PmVr5E6IML 9WBg== 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=c4C1adK+gSO17GVmtt4AHjd7Qfy9M+f3v/0OGBnfLDA=; b=iEzG0+sg9u6z7Gb/5keGW/vISqwdy1LQ9FVwEgP2vHNWIBmT1r7lBjmAj/ZY5EnVts qbc/0yOF+6Vqm7f9SJT7vOPON93WQaiYm43JJMTYHbjLskzWa1qJbRlpN4ASd+j1hSLT uu1zBQpG1tgDZkJcPmQJfCLgrcjyagBuyTVjxN2hJBESRK9UNBDwpVs+EHPShpi0Yre5 T6sb2MLMJentRuJ8+eaYz4ZhRTQ/2UVgjit3HJZSvcv9s0yOTQd+ankxrzM4OL10sti+ D3jSSZ7HO/LyIrva8koV9BpXaridUMFUsxWfz+1Z83B5CVf3M6qAvKB4VmEP/8JZ19Zp ZuFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Y4zHtAD7; 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 ku14-20020a170903288e00b001a1f70cc7dbsi12254795plb.562.2023.03.27.14.02.34; Mon, 27 Mar 2023 14:02:47 -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=Y4zHtAD7; 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 S229822AbjC0UtO (ORCPT + 99 others); Mon, 27 Mar 2023 16:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjC0UtN (ORCPT ); Mon, 27 Mar 2023 16:49:13 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D111D1 for ; Mon, 27 Mar 2023 13:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679950152; x=1711486152; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Em2RGeXOQa0NDkGV9KidPzTIBoL6pOq5V0VfTCZJxi4=; b=Y4zHtAD7UK398vzYnUqeNdh62fD9FLdRnT/Nb3snR9ubsKtNw9x3BgSE GYvcRJ0r/eSFUy951MIjtHzZPNcMsQojsPcvpKrJHMPF0sqWenW1HbqB5 OBj5FpZ96Si3THwyEK5pYtAuj6znGeXXPcfDnKIweJoDFBpsWxNmpbVnm SOW7hPP1MutVInsSio0UvaDM+Dq74cF8JoK0NZPbeiWnKI1V7IP077UeL IxUrzmSlZrqXhdi0k1jaz2eZC3H9L1zQC8TvzbxuHEY7rpD2r6vXe8+UG wootcqavCInNWa7BJVtsABjzcJkKcCUANPIZa3Iny3oUDhwr4CgXmt0NA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="324271170" X-IronPort-AV: E=Sophos;i="5.98,295,1673942400"; d="scan'208";a="324271170" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 13:49:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="929604200" X-IronPort-AV: E=Sophos;i="5.98,295,1673942400"; d="scan'208";a="929604200" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.255.229.96]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 13:49:10 -0700 Date: Mon, 27 Mar 2023 13:49:08 -0700 From: Alison Schofield To: Khadija Kamran Cc: outreachy@lists.linux.dev, Vaibhav Hiremath , Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: refactor arche_platform_wd_irq() function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Tue, Mar 28, 2023 at 01:18:53AM +0500, Khadija Kamran wrote: > Refactor function by adding goto statement. This reduces the > indentation and fixes the issue reported by checkpatch.pl script. It seems our emails may have crossed on this issue. See: https://lore.kernel.org/outreachy/ZBrFqtyY%2FHydnBdT@kroah.com/T/#m5ac406a1ebef0ee5c013b6db75ce1368e292c179 Alison > > "CHECK: line length of 101 exceeds 100 columns" > > Signed-off-by: Khadija Kamran > --- > drivers/staging/greybus/arche-platform.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c > index fcbd5f71eff2..c7d3b6f7368f 100644 > --- a/drivers/staging/greybus/arche-platform.c > +++ b/drivers/staging/greybus/arche-platform.c > @@ -178,11 +178,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) > */ > if (arche_pdata->wake_detect_state != > 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; > + goto out; > } > } > } > @@ -205,6 +201,11 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) > spin_unlock_irqrestore(&arche_pdata->wake_lock, flags); > > return IRQ_HANDLED; > + > +out: > + arche_platform_set_wake_detect_state(arche_pdata, WD_STATE_COLDBOOT_TRIG); > + spin_unlock_irqrestore(&arche_pdata->wake_lock, flags); > + return IRQ_WAKE_THREAD; > } > > /* > -- > 2.34.1 > >