From nobody Sun Jun 28 01:44:08 2026 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 B7C83C433F5 for ; Wed, 16 Feb 2022 08:03:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbiBPIDm (ORCPT ); Wed, 16 Feb 2022 03:03:42 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231296AbiBPIDh (ORCPT ); Wed, 16 Feb 2022 03:03:37 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD8B4213F1F for ; Wed, 16 Feb 2022 00:03:23 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id 2-20020a251302000000b006118f867dadso2695505ybt.12 for ; Wed, 16 Feb 2022 00:03:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QwbIJmiyLmPJsz2898M/cKW1wrJYaBVyOrGjlzPUzPM=; b=QKqEMCGcSx2J3hQkVkRuvqwH+mW4FQKm+Y0JL6wkgcPIwTDVabKlRaTr/qFFPbehup Ca3LeujYdXNC2VCz41ANfKgS6oBnpOEROXSNTqS3bVDU1QaF348xv3+8kkZJJotyd2V8 E3kIVWLjfK2kD8yg8EqixIMvSLRUg43RPHZX30hlfDiBKbzj3gsFQT9ZBZp3ZxjTqwQm CUyctzVDYKtaqZBbn4xM8Pa2U1hRSYnv6YWzffTI233Go/qCJNk8FgvJz1inn3Dp7YNC V/9snbueLCPDnKiuBQLE77JmbrEo2JTPgJQXJHXY4Q5zTBBvNB1+cQGjBquckXK404Fe uxGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QwbIJmiyLmPJsz2898M/cKW1wrJYaBVyOrGjlzPUzPM=; b=JI8WZNLrbzdsAp+Vw1UoMiK0HHUxAbkxTedZ1FGXAfU7MXg+e/dc++Lul5weDpALXl 7dZ+u3q7h1xfCpGdB2bOzU9BGEwu9HR+8V0cwdEc/E0x7/etmFOzzBkwbEyLqV2z/JOo G88/hPbNBZutjt1I8d32drVmRrDBBWWHQDHlhLdiJMlHhVFvJGZM8LMZyAi1PXyz95vA PSWU4VcoydYih8LeHz56KAtFm0C4hZs2L7h2b0Rk55d1pwd6GQz+GcKACqvMIFNx021z rkN2JP0EDKFj9P8XK1PVOugeIG9Xhc2mXvLG7vuCJtxEVJw8h+fqokyPbm8FGpkK/Klx FlfA== X-Gm-Message-State: AOAM531vDnOZCLI6a+WW+I7HgB2bqMlQWcCjxtmBuNiLEXBSzm5nmc91 7rYL9ZvRUjHnTF406Imo3qsOQVwGm4q5 X-Google-Smtp-Source: ABdhPJz+DlHTqa1DwdMIlck0KFDFQurTMv/sTMydH+BMvolVF8Nxsj4O7axBlt5IlDG82yTYuLXvIRhG4Ygt X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:8ce7:5b2:9787:1a0b]) (user=tzungbi job=sendgmr) by 2002:a25:e802:0:b0:60e:94cb:dbc0 with SMTP id k2-20020a25e802000000b0060e94cbdbc0mr1056681ybd.509.1644998603121; Wed, 16 Feb 2022 00:03:23 -0800 (PST) Date: Wed, 16 Feb 2022 16:03:02 +0800 In-Reply-To: <20220216080306.3864163-1-tzungbi@google.com> Message-Id: <20220216080306.3864163-2-tzungbi@google.com> Mime-Version: 1.0 References: <20220216080306.3864163-1-tzungbi@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH v5 1/5] platform/chrome: cros_ec: fix error handling in cros_ec_register() From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, pmalani@chromium.org, tzungbi@google.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix cros_ec_register() to unregister platform devices if blocking_notifier_chain_register() fails. Also use the single exit path to handle the platform device unregistration. Fixes: 42cd0ab476e2 ("platform/chrome: cros_ec: Query EC protocol version i= f EC transitions between RO/RW") Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih --- Changes from v4: (https://patchwork.kernel.org/project/chrome-platform/patch/20220216043639.= 3839185-2-tzungbi@google.com/) - Add R-b tag. Changes from v3: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209095703.= 517608-2-tzungbi@google.com/) - Simplify by initializing the variables at the beginning. Changes from v2: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209045035.= 380615-2-tzungbi@google.com/) - Fix grammar error in commit message. - Change the code that don't rely on zeroed memory. - Remove unnecessary `if` checks before calling platform_device_unregister(= ). Changes from v1: (https://lore.kernel.org/lkml/20220125101527.1812887-1-tzungbi@google.com/T= /#u) - Use imperative mood in commit message. - Use IS_ERR_OR_NULL() in 1st patch. drivers/platform/chrome/cros_ec.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cr= os_ec.c index fc5aa1525d13..ff2a24b0c611 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -189,6 +189,8 @@ int cros_ec_register(struct cros_ec_device *ec_dev) ec_dev->max_request =3D sizeof(struct ec_params_hello); ec_dev->max_response =3D sizeof(struct ec_response_get_protocol_info); ec_dev->max_passthru =3D 0; + ec_dev->ec =3D NULL; + ec_dev->pd =3D NULL; =20 ec_dev->din =3D devm_kzalloc(dev, ec_dev->din_size, GFP_KERNEL); if (!ec_dev->din) @@ -245,18 +247,16 @@ int cros_ec_register(struct cros_ec_device *ec_dev) if (IS_ERR(ec_dev->pd)) { dev_err(ec_dev->dev, "Failed to create CrOS PD platform device\n"); - platform_device_unregister(ec_dev->ec); - return PTR_ERR(ec_dev->pd); + err =3D PTR_ERR(ec_dev->pd); + goto exit; } } =20 if (IS_ENABLED(CONFIG_OF) && dev->of_node) { err =3D devm_of_platform_populate(dev); if (err) { - platform_device_unregister(ec_dev->pd); - platform_device_unregister(ec_dev->ec); dev_err(dev, "Failed to register sub-devices\n"); - return err; + goto exit; } } =20 @@ -278,7 +278,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) err =3D blocking_notifier_chain_register(&ec_dev->event_notifier, &ec_dev->notifier_ready); if (err) - return err; + goto exit; } =20 dev_info(dev, "Chrome EC device registered\n"); @@ -291,6 +291,10 @@ int cros_ec_register(struct cros_ec_device *ec_dev) cros_ec_irq_thread(0, ec_dev); =20 return 0; +exit: + platform_device_unregister(ec_dev->ec); + platform_device_unregister(ec_dev->pd); + return err; } EXPORT_SYMBOL(cros_ec_register); =20 --=20 2.35.1.265.g69c8d7142f-goog From nobody Sun Jun 28 01:44:08 2026 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 DB18FC433F5 for ; Wed, 16 Feb 2022 08:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbiBPIDs (ORCPT ); Wed, 16 Feb 2022 03:03:48 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:38678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbiBPIDk (ORCPT ); Wed, 16 Feb 2022 03:03:40 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BA79215C1D for ; Wed, 16 Feb 2022 00:03:28 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id k2-20020a25b282000000b00623dea9687dso2750434ybj.4 for ; Wed, 16 Feb 2022 00:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=1aDHrU0OAcezWyAKSlCofgKbepJMdH6+ryrRYnqT3dM=; b=m3Sv/VM/AlkzDd57mYih9LNc5rNzE8uBAoQF+vV9+aWQnFJQxTji5+HbY31hng1WA5 GCfsFP2zAmvphqMab7UKlG9U8RmvsUoBFfyluy0WN4Rg42Mo1fETKvNiR2BV2XnbLHis ipuYLauO9EQ5q0Tu+OIPQ13DpfgOOV+5S8sN2N9/u1AVAuaeGzcwJQ26ADm0om3OOLWU teAGfdXE+N6iv9PgAywSz729pqw4xhin4KNIjb5EELI91ItE3uC0SZKhjKajM1KmF4r9 HOWw35rpM9zkF7lUqa7L1VTycERYigL6dK+tTvgsXMl8ZZUMEX5m5V0nT4O/brE9LKrg bCAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=1aDHrU0OAcezWyAKSlCofgKbepJMdH6+ryrRYnqT3dM=; b=YqecGbJ9we1z5lh1q4h1dbzQ5J2Dt73ka3I524EQmsBlJfxVVEmEeL6iS9L45pDp+/ bGtuuQUe+78kBc5AJSIuyqGjsbbUr4OyzoDv2VH00EpqxZo1OgPzwPPP1K40q3bryQ8M lz7wdZ6EGHJiL/vpr+N/nyn+lbvXb7Ud3ivalwiMvwqsbRcb/V/lQ6ZSvXyWR0MtwWvN FhVzneW6ivFfPu32cjInbK+emBGDb372Y14X0O7CaV4ZeBHKlr17CfFvk7w0KDEr+lKW 6qrRXOzYWihx++FZ0KHCTMPIWpHZDy/wpjoH9kRVnZMOlHshIN3mSj32U8NZecgUJMDc /a9w== X-Gm-Message-State: AOAM531g5AnefmzJc+wOSQMmF5LWn6W0OwkgQe0dCkW9wIBqFFu+1ICj mTYByEg7ABgI3yUko3RImPWOt2MhjyZL X-Google-Smtp-Source: ABdhPJwnL3ty0rYB/mTS6ohebP4mDHDFhYi+THLa6qb0jeK6tO/c5ZPJ75AyiazmV9ig+lSOTxgPMQ+iQI11 X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:8ce7:5b2:9787:1a0b]) (user=tzungbi job=sendgmr) by 2002:a25:1402:0:b0:61a:9815:b84b with SMTP id 2-20020a251402000000b0061a9815b84bmr1121925ybu.573.1644998607466; Wed, 16 Feb 2022 00:03:27 -0800 (PST) Date: Wed, 16 Feb 2022 16:03:03 +0800 In-Reply-To: <20220216080306.3864163-1-tzungbi@google.com> Message-Id: <20220216080306.3864163-3-tzungbi@google.com> Mime-Version: 1.0 References: <20220216080306.3864163-1-tzungbi@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH v5 2/5] platform/chrome: cros_ec: remove unused variable `was_wake_device` From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, pmalani@chromium.org, tzungbi@google.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih --- No changes from v3 and v4. Changes from v2: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209045035.= 380615-3-tzungbi@google.com/) - Add pmalani's R-b tag. - Remove redundant commit message. Changes from v1: (https://lore.kernel.org/lkml/20220125101527.1812887-1-tzungbi@google.com/T= /#u) - Use imperative mood in commit message. drivers/platform/chrome/cros_ec.c | 1 - include/linux/platform_data/cros_ec_proto.h | 3 --- 2 files changed, 4 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cr= os_ec.c index ff2a24b0c611..25cd8df6e7b0 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -344,7 +344,6 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev) ec_dev->wake_enabled =3D !enable_irq_wake(ec_dev->irq); =20 disable_irq(ec_dev->irq); - ec_dev->was_wake_device =3D ec_dev->wake_enabled; ec_dev->suspended =3D true; =20 return 0; diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/pl= atform_data/cros_ec_proto.h index df3c78c92ca2..c65971ec90ea 100644 --- a/include/linux/platform_data/cros_ec_proto.h +++ b/include/linux/platform_data/cros_ec_proto.h @@ -76,8 +76,6 @@ struct cros_ec_command { * struct cros_ec_device - Information about a ChromeOS EC device. * @phys_name: Name of physical comms layer (e.g. 'i2c-4'). * @dev: Device pointer for physical comms device - * @was_wake_device: True if this device was set to wake the system from - * sleep at the last suspend. * @cros_class: The class structure for this device. * @cmd_readmem: Direct read of the EC memory-mapped region, if supported. * @offset: Is within EC_LPC_ADDR_MEMMAP region. @@ -137,7 +135,6 @@ struct cros_ec_device { /* These are used by other drivers that want to talk to the EC */ const char *phys_name; struct device *dev; - bool was_wake_device; struct class *cros_class; int (*cmd_readmem)(struct cros_ec_device *ec, unsigned int offset, unsigned int bytes, void *dest); --=20 2.35.1.265.g69c8d7142f-goog From nobody Sun Jun 28 01:44:08 2026 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 85926C433FE for ; Wed, 16 Feb 2022 08:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231374AbiBPIDx (ORCPT ); Wed, 16 Feb 2022 03:03:53 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:39006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231375AbiBPIDo (ORCPT ); Wed, 16 Feb 2022 03:03:44 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6544621546C for ; Wed, 16 Feb 2022 00:03:32 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id s11-20020a255e0b000000b0062277953037so2623273ybb.21 for ; Wed, 16 Feb 2022 00:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=SE1MVdE6VYYgYy0YdvS/4bDSsAOzBU2OrOAH/ZUOnFg=; b=oeGfckUJe6Fgl8bC2ziCgYFPG71l9XmLh+g9L4Yq4ppJfmoLfhqaRT7PhyCF92nQa8 4j96bF3sQyGxNkZO/f1cnd1NQ909E/VE6a9nhLAA77BAfpEnT37UN2A9eC49FdNvXi6R cPuzJXe8hRvI79/fT5VfcPQInUsduFGfWbrkcYbuDfDdbB6CVUtn9XdHp8qzDc6X7oVG WtOts4TH2CYXrGzhymjUWttuElJqDwNCNmUf3GiuoB/I3rrg3YaZncqrSi6s6m5EixfI 9j2uLGPci4eqhqDXA+YsoAXY9Wh3tZRmCib2wcZRL+Et7EiEZ2SGmN7Wsl77xLlbx0yT 7jfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=SE1MVdE6VYYgYy0YdvS/4bDSsAOzBU2OrOAH/ZUOnFg=; b=CniIjszXd2t0+EOjO9zKrRmZm2kmqblmEyZxpcJ1Q232A4Z67wbvA3Uvt0P7jm5hXA dx2msdjmSgHeM3mHFQSiVdIADwa5FeMHec/IKLm55Qb107ayshMytPRboUa/QPIk/me6 S0d4e6+QyDpy1e0TWi2hk/AFX8dvRic8kKTVTVNCJbKtgE1KP60K5anMdYX3dkig5DFG Varc+s/qYLA9DTCPaCxvs17RInGbgOdAby9S6vhj7DY/IJukeAcoewGbL60OhJIWuKSd n/5Akm7hgb5EL3C/RHomeue38NqCzvIhqxWIxbUHQkQj1ujzgUKFPgphyOCcqOjmNk+l i+aA== X-Gm-Message-State: AOAM530gqvceAnNAccaTxqbW7MmCuVLK5dpqp2w7m8MgC1HBdPpShRoV vZs80H+5Bqte6UsUyhc8LtJazFoVeJCr X-Google-Smtp-Source: ABdhPJxMKIQf7axeUM4rmevbTIpLdf4pXF/mgLIQe7ZVC5J4o0olbRMFcXkad1Mnde1GqBRBGMAZayKoyZu7 X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:8ce7:5b2:9787:1a0b]) (user=tzungbi job=sendgmr) by 2002:a81:7707:0:b0:2d0:dc96:5729 with SMTP id s7-20020a817707000000b002d0dc965729mr1398343ywc.37.1644998611613; Wed, 16 Feb 2022 00:03:31 -0800 (PST) Date: Wed, 16 Feb 2022 16:03:04 +0800 In-Reply-To: <20220216080306.3864163-1-tzungbi@google.com> Message-Id: <20220216080306.3864163-4-tzungbi@google.com> Mime-Version: 1.0 References: <20220216080306.3864163-1-tzungbi@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH v5 3/5] platform/chrome: cros_ec: determine `wake_enabled` in cros_ec_suspend() From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, pmalani@chromium.org, tzungbi@google.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" `wake_enabled` indicates cros_ec_resume() needs to call disable_irq_wake() to undo enable_irq_wake() in cros_ec_suspend(). Determine `wake_enabled` in cros_ec_suspend() instead of reset-after-used in cros_ec_resume(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Prashant Malani --- Changes from v4: (https://patchwork.kernel.org/project/chrome-platform/patch/20220216043639.= 3839185-4-tzungbi@google.com/) - Undo changes from v3; rollback to v2. Changes from v3: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209095703.= 517608-4-tzungbi@google.com/) - Change the patch title. - Simplify by initializing wake_enabled in cros_ec_register(). No changes from v2. Changes from v1: (https://lore.kernel.org/lkml/20220125101527.1812887-1-tzungbi@google.com/T= /#u) - Use imperative mood in commit message. drivers/platform/chrome/cros_ec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cr= os_ec.c index 25cd8df6e7b0..a013fbceeb03 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -342,6 +342,8 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev) =20 if (device_may_wakeup(dev)) ec_dev->wake_enabled =3D !enable_irq_wake(ec_dev->irq); + else + ec_dev->wake_enabled =3D false; =20 disable_irq(ec_dev->irq); ec_dev->suspended =3D true; @@ -383,10 +385,9 @@ int cros_ec_resume(struct cros_ec_device *ec_dev) dev_dbg(ec_dev->dev, "Error %d sending resume event to ec", ret); =20 - if (ec_dev->wake_enabled) { + if (ec_dev->wake_enabled) disable_irq_wake(ec_dev->irq); - ec_dev->wake_enabled =3D 0; - } + /* * Let the mfd devices know about events that occur during * suspend. This way the clients know what to do with them. --=20 2.35.1.265.g69c8d7142f-goog From nobody Sun Jun 28 01:44:08 2026 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 03576C433EF for ; Wed, 16 Feb 2022 08:03:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbiBPIDz (ORCPT ); Wed, 16 Feb 2022 03:03:55 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:39008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbiBPIDw (ORCPT ); Wed, 16 Feb 2022 03:03:52 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A97B42174A7 for ; Wed, 16 Feb 2022 00:03:36 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id a32-20020a25ae20000000b0061db8f89e46so2679653ybj.14 for ; Wed, 16 Feb 2022 00:03:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=5qzVLz39P8G9OalJ4OG5+jRLXwbeqjg2qWS0xq1akwM=; b=Zt68xi5ETqf1AmcUeuq3ib3RwFunxoigHxeX4oruUT1ON8IYS1e5HH57S7oZhXaOsf lQUppbLjWJe645AnEI28KBFMw3wGt9d16s8XxdeHG0hgOfa9m0va4ZJsq+OvZrlF8iAE k9fg0a5WwdMak8ryMGAL4ruVOC8cZN/fqrcG8Zhv7AbqjpyxzODOHGCSvm5hmqZfhgEF SJQtMINdk8NoYNUcLD5VWvmhs2WOofypKOX4l/bFZtbiR0JWHaM1KvYa4LIvq+hnsK02 FO1fere4I1Z2Oub7t3kwrVCYpZxwUGPnmFcYkZtBG/COKzdtk5R6ul3HMYFrTgB32c1x 2cEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=5qzVLz39P8G9OalJ4OG5+jRLXwbeqjg2qWS0xq1akwM=; b=VC9n993QcFsq0+S+I9jv6mHEYLJGUE62RKsmxc2vzN3o2O/dFYX/8Li0hEnPvEpcUT nJtUxT9mD3E+aA6Z1o5bRuOlPjcZYFS3duFj3Nb/zoqa+BFePGO859SN1+LYg4yE10rJ wfb0hxebYVske+L6lDYdH2/5RFcdIgOtv1sq55b7xTWftsMtlV8b4Hd3O0qN5nQmlGHh MG+pXmGXBmdV0BoUwSv6SIja0mdIYj+wDJQaHbn9B6F5n3PptbCVgkiMAmtxGWC48+th oAHVsuAOZ1Q5wRB9EzZ+keVhegB7baVjbrV7CH6SMKSWcnYcUfPp06fxYgOFSGm92wG7 /XeQ== X-Gm-Message-State: AOAM5313JxbnY76h7lq1/gtD765mbSOUWwcY4tLAQzj/NM2C+bdJzutw DIK3taV0Xq+XFdlqVDTyrO7dt319wg2X X-Google-Smtp-Source: ABdhPJxuoL+5eeFURcGTKeIxlEdvNBxd1Inw7r0oDhOhJ1nc7+k4RTjtYrDB9xE1YHMUHY0ThoqlAGBTkHgf X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:8ce7:5b2:9787:1a0b]) (user=tzungbi job=sendgmr) by 2002:a25:68cd:0:b0:619:8e35:2c3d with SMTP id d196-20020a2568cd000000b006198e352c3dmr1133711ybc.266.1644998615855; Wed, 16 Feb 2022 00:03:35 -0800 (PST) Date: Wed, 16 Feb 2022 16:03:05 +0800 In-Reply-To: <20220216080306.3864163-1-tzungbi@google.com> Message-Id: <20220216080306.3864163-5-tzungbi@google.com> Mime-Version: 1.0 References: <20220216080306.3864163-1-tzungbi@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH v5 4/5] platform/chrome: cros_ec: sort header inclusion alphabetically From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, pmalani@chromium.org, tzungbi@google.com, linux-kernel@vger.kernel.org, Guenter Roeck Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Sort header inclusion alphabetically. Reviewed-by: Guenter Roeck Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih --- No changes from v4. Changes from v3: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209095703.= 517608-6-tzungbi@google.com/) - Add R-b tags. No changes from v2. Changes from v1: (https://lore.kernel.org/lkml/20220125101527.1812887-1-tzungbi@google.com/T= /#u) - Use imperative mood in commit message. drivers/platform/chrome/cros_ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cr= os_ec.c index a013fbceeb03..1e1a24a80d9f 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -9,12 +9,12 @@ * battery charging and regulator control, firmware update. */ =20 -#include #include -#include #include +#include #include #include +#include #include =20 #include "cros_ec.h" --=20 2.35.1.265.g69c8d7142f-goog From nobody Sun Jun 28 01:44:08 2026 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 A9E02C433EF for ; Wed, 16 Feb 2022 08:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231432AbiBPIEF (ORCPT ); Wed, 16 Feb 2022 03:04:05 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:41654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231436AbiBPIEB (ORCPT ); Wed, 16 Feb 2022 03:04:01 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03B4821D425 for ; Wed, 16 Feb 2022 00:03:41 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id h6-20020a253a06000000b0061de83305f2so2645537yba.19 for ; Wed, 16 Feb 2022 00:03:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=cBsOjcPnmLH7/AqklcuehpI9b0p1xbakmUIE5IP9keU=; b=IOikt31P2zEAtluISzAwx5beeMxSU+NsFh4G/wCC2BPZHmo5C2myILKNgUnhx7jIsr 5u1gca1R0sgoUJXWzmNxx+IPiBlv93cY3G2d66YrxGpcD9nUwzXrBzESt8m3gnuPVXX9 Z2f4kXgs7fxoOwbtzUyUbhBMrSiwMuGA5+DN52h/GSaGYQU4LEK9G7b7vRskRbg6zNiQ 4ntsP7jnUj2Pb/JpFYBObmW8NZdFH7XwtW+/mdOH8cz9GDqHH9+lHuNeqJx450ymbW1F JEHs9Q0IJmyclfGlwjN8NQUUPF0l48kvAfWwRBA80U8jmjZoHMadvGHdk7mDydWCUGm3 5FWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cBsOjcPnmLH7/AqklcuehpI9b0p1xbakmUIE5IP9keU=; b=SBzwvYMICKgKsD0hN82XVrKt8ynPO+uXP1M0EtDEgfntytZ4uoWWl7sVoVsU55Q2r3 1idxCRiC10eL3bA3W/BeUwr3EGNmUrkEANqZgzJLTzh9YtZNKMlFn2Ij8syG1Td/iaBz 51yoFFQzaMEXogYIkErZz0wq2NbI6OD7yL5eBOQuq/uN3BZO0DezksKwW38JsfaBfF6o eobjYYWbcDPhbD+/6hE+BRj6KRPEH3Ohg/iLXuwGcv04lGyVfx7rlNbKDv1UVf94AC7q 05jO8ayAeWoYATObkjtANqcbosXVyKlr5EQG7gTyMKVWSAQCclC4doYHL21sQRqs+3ZM VFVQ== X-Gm-Message-State: AOAM530P/Fn0OpPbVUI+SSbeSqF3As3hJarX1r+/F9y+RGy7osEdWNWd 3rqJCtZjjrbg2V93K98+yGQS55grJ3RL X-Google-Smtp-Source: ABdhPJwIKjl5qpVIgCVJ6WFHe5Q6tyytpUjKF+fO3a8yu4ekaUbz6G5cuNxkcJXUaxbtAWEwmzQeSHmbSR5p X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:8ce7:5b2:9787:1a0b]) (user=tzungbi job=sendgmr) by 2002:a0d:ef82:0:b0:2ca:287c:6c5b with SMTP id y124-20020a0def82000000b002ca287c6c5bmr1424157ywe.256.1644998620185; Wed, 16 Feb 2022 00:03:40 -0800 (PST) Date: Wed, 16 Feb 2022 16:03:06 +0800 In-Reply-To: <20220216080306.3864163-1-tzungbi@google.com> Message-Id: <20220216080306.3864163-6-tzungbi@google.com> Mime-Version: 1.0 References: <20220216080306.3864163-1-tzungbi@google.com> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH v5 5/5] platform/chrome: cros_ec: append newline to all logs From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, pmalani@chromium.org, tzungbi@google.com, linux-kernel@vger.kernel.org, Guenter Roeck Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To be consistent, append newline ("\n") to all logs. Reviewed-by: Guenter Roeck Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih --- No changes from v4. Changes from v3: (https://patchwork.kernel.org/project/chrome-platform/patch/20220209095703.= 517608-7-tzungbi@google.com/) - Add R-b tags. No changes from v2. Changes from v1: (https://lore.kernel.org/lkml/20220125101527.1812887-1-tzungbi@google.com/T= /#u) - Use imperative mood in commit message. drivers/platform/chrome/cros_ec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cr= os_ec.c index 1e1a24a80d9f..1395c764d938 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -215,7 +215,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) IRQF_TRIGGER_LOW | IRQF_ONESHOT, "chromeos-ec", ec_dev); if (err) { - dev_err(dev, "Failed to request IRQ %d: %d", + dev_err(dev, "Failed to request IRQ %d: %d\n", ec_dev->irq, err); return err; } @@ -266,7 +266,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) */ err =3D cros_ec_sleep_event(ec_dev, 0); if (err < 0) - dev_dbg(ec_dev->dev, "Error %d clearing sleep event to ec", + dev_dbg(ec_dev->dev, "Error %d clearing sleep event to ec\n", err); =20 if (ec_dev->mkbp_event_supported) { @@ -337,7 +337,7 @@ int cros_ec_suspend(struct cros_ec_device *ec_dev) =20 ret =3D cros_ec_sleep_event(ec_dev, sleep_event); if (ret < 0) - dev_dbg(ec_dev->dev, "Error %d sending suspend event to ec", + dev_dbg(ec_dev->dev, "Error %d sending suspend event to ec\n", ret); =20 if (device_may_wakeup(dev)) @@ -382,7 +382,7 @@ int cros_ec_resume(struct cros_ec_device *ec_dev) =20 ret =3D cros_ec_sleep_event(ec_dev, sleep_event); if (ret < 0) - dev_dbg(ec_dev->dev, "Error %d sending resume event to ec", + dev_dbg(ec_dev->dev, "Error %d sending resume event to ec\n", ret); =20 if (ec_dev->wake_enabled) --=20 2.35.1.265.g69c8d7142f-goog