Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp660935pxv; Thu, 8 Jul 2021 11:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6FxSaAkG2LvF4hnkutC2jwEg4kLI4YhAvDLEeVgiq1I7GJAeShmxGa5f/5fZLs3vZA6Xi X-Received: by 2002:a92:dcce:: with SMTP id b14mr27285ilr.39.1625767237467; Thu, 08 Jul 2021 11:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625767237; cv=none; d=google.com; s=arc-20160816; b=yNiJoBzuTTlR0usFaIrilzfeT1V2FZ6BDhsoeebrw2l08PdJsE4a68gyGdTyfxFFlB S/TAH2Ceglnsct1anKDF34nXH/1/vTS8i7kayAAJ2y8wuTJIw1DGo6lQzh376h4/DU3g smglKc0Juom75MQL8S4VUkbDOKfrju/CV0MU/RacvAlWh9HY9YX/UQYpebNUIqffb+b7 nJNLc1kB52QGuqUF7sfsBs0Wsd722r/bXY9scvo2MqEH8i92I6fI/XEyQ95x7BWA9Nx2 XLJQarLX7oa82RsyYWYNm5YMG8Oaph8TBguaiRAmQy4buoRjfxgCx4NF2cImik+glwGD AWjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XeccN3vO+kZBO9cGBrJoTHdPFyuWAmPfbzHVpOaC8fY=; b=STf50pFrW8gf454E20jVg53KIKyAZghQvz7bmLVUILRnYnDR85RJNW7IyA8VfBCID0 KYNiDoBkCl/vmnt/nzLCoxRIZKyYtCEX8PIE3729MU9mktXDMFFRF2mIXltS2fCW+Le8 eSG1u45Vlt26I3iZ9kwpXcShw9R3hIx4Q5sg9oS7UsiHUoAdC4d1ou+AIIqwEtP2q3L4 qcOMa4tg5GjG4CK05VvNjk0g64AVV+PA2AjlPxE7VSBzDOZA5PldKMpJ7BgblP7mCKsN uFsGD+prYF4UtuyBDAWKdTRA+SoKU5f/3C7on+ek9tzVDf/e04BXO946zHLVaWdZ9Xes ZgZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tppSSr1N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si3722405iow.52.2021.07.08.11.00.24; Thu, 08 Jul 2021 11:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tppSSr1N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbhGHSCE (ORCPT + 99 others); Thu, 8 Jul 2021 14:02:04 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46608 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbhGHSCE (ORCPT ); Thu, 8 Jul 2021 14:02:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=XeccN3vO+kZBO9cGBrJoTHdPFyuWAmPfbzHVpOaC8fY=; b=tppSSr1NFt4b3TicbMLi3prqV7 Tn8oeifOWd4GI2qI54qN9Ho9tkVDidYizFDE8nee7HL63OcsHFl4F3kCb7GnxUWDp13QbVRQni+uG gBfsyDrdZ87ctOD/qIqPVI2Q8aE27YciBlSdJdyOfnw3jdfq1mp7FRwGDbaUs0CqCQpo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1m1YIq-00CfWD-E0; Thu, 08 Jul 2021 19:59:12 +0200 Date: Thu, 8 Jul 2021 19:59:12 +0200 From: Andrew Lunn To: Carlos Bilbao Cc: davem@davemloft.net, Joe Perches , kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [PATCH net-next v2] drivers: ethernet: tulip: Fix indentation of printk Message-ID: References: <1884900.usQuhbGJ8B@iron-maiden> <5183009.Sb9uPGUboI@iron-maiden> <4352381.cEBGB3zze1@iron-maiden> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4352381.cEBGB3zze1@iron-maiden> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 08, 2021 at 01:48:24PM -0400, Carlos Bilbao wrote: > Fix indentation of printk that starts at the beginning of the line and does > not have a KERN_. > > Signed-off-by: Carlos Bilbao > --- > drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c > index b125d7faefdf..0d8ddfdd5c09 100644 > --- a/drivers/net/ethernet/dec/tulip/de4x5.c > +++ b/drivers/net/ethernet/dec/tulip/de4x5.c > @@ -3169,7 +3169,7 @@ dc2114x_autoconf(struct net_device *dev) > > default: > lp->tcount++; > -printk("Huh?: media:%02x\n", lp->media); > + printk(KERN_NOTICE "Huh?: media:%02x\n", lp->media); > lp->media = INIT; > break; > } Since this is a network driver, and you have a net_device structure, the best practice is to use netdev_notice(dev, "Huh?: media:%02x\n", lp->media); You could go through this driver and change all printk() to netdev_dbg(), netdev_err(), netdev_info etc. The advantage of these calls is that they make it clear which network interface is outputting the message. Other subsystems have similar calls. If there are not subsystem specific print functions, but you have a struct device, it is best to use dev_err(), dev_dbg(), dev_info() etc. These functions will make it clear which device is printing the message. Andrew