Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp959980iob; Fri, 13 May 2022 17:46:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweXfjXqMBXsInHuW6AT5erprG6CNOfvHdWEJY7fiIV/758z4dH6c4d13IBTN/fo+A6lCoa X-Received: by 2002:a5d:60c5:0:b0:20a:ed1a:9f9 with SMTP id x5-20020a5d60c5000000b0020aed1a09f9mr5768212wrt.623.1652489203197; Fri, 13 May 2022 17:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489203; cv=none; d=google.com; s=arc-20160816; b=ibUX8+0N1++tsHd+n5TN/oj2n776DTVt1X26HtnU0lgPQgJXijUN3N7vHdFGOs6UgA 9b+rn+/i45DrY68QUEma1/apSASFS/08SPOH5QzLaWhFP6lRV+Ae7BK2AR2NOGC9VVoC DWMGZb5+tkPNCcYgc2CUrPbKjzCSZb3U7z3avWpq3+MLKKS50xkoRrDM9k/R4wq3EFx0 YCqvtCWYZuOHZJvd+Z/hAKcSF0C8BJBOPfXtnGsnkkuisqVXInJ4Wb6oQ9jz/caHOmln 3pzZJiq6gUmTNnte74kVgucSNPUjSNPsEKDS6vZQ95KPgFF7jP4XT7BNmbOHTElzeq6O 88dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=+zUKEA9fkyx8oyjl+VUU76mdGCXSg3kRnt4+IOxHy6k=; b=evAzG5H0G6lrn3rN+o/iZcIyY1lslWiCUWgcIAJ8MPI1ETV89AbX8egCSDucx60vt9 EvbMesMqKOlqdumm8Fc8ASJt8KlMsxbMS1gioBk8rhUBG5eTQNZ6stjpbIJTzaCfMdXx hAuunIn/8FBun1j+j+nfjZm6G4LqhXR5YAfyS88qSEWuWHHeuGPBfaGkn7fMcAj85xSb yeJs8ZEHG/bLRmzUiJmAPsHQX1rWgY8N2/P4DRrpSJ8Vpz821zbjA9xuzJidIdCiWjSM hWle+xZFqensevzIwai24AI8l4w6XBlpqxB/Btp18YbLmzFK2AW7KZVF6YaOjlQ8axHb QILw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r14-20020a5d6c6e000000b002078850086dsi4221081wrz.1055.2022.05.13.17.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:46:43 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28E413327C9; Fri, 13 May 2022 16:26:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377946AbiEMHxi (ORCPT + 99 others); Fri, 13 May 2022 03:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377939AbiEMHxe (ORCPT ); Fri, 13 May 2022 03:53:34 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 369619B186 for ; Fri, 13 May 2022 00:53:30 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 3FC631E80C96; Fri, 13 May 2022 15:47:47 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1B9KQIwIbOZ6; Fri, 13 May 2022 15:47:44 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: liqiong@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id F2E341E80C93; Fri, 13 May 2022 15:47:43 +0800 (CST) From: liqiong To: Steven Rostedt , Ingo Molnar Cc: linux-kernel@vger.kernel.org, hukun@nfschina.com, qixu@nfschina.com, yuzhe@nfschina.com, renyu@nfschina.com, liqiong Subject: [PATCH] kernel/trace: cleanup code, remove init "char *name" Date: Fri, 13 May 2022 15:52:21 +0800 Message-Id: <20220513075221.26275-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 The pointer is assigned to "type->name" anyway. no need to initialize with "preemption". Signed-off-by: liqiong --- kernel/trace/trace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 64649990a66a..d511581cfafd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4273,9 +4273,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) struct tracer *type = iter->trace; unsigned long entries; unsigned long total; - const char *name = "preemption"; - - name = type->name; + const char *name = type->name; get_total_entries(buf, &total, &entries); -- 2.25.1