From patchwork Thu Aug 17 00:33:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 135671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:3f2:4152:657d with SMTP id x8csp510922vqo; Tue, 15 Aug 2023 08:34:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpFy11KY7VRA9bwGl82RFTZB7R/DUvWKNvSjiEpGgD9i061dhcTAIdRG/wLOO6SjOOjYbJ X-Received: by 2002:a17:903:1c9:b0:1bc:afa:95a6 with SMTP id e9-20020a17090301c900b001bc0afa95a6mr12571763plh.40.1692113675065; Tue, 15 Aug 2023 08:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692113675; cv=none; d=google.com; s=arc-20160816; b=Hp8cxmGu4FvQ6uxdpWCOyULgFGpkIzQEUCaD0GfgaQkOZSFGZQhux7d77080unHf3K tBopXFOGlwNQ4uwrsdLwEAEqC/IbLU8RRTRxFMTzpord+qpvpaRpDinq0rAzkqJbn7vh qJHL4jWHpFBCDWCD2CsnA0RBXT4dk/ZoOvp7sFddfWptXqF3ViZBMHPn/JD5wD9JX5Rg 2KjMbWJwoGOS2+K5I9i+yHQn3TcmmeHb63NOGJj/acv8JkkZMDviGGza2BMi5HcI3ZI4 NJACKLks2JAVAtCdfBjy07Wr9mo0MaP3dj5P7C2n+HLCQNaXQpQU0P1nQhys+6cBdW4m Rvuw== 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; bh=udcyu91Hb09EkgjZtHyMxXyCDx9UwcqbXOcKNHB7BcU=; fh=cdzbybEE8pI8liEkMwWU+G/cGRl1J9aiI6DhZnf1lZY=; b=tKs1g3NtDqqpB6pKhKyPDZmysy7FdaikQz7ErdCBpTnHgR9rsPEpFVey6WrHPGJXZ8 zJMDCUUIgKM+QCQGn/ITmH/+s1ocWSPyKsfvhoPAj/ZIMwX2cw/MbixmOo1iJzNma7IC lGiIzoI1gT1mwu38+NVUj7Cz0otF4De2w2jAv/gdCfqEGWgje5fLVJ+6ri8UmA5agEsu EtxjT4cRowC2JEAQhZ/JbTxM5l4tDIfa59zpnEK4u00ridPKwZ1pYkftvmterQiuyJs8 JM5O05pUlNRgBOZOLrStX+FYNqhytKLEXmP6AgVfRlLE+bYc7xCzwswUUkSldxBEVh34 vKTA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902d58c00b001b9d5f07068si9609182plh.585.2023.08.15.08.34.17; Tue, 15 Aug 2023 08:34:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235514AbjHOIDN (ORCPT + 99 others); Tue, 15 Aug 2023 04:03:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235487AbjHOICm (ORCPT ); Tue, 15 Aug 2023 04:02:42 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 790B3172A for ; Tue, 15 Aug 2023 01:02:40 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 3DF5F60280B69; Tue, 15 Aug 2023 16:02:38 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?time=3A_clocksource=3A_Remove_unnecessary_?= =?utf-8?q?=E2=80=980=E2=80=99_values_from_count?= Date: Thu, 17 Aug 2023 08:33:58 +0800 Message-Id: <20230817003358.3118-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774309788728995859 X-GMAIL-MSGID: 1774309788728995859 count is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/time/clocksource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 961c8a79b87a..40eb83d9db28 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -1312,7 +1312,7 @@ static ssize_t current_clocksource_show(struct device *dev, struct device_attribute *attr, char *buf) { - ssize_t count = 0; + ssize_t count; mutex_lock(&clocksource_mutex); count = snprintf(buf, PAGE_SIZE, "%s\n", curr_clocksource->name);