Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756018AbaFWQIJ (ORCPT ); Mon, 23 Jun 2014 12:08:09 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.230]:23489 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755251AbaFWQII (ORCPT ); Mon, 23 Jun 2014 12:08:08 -0400 Date: Mon, 23 Jun 2014 12:08:05 -0400 From: Steven Rostedt To: Johannes Berg Cc: Andrew Morton , linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Jiri Kosina , Michal Hocko , Jan Kara , Frederic Weisbecker , Dave Anderson , Petr Mladek Subject: Re: [RFC][PATCH 1/3] trace_seq: Move the trace_seq code to lib/ Message-ID: <20140623120805.1624e1db@gandalf.local.home> In-Reply-To: <1403422685.4418.4.camel@jlt4.sipsolutions.net> References: <20140619213329.478113470@goodmis.org> <20140619213952.058255809@goodmis.org> <20140619220607.c6da2540.akpm@linux-foundation.org> <20140620125823.5acb12dd@gandalf.local.home> <1403422685.4418.4.camel@jlt4.sipsolutions.net> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 22 Jun 2014 09:38:05 +0200 Johannes Berg wrote: > Looking at the code though, I'm not sure it's a pure optimisation - if > you do say putc() after a failed puts(), without this code the putc() > would succeed? I can't tell right now if that's really a problem, but it > seems you could get some odd behaviour out of it. How would putc() still succeed? We're just talking about the "full" field. It would still do the length check: if (s->len >= (PAGE_SIZE - 1)) return 0; -- Steve -- 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/