From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A6EB199D8 for ; Wed, 29 Jul 2026 00:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785283522; cv=none; b=OrAyYI9z7v8Jg0znQKW3UH/fj6w+QGTG8RHfv4za7UWZotb67cSohy+Jk7Hzc3K4PsoxYnUasN5j+lQIpwSL2JPYqReFglMQF6l3sLFFO2muk61vcdF/a0emPxsE2VPgTQKGHA9y4MqBx/kjPkueNeVki31OrwGbMDyAY5BqAtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785283522; c=relaxed/simple; bh=ONlgcir+UTj+Ys4YB4PiIpV41E2vss3bsJX+p96sCo0=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=KFL0oJnQwq5tgYRR2V740M9TUGdt87GvxuqiwT3YGheFVdnIYhbNeNBBVIGS636jUMyF5hRu9m4oPVnuJeqaWPw1fTFY/fOHP8mJRtOLDto0ugUcpoJbxoZK2rWySxIgIBjYJeLvYte1QE2KuMKwLYAL392JzAAsPZdxGt08hQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EKldGY5H; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EKldGY5H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A88E1F00ACA; Wed, 29 Jul 2026 00:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785283521; bh=A9LCqEs4iKkKlGFML42IiQ2TLZDnJ7zqJRG9SwLg3v8=; h=Date:From:To:Cc:Subject:References; b=EKldGY5HLKvo/K5cMl3rFaZVhQjv2NqUp1XaS/scoDsJ8dxDGY7Z2ZEQ4zuWUenzO PuAuCxdSx9ecJ3duPgSNJHtNwT/szPKMj3W6kexu3/umgwi0vDn2R+znDL+yqM1BeV gjqI8FJYxi6U2DBn6hxkssfRjJ23TM1/BTCcrNjgzaJa4EB3rluRPruQTzmQiO9oed rwpxmNMHmvjjO36NdzQsJEpgW4BSpbcOE92bEcy+hoedjK4slwt8H683CaMGj5+x6m p7Ezb+2fBPrmzCAKKuXIp0vOwJHInpx6LH5ECzW0+tQvPmMgskkFCBrriG3lBfXexW KgCzOzkcw1dJA== Received: from rostedt by gandalf with local (Exim 4.99.4) (envelope-from ) id 1woro3-00000006Ubi-43At; Tue, 28 Jul 2026 20:05:55 -0400 Message-ID: <20260729000555.823727578@kernel.org> User-Agent: quilt/0.69 Date: Tue, 28 Jul 2026 20:05:27 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Yu Peng Subject: [for-next][PATCH 04/16] tracing: Point constant hist field type to string literal References: <20260729000523.093060274@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: Yu Peng The HIST_FIELD_FL_CONST path uses the fixed "u64" type string. Point hist_field->type directly to the string literal, matching the HIST_FIELD_FL_HITCOUNT path. The release path already uses kfree_const(), so no duplication is needed. Link: https://patch.msgid.link/20260527023450.2137639-1-pengyu@kylinos.cn Signed-off-by: Yu Peng Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt --- kernel/trace/trace_events_hist.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 58d28cd1afa3..a335006923ec 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -1984,9 +1984,7 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data, if (flags & HIST_FIELD_FL_CONST) { hist_field->fn_num = HIST_FIELD_FN_CONST; hist_field->size = sizeof(u64); - hist_field->type = kstrdup("u64", GFP_KERNEL); - if (!hist_field->type) - goto free; + hist_field->type = "u64"; goto out; } -- 2.53.0