Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp498445iof; Mon, 6 Jun 2022 07:27:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGdqoLizU+xAp+HrXqhvhMHj9WrLW8WgwhbCtNZC8FGBIY49ienXOjoIMh1WeI1RH4iQYD X-Received: by 2002:a63:844a:0:b0:3fc:e1a0:b80d with SMTP id k71-20020a63844a000000b003fce1a0b80dmr19341541pgd.616.1654525640186; Mon, 06 Jun 2022 07:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654525640; cv=none; d=google.com; s=arc-20160816; b=XqHH+f31hG0DzdvPmsC0uyFBYfVWW0+9ANjHwSEMvBWc13iSeiG4cnQ3L2zBCsu9Nq p32IcuA7Ytmy5J/bC+KxkCiIBEVOJrsUlrMi+IOowxRmfKNuP2HOSUOFzVz1Zn0QJvIv r1S2jfMFbKMW1BfD1v/IULlVahrFrdYa8fYGj9EnajeiKAGHryM6C+n23cs56zP+Ehv3 RNe1kyWrlkssLcx5kiuB6YcmwY/usFWUZ4ZTxQwT/YRe9OWJSDP6Jww7La340NA05eSz 13oOVu7724SeZARj2TDHrZigQJ6Z+YF8ReirzCVoharImI0CqeUUQsV5wPVSUnVwresV SOGA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=spAVTDXeNvg2aSc1aozuunse7m9yUKfqDliCw1IqWU4=; b=0Sme9rt6y2Qk42KHuEpbMiVpR3M780+IvcUR3BOhANyI8sBIcMHVb9HJnXNW7KV5dt /Wz098f4MqdMY4rSenBclZBwuRqemjPTQp9+FwLCE2vpfZMc7HE/mJZVhKKN6/AmS4JG RCfqKVDy/W0QpzTy1RreVC6wyegJfsFxRWHkPZdPYc6+JIzqAP/xlktL6Eb6Wx+B1zU0 kAwGdQSlqGzkViEE6fyt6mCk2oifmRIK7V41ZgX+ykcoBRSHW5HQwYXNDLKVgFbN7orP hLFJQ3kI9VmcN23HuPf5l6FX6icjnBDQfDJBeRyWIjBLaCulxa5NJ2yxZTAKLP7ueRn5 ZMPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BkROBVw4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j9-20020a17090a734900b001e3080992c2si18682269pjs.52.2022.06.06.07.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:27:20 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BkROBVw4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E90712B26E; Mon, 6 Jun 2022 07:13:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239704AbiFFONC (ORCPT + 99 others); Mon, 6 Jun 2022 10:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239637AbiFFOMO (ORCPT ); Mon, 6 Jun 2022 10:12:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4CD25E99 for ; Mon, 6 Jun 2022 07:12:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 65A88B8198E for ; Mon, 6 Jun 2022 14:12:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BB15C34115; Mon, 6 Jun 2022 14:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654524731; bh=Yjcb3OtJcORaaknCRkodg9aE4+gNM5Rv2TFudD30oJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BkROBVw41E47C3tHROfSq601AFrmhE5NsUfe/c1T8qpIwkKTfxkJm2BYyd7lalQID s05OYxFC/Kpn1hVVBxon4Vk8MX1CMD3RGe0+srhAl57ZmEnYQsDdr3JJvkl9dHrsAu LkmvrZjnvwO3dUjERP2HgUg86d6qtfOHA8bn9yBRWB63bVS4tYVaOUzMXOOBiWyOBa B+QEFufytkTZR92FBiWvfnVln4qKC/74mAuiQcz6XtunTOcuDuRYZo0lXQDKbttuZ6 I5hfTCtjFOpKMGnPK6wt6wmk+ly7CImbzKN4VWCBqt5izL2qK64xMl4OnwvOv2Qc46 YJDSrHAPzbO2Q== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org Cc: chrome-platform@lists.linux.dev, tzungbi@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/13] platform/chrome: cros_ec_proto: arrange get_host_event_wake_mask() Date: Mon, 6 Jun 2022 14:10:50 +0000 Message-Id: <20220606141051.285823-13-tzungbi@kernel.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220606141051.285823-1-tzungbi@kernel.org> References: <20220606141051.285823-1-tzungbi@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 - cros_ec_get_host_event_wake_mask() is a private (static) function. Rename it to get_host_event_wake_mask(). - Join multiple lines into one if it can fit in 100 columns. Signed-off-by: Tzung-Bi Shih --- drivers/platform/chrome/cros_ec_proto.c | 9 ++++----- drivers/platform/chrome/cros_ec_proto_test.c | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index 91c945c9911f..1622e24747c9 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -230,7 +230,7 @@ int cros_ec_check_result(struct cros_ec_device *ec_dev, EXPORT_SYMBOL(cros_ec_check_result); /* - * cros_ec_get_host_event_wake_mask + * get_host_event_wake_mask * * Get the mask of host events that cause wake from suspend. * @@ -242,7 +242,7 @@ EXPORT_SYMBOL(cros_ec_check_result); * the caller has ec_dev->lock mutex, or the caller knows there is * no other command in progress. */ -static int cros_ec_get_host_event_wake_mask(struct cros_ec_device *ec_dev, uint32_t *mask) +static int get_host_event_wake_mask(struct cros_ec_device *ec_dev, uint32_t *mask) { struct cros_ec_command *msg; struct ec_response_host_event_mask *r; @@ -498,7 +498,7 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) ec_dev->host_sleep_v1 = (ret > 0 && (ver_mask & EC_VER_MASK(1))); /* Get host event wake mask. */ - ret = cros_ec_get_host_event_wake_mask(ec_dev, &ec_dev->host_event_wake_mask); + ret = get_host_event_wake_mask(ec_dev, &ec_dev->host_event_wake_mask); if (ret < 0) { /* * If the EC doesn't support EC_CMD_HOST_EVENT_GET_WAKE_MASK, @@ -522,8 +522,7 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) * other errors. */ if (ret != -EOPNOTSUPP) - dev_err(ec_dev->dev, - "failed to retrieve wake mask: %d\n", ret); + dev_err(ec_dev->dev, "failed to retrieve wake mask: %d\n", ret); } return 0; diff --git a/drivers/platform/chrome/cros_ec_proto_test.c b/drivers/platform/chrome/cros_ec_proto_test.c index 7d73aeb99d1d..f63196289f54 100644 --- a/drivers/platform/chrome/cros_ec_proto_test.c +++ b/drivers/platform/chrome/cros_ec_proto_test.c @@ -239,7 +239,7 @@ static void cros_ec_proto_test_query_all_normal(struct kunit *test) data->version_mask = BIT(1); } - /* For cros_ec_get_host_event_wake_mask(). */ + /* For get_host_event_wake_mask(). */ { struct ec_response_host_event_mask *data; @@ -326,7 +326,7 @@ static void cros_ec_proto_test_query_all_normal(struct kunit *test) KUNIT_EXPECT_TRUE(test, ec_dev->host_sleep_v1); } - /* For cros_ec_get_host_event_wake_mask(). */ + /* For get_host_event_wake_mask(). */ { mock = cros_kunit_ec_xfer_mock_next(); KUNIT_EXPECT_PTR_NE(test, mock, NULL); @@ -915,7 +915,7 @@ static void cros_ec_proto_test_query_all_default_wake_mask(struct kunit *test) KUNIT_ASSERT_PTR_NE(test, mock, NULL); } - /* For cros_ec_get_host_event_wake_mask(). */ + /* For get_host_event_wake_mask(). */ { mock = cros_kunit_ec_xfer_mock_addx(test, 0, EC_RES_INVALID_COMMAND, sizeof(struct ec_response_host_event_mask)); @@ -976,7 +976,7 @@ static void cros_ec_proto_test_query_all_default_wake_mask(struct kunit *test) KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); } - /* For cros_ec_get_host_event_wake_mask(). */ + /* For get_host_event_wake_mask(). */ { u32 mask; -- 2.36.1.255.ge46751e96f-goog