Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp487764imm; Fri, 29 Jun 2018 01:02:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5z9t6GH62ryNQlfZlmBMX7JHYr8Djc4ZG3R9dATs10yVgjdp+vlqBShjDTcERtsL7Q8vK X-Received: by 2002:a17:902:be0d:: with SMTP id r13-v6mr13735856pls.299.1530259342178; Fri, 29 Jun 2018 01:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530259342; cv=none; d=google.com; s=arc-20160816; b=L1bv8iw6Rwm/7l8ziVq1eFzx3Ll4qM6TJcpWlPzqWQMEe/OsKigxouTE2qx++RMNxO 2ceE36nfuISyHHaUCMFW1htbeja71UUnj4fWHIoMw620zxT4LDk2nMUMvqdQKlMt5Lan 3vOE2A5yEihg+LT7cXcDxIvrqtQmnLFgMUQ3XeTkXkjDNFaFUHacp1mVsTbYWDPSCGLy nvrz3IjOayh2CfanbLKXDBO2SlteUcTIoG9w4kBAR1D8MKgkWif3DXnwRlgdPt7rZWDT 2niRbUSyhWxHX0QCl+eHYMIPQyVJOfh66jJq0aMebrd66g6MTZx+EZ+1SCone4IVoH/a kUKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=KyK0GZWnIfkBX+Knzb5vfphBeSaE39EoHod5yerPTAE=; b=NYvX362NYGl3IlsqGQX8WYrMgooiWLPrwIvyHqsAr/NMlFELx30b8beE4Im5/S3jZm s3YQfvhZEIugwhFYQECJGRK33W8KArkRouP3DubRWRKDdBjQl6rfqoEDSGgaRmiSlfPH 8QWA+WIIcFvHcUexiyB85FuHLVdtDJkoryhdTJTJUMWqWdzoTpLHMoM4+xkh6yRWwGd5 2ZHzFRQmXxGeDQnN6IcpXMAZzk5PDYDi0ypK4c65VZwD+zYeDtoVa9aJ3Q9KuYZKQxGX KRu/s9H8Toz9ZiCGsJLlDf+epukLtLbcDeLOy7D/qtuBF3rQ/Wcy0ACMVYX7fthC3R4x 7Wbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si8650435pfj.6.2018.06.29.01.02.07; Fri, 29 Jun 2018 01:02:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934458AbeF2IAE (ORCPT + 99 others); Fri, 29 Jun 2018 04:00:04 -0400 Received: from verein.lst.de ([213.95.11.211]:52883 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933949AbeF2IAD (ORCPT ); Fri, 29 Jun 2018 04:00:03 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 93A3168C4E; Fri, 29 Jun 2018 10:00:08 +0200 (CEST) Date: Fri, 29 Jun 2018 10:00:08 +0200 From: Christoph Hellwig To: Keith Busch Cc: Johannes Thumshirn , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 4/4] nvme: add disk name to tracepoints Message-ID: <20180629080008.GB13413@lst.de> References: <20180628214956.13877-1-keith.busch@intel.com> <20180628214956.13877-5-keith.busch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628214956.13877-5-keith.busch@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +const char *nvme_trace_disk_name(struct trace_seq *p, char *name) > +{ > + const char *ret = trace_seq_buffer_ptr(p); > + > + if (name[0] != 0) > + trace_seq_printf(p, "disk=%-.*s, ", DISK_NAME_LEN, name); if (*name) trace_seq_printf(p, "disk=%-.*s, ", DISK_NAME_LEN, name); ? > + req->rq_disk ? > + memcpy(__entry->disk, req->rq_disk->disk_name, DISK_NAME_LEN) : > + memset(__entry->disk, 0, DISK_NAME_LEN); Make this a helper please.