Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932435AbVLAUPx (ORCPT ); Thu, 1 Dec 2005 15:15:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932438AbVLAUPw (ORCPT ); Thu, 1 Dec 2005 15:15:52 -0500 Received: from dsl027-180-168.sfo1.dsl.speakeasy.net ([216.27.180.168]:5250 "EHLO sunset.davemloft.net") by vger.kernel.org with ESMTP id S932435AbVLAUPw (ORCPT ); Thu, 1 Dec 2005 15:15:52 -0500 Date: Thu, 01 Dec 2005 12:15:54 -0800 (PST) Message-Id: <20051201.121554.130875743.davem@davemloft.net> To: davej@redhat.com Cc: lkml@rtr.ca, linux-kernel@vger.kernel.org, torvalds@osdl.org Subject: Re: [PATCH] Fix bytecount result from printk() From: "David S. Miller" In-Reply-To: <20051201175732.GD19433@redhat.com> References: <438F1D05.5020004@rtr.ca> <20051201175732.GD19433@redhat.com> X-Mailer: Mew version 4.2.53 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 25 From: Dave Jones Date: Thu, 1 Dec 2005 12:57:32 -0500 > On Thu, Dec 01, 2005 at 10:55:49AM -0500, Mark Lord wrote: > > printk() returns a bytecount, which nothing actually appears to use. > > We do check it in a few places. > > arch/x86_64/kernel/traps.c: i += printk(" "); \ > arch/x86_64/kernel/traps.c: i += printk(" <%s> ", id); > arch/x86_64/kernel/traps.c: i += printk(" "); > arch/x86_64/kernel/traps.c: i += printk(" "); > arch/x86_64/kernel/traps.c: i += printk(" "); > drivers/char/mem.c: ret = printk("%s", tmp); Wow, that's amazing. :) I bet these can easily be removed, and since printk() is such a core thing, simplifying it should trump whatever benfits these few call sites have from getting a return byte count. - 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/