Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp105543yba; Thu, 2 May 2019 21:03:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMwYh0/8riP/s886dI/SDO6tbu9/8Hd+4q+6RzdDzKWC6f3ELHhuCIGuZ++Kqh3D7vYJvb X-Received: by 2002:a63:750c:: with SMTP id q12mr7800180pgc.133.1556856203109; Thu, 02 May 2019 21:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556856203; cv=none; d=google.com; s=arc-20160816; b=glh3ORYBV5V25MFAJjYRcKAutzIhRRq3zQAuA+zTBrQcPR/ShaT46aZ0jSbS3oYmaw Lx+rZ5RO8Ij/jvxPi+D3n/+yP1A5johqQVhm3UoTubzxS3HYRTg3TiaB2YCUlMq+UCGs OF+4LpLh6bj6YjNKqsPlclpWlpXaULWJBp7Um4q/8qk5R4wJNRdMInuRVLx34d4xpzTk Zqw079zUOaLjuVZ1b+n5dEvDz7EjGBUMvF7OF64D6+IHgCJZcsfJcVVtDUudXgXwL7dl 4xkdk+C8WHZzcGrEtRYAeSi2CadxT7Lb5B7WqPvodfOFbY92TX+zOHqYI5g0dvK3ZYmz mLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/LOTiXEeUAfPkAgUbsTAKp8w078GVOXeJxP9ge1byF8=; b=dpBjsxiCkMQsqc3OKgfnukjmm0J6v7y0nDCB1fRQ3gueeVa8qOTIPdymyEKB5OOt+F dvTlqVXd1vfVnOu9ac5Q/7644+JRVURMGSxgf6tp47QrcbitHE/mihMe14ucyF3oQ6uQ FKzkKiGsA50pCWF2tvxYVO9tVLIhS3PeDYZGp1gGC0dP4TRfAL7sfkz7pY8IvWMPowtj PZjbfBHS9NNUKkQyKS+z2AjVtjnDlxqt1ZPb1tlY5jvKDFj/DYoSYBj6p8x8+rkRg2B7 36LvNRhHbptenwE6e8PkPnMeVhMcCY8B4HOH5RYUowiCANMIgCBoNXKNSdml74dZ+AOK 1L3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=XPNLyukT; 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 s4si917324pgp.158.2019.05.02.21.03.07; Thu, 02 May 2019 21:03:23 -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; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=XPNLyukT; 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 S1726470AbfECEAc (ORCPT + 99 others); Fri, 3 May 2019 00:00:32 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:45837 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbfECEA0 (ORCPT ); Fri, 3 May 2019 00:00:26 -0400 Received: by mail-ot1-f65.google.com with SMTP id a10so4126327otl.12 for ; Thu, 02 May 2019 21:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredlawl-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/LOTiXEeUAfPkAgUbsTAKp8w078GVOXeJxP9ge1byF8=; b=XPNLyukTjtUR1G5C31oqERX/VOGrqG8DcQcBrRJG6f6svZDbARMyBVLoY2RQ7XP3H5 dn+CQGhJ4qPQN1fAjcc/EyONtUj1g8bzZaN8cN62JG5g9IQX78lsdB4xMOwy9XibQLw/ +rQYpwujO4bNYWWQmTEu5eVnpiY5ke3Jmea8tb2GUAtkoi6mXPkn3FNdI89YvYXAGIuF kbQiT6+N3f2g8PzPkUubXXunxMBm5o0c8fivT6YdrmSGedvrsRqqX7NQSgmC8jIzgW+B O71qBgrr7hSvt7jUpbjUiq0u0ladrZoTcPSKKhPVYw/5WmrXslxysNtoBneQIPVL08TP xoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/LOTiXEeUAfPkAgUbsTAKp8w078GVOXeJxP9ge1byF8=; b=dgsx1Nb78hELQf841aAnzDnV5OhrSebcZ9GwDDViurUjW+gy+qZfaf3WJ2o5CDsjW+ Q8qQYD8gZHohMg9QHup9rGavp6UvFdbfbHLp1VcIaXuY9481CP3H23xqMWxul3j23z55 Hx+Uoo+B7dcMdlBMRGrApZ3o4/p4+lrqAKC5eyNly4emcMPCRbZ3oG9m6cuhWpB6cZNq ix/6yd6gOHei0vdbV9JCCDcwPv+FbvJMrilja1E4k7HaZQBxFqUDEPX/dM0zkY77wJHq 7nq7l7H1IGCe9Q7CNCf0IrOO80tL5aMg620lzdcqRhJY/FNnFNO2KmodFeyuaCumouBx 4i1Q== X-Gm-Message-State: APjAAAWrlqILr5FTYu8DjMdB45+XCf7qIcXbnckZGvRnIP58LCso1Bau 0LJXLRoKs8N5EHjR/k5RsgbgXA== X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr1398446otp.186.1556856026086; Thu, 02 May 2019 21:00:26 -0700 (PDT) Received: from linux.fredlawl.com ([2600:1700:18a0:11d0:5518:38b8:ef25:393a]) by smtp.gmail.com with ESMTPSA id f17sm430149oto.5.2019.05.02.21.00.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 21:00:25 -0700 (PDT) From: Frederick Lawler To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com, lukas@wunner.de, andriy.shevchenko@linux.intel.com, keith.busch@intel.com, mr.nuke.me@gmail.com, liudongdong3@huawei.com, thesven73@gmail.com, Frederick Lawler Subject: [PATCH v2 5/9] PCI/AER: Prefix dmesg logs with PCIe service name Date: Thu, 2 May 2019 22:59:42 -0500 Message-Id: <20190503035946.23608-6-fred@fredlawl.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190503035946.23608-1-fred@fredlawl.com> References: <20190503035946.23608-1-fred@fredlawl.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prefix dmesg logs with PCIe service name. Signed-off-by: Frederick Lawler --- drivers/pci/pcie/aer.c | 10 +++++++--- drivers/pci/pcie/aer_inject.c | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 82eb45335b6f..e603084b8fc1 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -12,6 +12,9 @@ * Andrew Patterson */ +#define pr_fmt(fmt) "AER: " fmt +#define dev_fmt pr_fmt + #include #include #include @@ -1377,24 +1380,25 @@ static int aer_probe(struct pcie_device *dev) int status; struct aer_rpc *rpc; struct device *device = &dev->device; + struct pci_dev *port = dev->port; rpc = devm_kzalloc(device, sizeof(struct aer_rpc), GFP_KERNEL); if (!rpc) { return -ENOMEM; } - rpc->rpd = dev->port; + rpc->rpd = port; set_service_data(dev, rpc); status = devm_request_threaded_irq(device, dev->irq, aer_irq, aer_isr, IRQF_SHARED, "aerdrv", dev); if (status) { - dev_err(device, "request AER IRQ %d failed\n", + pci_err(port, "request AER IRQ %d failed\n", dev->irq); return status; } aer_enable_rootport(rpc); - dev_info(device, "AER enabled with IRQ %d\n", dev->irq); + pci_info(port, "AER enabled with IRQ %d\n", dev->irq); return 0; } diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c index 95d4759664b3..d4f6d49acd0c 100644 --- a/drivers/pci/pcie/aer_inject.c +++ b/drivers/pci/pcie/aer_inject.c @@ -12,6 +12,8 @@ * Huang Ying */ +#define dev_fmt(fmt) "AER: " fmt + #include #include #include @@ -460,12 +462,12 @@ static int aer_inject(struct aer_error_inj *einj) if (device) { edev = to_pcie_device(device); if (!get_service_data(edev)) { - dev_warn(&edev->device, + pci_warn(edev->port, "aer_inject: AER service is not initialized\n"); ret = -EPROTONOSUPPORT; goto out_put; } - dev_info(&edev->device, + pci_info(edev->port, "aer_inject: Injecting errors %08x/%08x into device %s\n", einj->cor_status, einj->uncor_status, pci_name(dev)); local_irq_disable(); -- 2.17.1