From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbaH2Aup (ORCPT ); Thu, 28 Aug 2014 20:50:45 -0400 Received: from verein.lst.de ([213.95.11.211]:50856 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbaH2Auo (ORCPT ); Thu, 28 Aug 2014 20:50:44 -0400 Date: Fri, 29 Aug 2014 02:50:39 +0200 From: Christoph Hellwig To: Hannes Reinecke Cc: Yoshihiro YUNOMAE , linux-scsi@vger.kernel.org, "Martin K. Petersen" , yrl.pp-manager.tt@hitachi.com, linux-kernel@vger.kernel.org, "James E.J. Bottomley" , Hidehiro Kawai , Doug Gilbert , Masami Hiramatsu , Christoph Hellwig Subject: Re: [RFC PATCH 07/10] scsi/trace: Use scsi_show_result trace point instead of printk Message-ID: <20140829005039.GA2876@lst.de> References: <20140808115004.6768.97014.stgit@yuno-kbuild.novalocal> <20140808115022.6768.33712.stgit@yuno-kbuild.novalocal> <53FDE743.2040705@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53FDE743.2040705@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I'm not sure this is the correct way. > Currently we have quite some code duplication in scsi_trace.c and > constants.c, correct. > So I definitely would like to see them both merged. > > But constants.c is influenced by CONFIG_SCSI_CONSTANTS, whereas > scsi_trace isn't, and the functions in constants.c are used throughout the > scsi stack. > So I'd rather see to have scsi_trace to be updated to use the functions > from constants.c, and remove the duplicate code in > scsi_trace. The tracepoints need to use the magic print_flags & co helpers so that output works properly if using the binary tracebuffer and user space tools that decoded it (e.g. trace-cmd or perf), so using a kernel function for decoding is not an option. But we can make these tracepoints dependent on CONFIG_SCSI_CONSTANTS to still allow building lighter kernels if we really care about it.