From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F6DDC6778F for ; Sat, 7 Jul 2018 08:35:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF0272154F for ; Sat, 7 Jul 2018 08:35:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF0272154F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753842AbeGGIfi (ORCPT ); Sat, 7 Jul 2018 04:35:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38928 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbeGGIfe (ORCPT ); Sat, 7 Jul 2018 04:35:34 -0400 Received: from localhost (unknown [37.170.5.79]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E2C33BA2; Sat, 7 Jul 2018 08:35:32 +0000 (UTC) Date: Sat, 7 Jul 2018 10:35:28 +0200 From: Greg Kroah-Hartman To: Corey Minyard Cc: Joe Perches , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] device: Add #define dev_fmt similar to #define pr_fmt Message-ID: <20180707083528.GA2371@kroah.com> References: <3f213f4f9ee604c1797af67360d8da1836b34271.1525878372.git.joe@perches.com> <20180706153028.GA6838@kroah.com> <6aad533106ce750ee7a7ce3e507d7de37d132dc0.camel@perches.com> <20180706155003.GA30093@kroah.com> <54432c2a-a956-b721-0b2b-762a61898ae1@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54432c2a-a956-b721-0b2b-762a61898ae1@acm.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 03:50:16PM -0500, Corey Minyard wrote: > On 07/06/2018 10:50 AM, Greg Kroah-Hartman wrote: > > On Fri, Jul 06, 2018 at 08:41:34AM -0700, Joe Perches wrote: > > > On Fri, 2018-07-06 at 17:30 +0200, Greg Kroah-Hartman wrote: > > > > On Wed, May 09, 2018 at 08:15:46AM -0700, Joe Perches wrote: > > > > > Add a prefixing macro to dev_ uses similar to the pr_fmt > > > > > prefixing macro used in pr_ calls. > > > > > > > > > > This can help avoid some string duplication in dev_ uses. > > > > > > > > > > The default, like pr_fmt, is an empty #define dev_fmt(fmt) fmt > > > > > > > > > > Rename the existing dev_ functions to _dev_ and > > > > > introduce #define dev_ _dev_ macros that use the > > > > > new #define dev_fmt > > > > > > > > > > Miscellanea: > > > > > > > > > > o Consistently use #defines with fmt, ... and ##__VA_ARGS__ > > > > > o Remove unnecessary externs > > > > SHouldn't these be separate patches please? > > > Multiple patches touching the same lines are unnecessary work. > > > > > > So I don't think so as it's just touching bits that need change > > > anyway. > > > > > > > > Signed-off-by: Joe Perches > > > > > --- > > > > > drivers/base/core.c | 12 +++--- > > > > > include/linux/device.h | 103 ++++++++++++++++++++++++++++--------------------- > > > > > 2 files changed, 64 insertions(+), 51 deletions(-) > > > > Ok this seems like a lot of churn for no real apparent gain. What is > > > > all of this getting us? > > > > > > > > What is the benifit, you have more code now, > > > > why is that good? > > > IPMI and a few other subsystems prefix all their output > > > dev_ with specific duplicated content. > > That's crazy and strange as the whole idea was that dev_* would uniquely > > identify the driver/device such that "prefixes" would not be needed. > > > > Ugh. > > > > > This centralizes those prefixes just like pr_fmt. > > > > > > The IPMI changes are already in mainline and now > > > need this mechanism to maintain their output content. > > > > > > IPMI and a few other subsystems prefix all their output > > > dev_ with specific duplicated content. > > > > > > This centralizes those prefixes just like pr_fmt. > > > > > > commit a2d70dfdda6f ("ipmi: msghandler: Add and use pr_fmt and dev_fmt, > > > remove PFX") > > Ok, I'll take this. I don't like it, as drivers should really not need > > this at all. But ipmi is known for doing "odd" things anyway... > > I've been trying to make things less odd as time has gone by.  And I'm happy > to pull out this change.  I've been slowly working on the logging in > the ipmi driver to clean this kind of stuff up. Cleaning up the logging would be great to see happen. Until then, we can leave these patches in. thanks, greg k-h