Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5647413yba; Tue, 30 Apr 2019 19:31:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqys0LxLfrat4oGgWLePcXGSzRm2wB2IBI8e2Ax+E50/RkHZtr6Zp7beiN7xgLNtHiZcgmQP X-Received: by 2002:a17:902:4501:: with SMTP id m1mr17133747pld.302.1556677862243; Tue, 30 Apr 2019 19:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556677862; cv=none; d=google.com; s=arc-20160816; b=rl5tKY5hiu2VhSARa0xDWX/b21CLRa0NyF9bir0pqpjvLNUPaN06uhK3d05uR4UygR xr83WE5+MyuYt/xlox9zpd3YFE/PI3r+YCkvy4WvpX2KFrWs1YyQ0kXp07Vih0mt3Qx4 9aoRSZaKNf2eQJoyZtfClcawxZeeojczKb0nVDOJlQntLu4JqoXyh9H/Ir0faJrUps0g 3Ey17QgL4Ep3I2ewnayGE9VBXUDl5kUNn9TUP9qMCpm+G//0u+6Sxnw3OQbJ3l60/O8N whSMcZTxA5kyXhz7wOyJqUB452qCnjz8kKnuDrY1ToNpdKWFLH7ODfBzloD8rrM8ABoX 2HsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Zo4TpdAQCQ2Rb+O1sLzbXTX3vjAHZKlnn0/WgAJN8sM=; b=c1nNIXNbTQ9TtKYqrxzuvHLfWhHYKP/JcD+WkIDyPxe47eW11PS2aLV8aEFOItudIE yciYWmRYFg9oTm9bEA/gWh5i76YGopB+zw4xEr2A0x7b0YMZoX896mnk9a5D9RkPGaGA 0sfoYzOIuyVZa4nOQscMP9FtsTdq8lUSe9RqirHxMMUjaBMpERMd40eGcSLsgVnuREXY A82MxS2lOdnc4KvPWYKjigpM/nWcZGs/7HCY0TCSSfz/7u+Vw3K6Prpu0kxo8tWFqXdF 6btms1wh/2pDgpkBBShEXormTRXl1J3SrYH7rEVBDi+l2wcWS2BBtP9HgajHGOIP7fP8 K/Lg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30si42861946pld.342.2019.04.30.19.30.46; Tue, 30 Apr 2019 19:31:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727624AbfEAC3l (ORCPT + 99 others); Tue, 30 Apr 2019 22:29:41 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:50488 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbfEAC3l (ORCPT ); Tue, 30 Apr 2019 22:29:41 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23990394AbfEAC3gOuPKs (ORCPT + 4 others); Wed, 1 May 2019 04:29:36 +0200 Date: Wed, 1 May 2019 03:29:36 +0100 (BST) From: "Maciej W. Rozycki" To: "Enrico Weigelt, metux IT consult" cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , andrew@aj.id.au, andriy.shevchenko@linux.intel.com, vz@mleia.com, slemieux.tyco@gmail.com, khilman@baylibre.com, liviu.dudau@arm.com, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, "David S. Miller" , jacmet@sunsite.dk, linux@prisktech.co.nz, matthias.bgg@gmail.com, linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-ia64@vger.kernel.org, linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 06/41] drivers: tty: serial: sb1250-duart: use dev_err() instead of printk() In-Reply-To: <1556369542-13247-7-git-send-email-info@metux.net> Message-ID: References: <1556369542-13247-1-git-send-email-info@metux.net> <1556369542-13247-7-git-send-email-info@metux.net> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Apr 2019, Enrico Weigelt, metux IT consult wrote: > diff --git a/drivers/tty/serial/sb1250-duart.c b/drivers/tty/serial/sb1250-duart.c > index 329aced..655961c 100644 > --- a/drivers/tty/serial/sb1250-duart.c > +++ b/drivers/tty/serial/sb1250-duart.c > @@ -663,7 +663,6 @@ static void sbd_release_port(struct uart_port *uport) > > static int sbd_map_port(struct uart_port *uport) > { > - const char *err = KERN_ERR "sbd: Cannot map MMIO\n"; > struct sbd_port *sport = to_sport(uport); > struct sbd_duart *duart = sport->duart; > > @@ -671,7 +670,7 @@ static int sbd_map_port(struct uart_port *uport) > uport->membase = ioremap_nocache(uport->mapbase, > DUART_CHANREG_SPACING); > if (!uport->membase) { > - printk(err); > + dev_err(uport->dev, "Cannot map MMIO (base)\n"); > return -ENOMEM; > } > > @@ -679,7 +678,7 @@ static int sbd_map_port(struct uart_port *uport) > sport->memctrl = ioremap_nocache(duart->mapctrl, > DUART_CHANREG_SPACING); > if (!sport->memctrl) { > - printk(err); > + dev_err(uport->dev, "Cannot map MMIO (ctrl)\n"); > iounmap(uport->membase); > uport->membase = NULL; > return -ENOMEM; Hmm, what's the point to have separate messages, which consume extra memory, for a hardly if at all possible error condition? Maciej