Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6009761rwp; Mon, 17 Jul 2023 13:14:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZR6AiRbi6q9TtYByVRUWCfGlpgrDdS74KrkwqBXpHjUwt65DXjQaWLE17o9kLHM4MUzvs X-Received: by 2002:a05:6a00:21cc:b0:676:ad06:29d9 with SMTP id t12-20020a056a0021cc00b00676ad0629d9mr18200031pfj.17.1689624846944; Mon, 17 Jul 2023 13:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689624846; cv=none; d=google.com; s=arc-20160816; b=M4LN5b829X51zK/Uf1aNqVaT/2pVzKtQCoSCsMYhLNpzDJB6yU7NK5bxjKb1VgKyqO ut/14nFegRK3hNm3WOTs/YrRFoCjlFnWrlCuk9XrcEocX2q0PCLR7m91auUIghkpL92g BwbT4s/6m9VTP634LojJx1H6so76m8lJY5gcchb7VVjGB9Pfgcici/SJGNaZwZhnvriB XrAZZC2aRxmIlqy/BNRvADfuTBfqn+gi+EiFauCsscTrTWetxSvA9Q61+WPFw/7pll6t iW2Kjlp1ZhHln5WInISdhLqoIGAESj1mTFhqtF5c/azS8KBTzZei3tRNNIgELpVVhTYm WyVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=JYJF9jUuoH8+OSLTUvKgDFX+MUf4KcBqy49yggghDsQ=; fh=r0pW40tkm/jD9RjXabFgSoNafui7KeGC/E7yCAT/cFU=; b=sUsK3MRSXMCl00vScWtsy3Q/vgqBYYvft5i9eEvyMeC6e+1Nh3LxvuZkIAjgimOj49 t+gEAyoegyfJED+PCBYGcyuH2hrXhxhE+VgSJl0G7bhzC5RWoCIaB1NsFHOPT8lnscSb IrHT4b1nALLL+mgVaAWjB4kQ2dXFpBWBP8AeHdDXde0ndTsbDMEK5vOILP8VKY/TuAmP L3E4kG5mYaDk6gO0syvCnnwMqD/cQOvf1ZibXKcRU3p6SPmpVDSuKLnQa+k10FMn5HOl I/pPkw2VEWGBFY92UusJxH2cXMXCSNayFUDWH8fXLGDE2pu7Lo+Q/GiyLoYBxcbypNEg h/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=oUtYDNGb; 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=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y25-20020a056a001c9900b0067537349056si284984pfw.342.2023.07.17.13.13.54; Mon, 17 Jul 2023 13:14:06 -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=@crapouillou.net header.s=mail header.b=oUtYDNGb; 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=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjGQTWF (ORCPT + 99 others); Mon, 17 Jul 2023 15:22:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjGQTWE (ORCPT ); Mon, 17 Jul 2023 15:22:04 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF72A1B1; Mon, 17 Jul 2023 12:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1689621722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JYJF9jUuoH8+OSLTUvKgDFX+MUf4KcBqy49yggghDsQ=; b=oUtYDNGboR/faJdt+5APnkwTfthP6RjP3VjaPaKSTvgHCJAXiUfjanp7jmD1aZrczGxWJg 4h2wwFdqw/Gq5YP2uux75jP3mi5Z7BQHSHXbltNX+W/OC8y+fyApzhTIfFV+CIBBIjFF8V t5zXX7QCaIuYrRWE4BnWL3FaDNFov1I= Message-ID: <73161288a07eb34a458061151d9d9a5c10d79c1b.camel@crapouillou.net> Subject: Re: [PATCH v2 03/10] pinctrl: cherryview: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper From: Paul Cercueil To: Andy Shevchenko , Mika Westerberg , Linus Walleij , Balsam CHIHI , Claudiu Beznea , Geert Uytterhoeven , Wolfram Sang , Thierry Reding , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org Cc: Andy Shevchenko , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Jonathan Hunter , "Rafael J. Wysocki" , Len Brown , Pavel Machek Date: Mon, 17 Jul 2023 21:21:59 +0200 In-Reply-To: <20230717172821.62827-4-andriy.shevchenko@linux.intel.com> References: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com> <20230717172821.62827-4-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,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 Hi Andy, Le lundi 17 juillet 2023 =C3=A0 20:28 +0300, Andy Shevchenko a =C3=A9crit= =C2=A0: > Since pm.h provides a helper for system no-IRQ PM callbacks, > switch the driver to use it instead of open coded variant. >=20 > Signed-off-by: Andy Shevchenko > --- > =C2=A0drivers/pinctrl/intel/pinctrl-cherryview.c | 9 ++------- > =C2=A01 file changed, 2 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c > b/drivers/pinctrl/intel/pinctrl-cherryview.c > index eee0f9bc3d32..7a2fc9fe175d 100644 > --- a/drivers/pinctrl/intel/pinctrl-cherryview.c > +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c > @@ -1793,7 +1793,6 @@ static int chv_pinctrl_remove(struct > platform_device *pdev) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return 0; > =C2=A0} > =C2=A0 > -#ifdef CONFIG_PM_SLEEP > =C2=A0static int chv_pinctrl_suspend_noirq(struct device *dev) > =C2=A0{ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct intel_pinctrl *pct= rl =3D dev_get_drvdata(dev); > @@ -1877,12 +1876,8 @@ static int chv_pinctrl_resume_noirq(struct > device *dev) > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return 0; > =C2=A0} > -#endif > =C2=A0 > -static const struct dev_pm_ops chv_pinctrl_pm_ops =3D { > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(= chv_pinctrl_suspend_noirq, > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chv_p= inctrl_resume_noirq) > -}; > +static DEFINE_NOIRQ_DEV_PM_OPS(chv_pinctrl_pm_ops, > chv_pinctrl_suspend_noirq, chv_pinctrl_resume_noirq); That's over 100 characters, please break this line. Cheers, -Paul > =C2=A0 > =C2=A0static const struct acpi_device_id chv_pinctrl_acpi_match[] =3D { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ "INT33FF", (kernel_ulon= g_t)chv_soc_data }, > @@ -1895,7 +1890,7 @@ static struct platform_driver > chv_pinctrl_driver =3D { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0.remove =3D chv_pinctrl_r= emove, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0.driver =3D { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0.name =3D "cherryview-pinctrl", > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0.pm =3D &chv_pinctrl_pm_ops, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0.pm =3D pm_sleep_ptr(&chv_pinctrl_pm_ops), > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0.acpi_match_table =3D chv_pinctrl_acpi_match, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}, > =C2=A0};