From patchwork Tue Jun 28 16:31:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12898541 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EA14C43334 for ; Tue, 28 Jun 2022 16:35:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238474AbiF1Qfd (ORCPT ); Tue, 28 Jun 2022 12:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237610AbiF1Qeq (ORCPT ); Tue, 28 Jun 2022 12:34:46 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A20932068 for ; Tue, 28 Jun 2022 09:31:51 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id fi2so26872159ejb.9 for ; Tue, 28 Jun 2022 09:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=El3W9x0OB1VE70B0Lt3SBVyO+pC/HDeoL5aPqYtLRdg=; b=npVyrA+/Jxlq6fQfSTCBYtF6RmczZxbWUN+tD+OAYyplLmUOvHpooBMDuJlKKO4PZJ yCZoY4jC/PAH7YPpacPIeDx58jw6tAJqfpGJC8HRQ+q5j8M0r5LiiQuEpXcF8XKwWMq+ JsMRX/RrrOZLybaPcnDecKT1rm1MJeKuhH3vY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=El3W9x0OB1VE70B0Lt3SBVyO+pC/HDeoL5aPqYtLRdg=; b=o5KxxqkyiYds4Xbw4OUcGXiblVRrZZ6Mpx4DtfcTo6w3YXAICj34HO10514kZ3nFXa bSyJRvJYUyBVVehoel0GjmPsaSy1V8tvioYyN2TXoEg+d6GLLjOUi+hK7lhJP2Uebuqs hDthf+FXioJEBhDaEvWgiU/YJgeQ2VNZ4mbS+LYTjjka3qHgcOel/wqkMeBHno8OdBTb bC1wwvu3wp92hyWJgJBHU4FE5ExV17bRLMT24puZ8XYKzyiRMTAwNzEgYf3CyPsZv5uF FGEfGiOFtBonhDeL4a3Sg2Od7MWeIrfGdHfmZ1mGUQG7fNrcwBeaukpvtLT+eZz/2Sx+ 5uDg== X-Gm-Message-State: AJIora810q14RHlaeOX0XYVurz3X4CImN1PCOrQj7UOn0WDvAP3FQaV7 2pv6stxckRDhtvZj+F5PV+2m4g== X-Google-Smtp-Source: AGRyM1ug5KAKVeOz1cwMowwc8MY9LikfKxR5xcB86gl7L4gplcpPsJB7grN/of4FQuYTMReB9hEP3g== X-Received: by 2002:a17:907:7e90:b0:704:b67d:623e with SMTP id qb16-20020a1709077e9000b00704b67d623emr19098655ejc.634.1656433910961; Tue, 28 Jun 2022 09:31:50 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-116-90-174.pool80116.interbusiness.it. [80.116.90.174]) by smtp.gmail.com with ESMTPSA id b20-20020a0564021f1400b0042e15364d14sm9916952edb.8.2022.06.28.09.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 09:31:50 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v5 02/12] can: slcan: use netdev helpers to print out messages Date: Tue, 28 Jun 2022 18:31:26 +0200 Message-Id: <20220628163137.413025-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220628163137.413025-1-dario.binacchi@amarulasolutions.com> References: <20220628163137.413025-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Replace printk() calls with corresponding netdev helpers. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/slcan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index b37d35c2a23a..6162a9c21672 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -365,7 +365,7 @@ static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) spin_lock(&sl->lock); if (!netif_running(dev)) { spin_unlock(&sl->lock); - printk(KERN_WARNING "%s: xmit: iface is down\n", dev->name); + netdev_warn(dev, "xmit: iface is down\n"); goto out; } if (sl->tty == NULL) { @@ -776,8 +776,7 @@ static void __exit slcan_exit(void) sl = netdev_priv(dev); if (sl->tty) { - printk(KERN_ERR "%s: tty discipline still running\n", - dev->name); + netdev_err(dev, "tty discipline still running\n"); } unregister_netdev(dev);