Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753248AbbGQUsU (ORCPT ); Fri, 17 Jul 2015 16:48:20 -0400 Received: from smtprelay0091.hostedemail.com ([216.40.44.91]:33820 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751502AbbGQUsT (ORCPT ); Fri, 17 Jul 2015 16:48:19 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:988:989:1183:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3867:4321:4385:5007:6120:6261:6642:7875:8603:10004:10400:10848:10967:11026:11232:11658:11914:12043:12438:12517:12519:12740:13069:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: bird27_e370516a114f X-Filterd-Recvd-Size: 1874 Date: Fri, 17 Jul 2015 16:48:16 -0400 From: Steven Rostedt To: Chunyan Zhang Cc: mingo@redhat.com, mathieu.poirier@linaro.org, serge.broslavsky@linaro.org, broonie@kernel.org, alexander.shishkin@linux.intel.com, zhang.lyra@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v3 3/4] trace: Introduce trace log output function for STM Message-ID: <20150717164816.69015630@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 43 On Tue, 7 Jul 2015 18:10:42 +0800 Chunyan Zhang wrote: > +static int alloc_stm_trace_buffer(void) > +{ > + struct trace_buffer_stm *buffer; > + > + buffer = kzalloc(sizeof(struct trace_buffer_stm), GFP_KERNEL); > + if (!buffer) > + return -ENOMEM; > + > + buffer->used_len = 0; > + buffer->size = ARRAY_SIZE(buffer->buffer); > + > + trace_event_stm_buffer = buffer; > + > + return 0; > +} > + > +static __init int trace_stm_init_buffers(void) > +{ > + if (alloc_stm_trace_buffer()) > + return -ENOMEM; > + > + if (alloc_stm_tmp_seq()) This needs to free trace_event_stm_buffer. -- Steve > + return -ENOMEM; > + > + stm_buffers_allocated = 1; > + > + return 0; > +} > +fs_initcall(trace_stm_init_buffers); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/