From patchwork Wed Nov 14 13:47:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 151087 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5708896ljp; Wed, 14 Nov 2018 05:47:34 -0800 (PST) X-Google-Smtp-Source: AJdET5dmI4WqR2E4/+n03pOQj6+VOtKEmQmbj6ighRh/J7n6A0SdjBqko7uGdw8v4law31Y90bc7 X-Received: by 2002:a62:fb14:: with SMTP id x20-v6mr2018423pfm.71.1542203254400; Wed, 14 Nov 2018 05:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542203254; cv=none; d=google.com; s=arc-20160816; b=HZnQAW+qGKb6MQOvhYfMi2Jcc8MtKkAxluUE4+QhT2OG5yak16iTdDsfkrGvf5h9zs HaZywHWBwSeZsxVbKZBVto3DO/7+L4Xb6upMEOIVz8/QsnPg3bwbE9r6QHo1o5rtA+Ks BrpuoG53PAEX3BITyDWOmu60atL3I88N2AFgTLvq1/QD88ZtkpfsfHdlhERR4zfd0jnm Q1yhY7bizo2FaOWizRWSqS/MZsNIVxij8Z2ufvvMzUKmjvCQa+AMRlt8vvZqyxFz6aHg 4NsEEQctPUW1TviYStvZoRrC5X3An9jlajW9ksXpVwafwWRO33wjDLWUVdUUv7qn9WgY rsLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=+ilrnVPCgqCg7Re8/mNh2Jua5UAUuT+O2HB50pqHRDU=; b=cHvpuMY59ex/6/5WqLGFmendm17NoslKLReYnGtQ7Zdeyxpgn9tYmeAJN1BnnVfwKp kbBMDVCXTqON31mIB88SAkfoTLDkhCKX9lz57MY1VBuZ1/4oz1t85DE3jK7Nhk45ui7h VZZ0APOrEq/8aRQXOl5t4rN9+pYnhytdD729gLagETR2/smeHicyghSqdz4hL1Irp4Rh kvmbjCvfXm63AUqhT8sBZjM6ZLX6NnrbXe5lCsnGXBDt+9uYSX1TS5WJO/A15W41s1iI 5UPINE2CbI0DK2Otrceb5z+kj+z4Qn6aQG29jxG4CY85U7dUMVASul5OsLIXFWZSvh/c vD9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-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 d12si11655115pln.340.2018.11.14.05.47.34; Wed, 14 Nov 2018 05:47:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732931AbeKNXuw (ORCPT + 1 other); Wed, 14 Nov 2018 18:50:52 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:36345 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732801AbeKNXuw (ORCPT ); Wed, 14 Nov 2018 18:50:52 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CE697C82F4D5E; Wed, 14 Nov 2018 21:46:53 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Wed, 14 Nov 2018 21:46:45 +0800 From: John Garry To: , CC: , , , , , , John Garry Subject: [PATCH 2/5] scsi: libsas: Use pr_fmt(fmt) Date: Wed, 14 Nov 2018 21:47:46 +0800 Message-ID: <1542203269-174932-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1542203269-174932-1-git-send-email-john.garry@huawei.com> References: <1542203269-174932-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org In preparation for dropping the libsas printk wrappers, use pr_fmt(fmt) declaration to add the framework log prefix - "sas". Suggested-by: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/sas_internal.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h index 50e12d6..30f4154 100644 --- a/drivers/scsi/libsas/sas_internal.h +++ b/drivers/scsi/libsas/sas_internal.h @@ -32,9 +32,16 @@ #include #include -#define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt(fmt) "sas: " fmt + +#define sas_printk(fmt, ...) printk(KERN_NOTICE fmt, ## __VA_ARGS__) + +#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG fmt, ## __VA_ARGS__) -#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__) #define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble) #define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0)