Message ID | 20230112043908.2938964-1-wenst@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3699864wrt; Wed, 11 Jan 2023 21:08:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXugYjwOQ/OFG7cHDi1CzWA81l5wRhw1MM16pk3C+REO8GoiiNqidNYOx9W4K+ZmCCaROolH X-Received: by 2002:a17:907:8a16:b0:7c1:458b:a947 with SMTP id sc22-20020a1709078a1600b007c1458ba947mr99742238ejc.26.1673500093153; Wed, 11 Jan 2023 21:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673500093; cv=none; d=google.com; s=arc-20160816; b=fm/MNUSEB8iOtlcLfvvyxTqBeJUem1AgLCHu7c3vvRx+7E80aIRPdo9JYm51/f9yTJ 73vxsaBuLRioCK/UXTXUxzuN/0aLvlM+Ee73FqYPi0Ulj4plmN/y51CqFsqLiHmTNtVm j8JY0qeFrRLQJUT9lI9ghUgvSzr2a/vFMmr4p+/H8LYTPM0Ge8kIOAgLgwIM3vKl5uXU Jhu0ee/QZNrqxgA6vW7fQdTmljfvyje0Ful7Qj3xdbCTp9i41BXgn/071gTQbEyjt4VX VYAHXIvLXno1VVDkKlAmex6GzlCitLNIdgv6882p2QopvJTa2TmjWgr+ymnSiVaOFY6p wlJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nCtsRB96tDB6ymydz+7uG9f0tEsazRT+tKtFE7IAYuA=; b=vEjf8pCDmRe58qqq7UszcLnTYYt1PDsarLi4CcOhmG4UnIzosTptE+5al5FnPRECJE X2hEZg2BxeeEwSI7UEMdLAkDhk+whFRLjB7JYfPteERdOaCf8rWmpoOR045dKc9ggmz0 3vVxHWxl//mmvgrfHiWckyui7ZAoQBkGXyhFjxXzqe8b1bYp1SwkvaOSgraWsjbZRlEE WGIbdUx66KjCT0K++8ak4Bs+OV04xoElJPRG0Wpbprl4Vx1uEnZeWHgQxgYo5ALXp/e7 8l9TtqkxwNCypiTRLuuY2sd6xQ1yp5fJwSLvBWmgFALKsQ6Y8gHmz+GtGzNPcKJKoEiV l96Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EKBQtrRq; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd20-20020a1709069b9400b0085b4d436b51si5872168ejc.996.2023.01.11.21.07.50; Wed, 11 Jan 2023 21:08:13 -0800 (PST) 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=@chromium.org header.s=google header.b=EKBQtrRq; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236472AbjALElS (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Wed, 11 Jan 2023 23:41:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239078AbjALEk3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Jan 2023 23:40:29 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 944C7496D5 for <linux-kernel@vger.kernel.org>; Wed, 11 Jan 2023 20:39:34 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id k19so12939933pfg.11 for <linux-kernel@vger.kernel.org>; Wed, 11 Jan 2023 20:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nCtsRB96tDB6ymydz+7uG9f0tEsazRT+tKtFE7IAYuA=; b=EKBQtrRqzsJpW4Uup0IpMJ6SWOaFDOmYKFSXSlY+tV6r4uGbSkPHtKifX2aL/CxmNM OK0xV+ZlW4gY0M8KFuTFSZVzOwlbw89QJtr+tC4xen9yI61kMXUKdzXr++cRgY4YRmZT Dn1fTHQEHNAl4WHkEfPgNPvnHlZSEY228FJow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nCtsRB96tDB6ymydz+7uG9f0tEsazRT+tKtFE7IAYuA=; b=OofII9lWxNwxePPkPWyCYLX2//KCnz61K8G/SMASHdqULHOm+KQ6p9uJt0cEOmpP+U Dde0u6JZyBomDDRyOymhe04O1k+1LmWhpw6JD9nqxvB6wxx4Im65Am8BAqHieC2WYXNr gLZME0inqoMYIY+XgEL2okqvEX4VWNYov6Dq2k3UW3npkJe5Fdtuw2wdVNU/+GZW0V8T rcBYdFVlma3XECTr61P/Sbubxwnep6l/37+jlJ7II2UOZULIs/0JMr03nY6bOLQucb8A vej49up6r0YDsm+z9MMjI2W56pQebuJym0+FIL5RDvS9mqrwc7eUpcsZBGOUU6NPj/5x 56ug== X-Gm-Message-State: AFqh2krYCUrfVb2e5xRrZXp6SzTKaqX9ZrADyZ1wj8XkZ2QbZmUwfQwq 4vCc+ac3uETAWMcUSrItMfnEkg== X-Received: by 2002:a62:1791:0:b0:578:8533:9573 with SMTP id 139-20020a621791000000b0057885339573mr65335894pfx.22.1673498374112; Wed, 11 Jan 2023 20:39:34 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:8720:bd4c:a7f7:4e33]) by smtp.gmail.com with ESMTPSA id h10-20020a056a00000a00b00573eb4a9a66sm213725pfk.2.2023.01.11.20.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 20:39:33 -0800 (PST) From: Chen-Yu Tsai <wenst@chromium.org> To: Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org>, Tzung-Bi Shih <tzungbi@kernel.org> Cc: Chen-Yu Tsai <wenst@chromium.org>, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] platform/chrome: cros_ec: Initialize panic notifier block Date: Thu, 12 Jan 2023 12:39:08 +0800 Message-Id: <20230112043908.2938964-1-wenst@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754792033658326152?= X-GMAIL-MSGID: =?utf-8?q?1754792033658326152?= |
Series |
platform/chrome: cros_ec: Initialize panic notifier block
|
|
Commit Message
Chen-Yu Tsai
Jan. 12, 2023, 4:39 a.m. UTC
Commit d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic")
added a new notifier block, but failed to initialize it properly,
resulting in a warning and stack trace (omitted):
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
Initialize the notifier block properly.
Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
drivers/platform/chrome/cros_ec.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Jan 12, 2023 at 12:39 PM Chen-Yu Tsai <wenst@chromium.org> wrote: > > Commit d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") > added a new notifier block, but failed to initialize it properly, > resulting in a warning and stack trace (omitted): > > INFO: trying to register non-static key. > The code is fine but needs lockdep annotation, or maybe > you didn't initialize this object before use? > turning off the locking correctness validator. > > Initialize the notifier block properly. > > Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Looks like someone beat me to it. Please ignore this one.
On Wed, Jan 11, 2023 at 8:39 PM Chen-Yu Tsai <wenst@chromium.org> wrote: > > Commit d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") > added a new notifier block, but failed to initialize it properly, > resulting in a warning and stack trace (omitted): > > INFO: trying to register non-static key. > The code is fine but needs lockdep annotation, or maybe > you didn't initialize this object before use? > turning off the locking correctness validator. > > Initialize the notifier block properly. > > Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Guenter Roekc <groeck@chromium.org> Didn't I already see this ? Guenter > --- > drivers/platform/chrome/cros_ec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c > index 4ae57820afd5..b895c8130bba 100644 > --- a/drivers/platform/chrome/cros_ec.c > +++ b/drivers/platform/chrome/cros_ec.c > @@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) > int err = 0; > > BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier); > + BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier); > > ec_dev->max_request = sizeof(struct ec_params_hello); > ec_dev->max_response = sizeof(struct ec_response_get_protocol_info); > -- > 2.39.0.314.g84b9a713c41-goog >
diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c index 4ae57820afd5..b895c8130bba 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) int err = 0; BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier); + BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier); ec_dev->max_request = sizeof(struct ec_params_hello); ec_dev->max_response = sizeof(struct ec_response_get_protocol_info);