From patchwork Tue May 22 13:11:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 10418641 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 36B836032A for ; Tue, 22 May 2018 13:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17DCB280FC for ; Tue, 22 May 2018 13:13:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1420328CA9; Tue, 22 May 2018 13:13:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 963D028CF6 for ; Tue, 22 May 2018 13:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbeEVNLr (ORCPT ); Tue, 22 May 2018 09:11:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:39462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbeEVNLo (ORCPT ); Tue, 22 May 2018 09:11:44 -0400 Received: from localhost (173-24-227-115.client.mchsi.com [173.24.227.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B14AD20876; Tue, 22 May 2018 13:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526994703; bh=VdJHlNvt+IXLPKTYH+ZNSOp4lnqITM440viU7wCrHO8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=hFV6YgWTJTWxSaiBbUqVxxzqsDqWt+/JR+EllECVzfBOgeB6N5k4At+rFGDKtp91S RbR/Ka8AuekZnjA6F5p29BJvbyh/hH00oe1iHcRlF4c9qhXjC2aVgAbAKDlVZj3bL4 Fw2qz1WbuLvhbnB8sKOxhGhNkOXqPaoXLbehcBPY= Subject: [PATCH v1] MIPS: PCI: Use dev_printk() when possible From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Ralf Baechle , James Hogan , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Date: Tue, 22 May 2018 08:11:42 -0500 Message-ID: <152699470263.162686.16975145205315900817.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <152699466671.162686.1029992586935534102.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152699466671.162686.1029992586935534102.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Helgaas Use the pci_info() and pci_err() wrappers for dev_printk() when possible. Signed-off-by: Bjorn Helgaas Acked-by: James Hogan --- arch/mips/pci/pci-legacy.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index 0c65c38e05d6..73643e80f02d 100644 --- a/arch/mips/pci/pci-legacy.c +++ b/arch/mips/pci/pci-legacy.c @@ -263,9 +263,7 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) (!(r->flags & IORESOURCE_ROM_ENABLE))) continue; if (!r->start && r->end) { - printk(KERN_ERR "PCI: Device %s not available " - "because of resource collisions\n", - pci_name(dev)); + pci_err(dev, "can't enable device: resource collisions\n"); return -EINVAL; } if (r->flags & IORESOURCE_IO) @@ -274,8 +272,7 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) cmd |= PCI_COMMAND_MEMORY; } if (cmd != old_cmd) { - printk("PCI: Enabling device %s (%04x -> %04x)\n", - pci_name(dev), old_cmd, cmd); + pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd); } return 0;