Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3099283yba; Sun, 28 Apr 2019 17:14:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1HhLm7RYv7RDHc00J4WE1ioJcyiBz2OmcKxn2HHN7oLMwKNk+RPmvashT/LL1ygbYHNVo X-Received: by 2002:aa7:9ac2:: with SMTP id x2mr10605686pfp.221.1556496855070; Sun, 28 Apr 2019 17:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556496855; cv=none; d=google.com; s=arc-20160816; b=RdCUcf4NGgsO2gy3JXtdU5j5Kr14GQSAmBSny5UnZHk3II6JyYrcXAVGDT+Q9n8Bso oY8vYu3vrb24TcuNq23K0L3Y/r+jsX/xJPPUor+76CSN+XdJLI23IyxkUEk70IjTfgax r1hlmJ7k8QYFUWk+cR4zZA4cQHA9eGzRcVLYrzmWkQLjip2bblK2VgBBBHx6taxQ5Q81 B7i4YnHoofV7EpRtQjC45Pr8TUcECxCmSNqQB3svJ8eX9TrpTR0rYyZBLdskSZ/+ptZJ KDmjR9rS1F09zQW/SEWFQg55qrSZofznjJrPayIzw7Q6UqJ0GPS61J6gFA+fJeW4ez0H rsFA== 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:dkim-signature; bh=7gAKSGv3Gaigz8RFUygXIXU6cudMNZeeU45hOXhgHxI=; b=cu25xA3lvtuc1cZ8djAQSR7PdLPrLzx6RwnmmSj3CPZSb7Y9F92qPiP8O9kIFsMQMP OZMHb64HEPZCAIEtxmmL9IVu0vJ1VW5TbqI9Qh0d7jl85eHQ4SMEve9JZbpaUl4QezWX rclAjS/y83TDLCHRh3PZUGefXvkvSAYeAoB5FDN74CrtWyOSQq2CR8mesN0oZm1q2iDS iJrgKiH1se/Z7wIqm31VRzOPwrHBu9UCFlSLPU4lzyKMDnLdpeyi73xCLDAec5+8diqO pUx5Dny2STod05ttfNkHh82EmPpU4Qa9uTfmsTgeRKqJ3W1qLuU9eyPZOou6/GBRuT+7 v8Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rBPVblIF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch12si12369496plb.5.2019.04.28.17.14.00; Sun, 28 Apr 2019 17:14:15 -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=@kernel.org header.s=default header.b=rBPVblIF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbfD2ANF (ORCPT + 99 others); Sun, 28 Apr 2019 20:13:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfD2ANE (ORCPT ); Sun, 28 Apr 2019 20:13:04 -0400 Received: from localhost (unknown [69.71.4.100]) (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 C7B4620656; Mon, 29 Apr 2019 00:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556496784; bh=L2+bIFhyUyXEKeySvVDtwgKi1rnek5ZeXux4GIq/ypo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rBPVblIFr1DBbpkttXqoZxh3FAY41fKbQKTgr/duEw9xUW6TPpYlLlhbi3HXowsWx eK01orZEEjyR0frhbkpVR2N25hh0sX8sHB7kFZcbC9KgDkwbzn0+v+hUfsP9+MKeUI XNrKSIopDocSTVMrYQBqwqoCL8DwWy5B2TT/a0k4= Date: Sun, 28 Apr 2019 19:13:02 -0500 From: Bjorn Helgaas To: Andy Shevchenko Cc: fred@fredlawl.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com, lukas@wunner.de, keith.busch@intel.com, mr.nuke.me@gmail.com, liudongdong3@huawei.com, thesven73@gmail.com Subject: Re: [PATCH 3/4] PCI: pciehp: Remove unused macro definitions Message-ID: <20190429001302.GL14616@google.com> References: <20190427191304.32502-1-fred@fredlawl.com> <20190427191304.32502-4-fred@fredlawl.com> <20190428155536.GU9224@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190428155536.GU9224@smile.fi.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 28, 2019 at 06:55:36PM +0300, Andy Shevchenko wrote: > On Sat, Apr 27, 2019 at 02:13:03PM -0500, fred@fredlawl.com wrote: > > Now that all uses for the ctrl_*() printk wrappers are removed from > > files and replaces with pci_*() or pr_*() printk wrappers, remove the > > unused macro definitions. In addition to that, remove the MY_NAME macro. > > > extern bool pciehp_debug; > > How it's used after all? > > > -#define dbg(format, arg...) \ > > -do { \ > > - if (pciehp_debug) \ > > - printk(KERN_DEBUG "%s: " format, MY_NAME, ## arg); \ > > -} while (0) > > > -#define ctrl_dbg(ctrl, format, arg...) \ > > - do { \ > > - if (pciehp_debug) \ > > - dev_printk(KERN_DEBUG, &ctrl->pcie->device, \ > > - format, ## arg); \ > > - } while (0) > > Besides ruining the pciehp_debug support this will make unequivalent behaviour. I'm not super attached to pciehp_debug. But perhaps pciehp is one place where it would make sense to use pci_dbg(). There are a lot of uses of ctrl_dbg() and some of them look like they're too low-level to just convert to pci_info(), e.g., info about every command we write to the controller. We probably don't need all that info all the time. But if we want to keep it, maybe we could convert it to use pci_dbg() and the dynamic debug stuff. I'm pretty sure the dyndbg syntax is complicated enough to enable pciehp logging specifically. Then we could use that instead of the pciehp-specific module parameter. Bjorn