Received: by 10.213.65.68 with SMTP id h4csp237625imn; Mon, 12 Mar 2018 12:10:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELvmUmiD05PXJeJYtvFleQSebxgTuXLifkDeotJyDWj5dtSx5j4TpkghkJ99hGVitVPOyta1 X-Received: by 10.99.52.11 with SMTP id b11mr1385054pga.377.1520881845454; Mon, 12 Mar 2018 12:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520881845; cv=none; d=google.com; s=arc-20160816; b=hcFVfPG5W0N15WvZt83vdOGyuXy40J09CKPSrwZvsVR8t8x4yiC4lynqwzgiK2a7sS sJBKFcb/2CPqtFl6sefEfHllE+wAJjZuoy2/M5N1aGInAfBx2Mxa2j9APmgUhXQck53G 7tLyQGZRlawMpuhR8qnKK50jrQ62Mow862WF5SBjM3HerMEwVPjWyFZE7bbAlmdyzSSN KpaJxWRnX4r/nY5SP1njH9jJ3mG98vHxrYVw8GncFhp6a+YmO0DYLGgILytX/3TXYfXd CQOXbPRUGPQZuWqlAGM9NkHqws0W6Wg45rVDBmbHCPELs9CJtY4u2Jtn5gTNx+OFiL/K 2taQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=eNc3lYqF5UlYuxfF03ec7+0F6tK+oSbCqz64YEBJPhA=; b=DVGGuD4K18EdLvdMwwQtiI0LDOFrZykVnYejMF67J2wg6yknUzga95YzW2XER+LCIE ZyLp5lTj0HMwu5fA6UZVuGvViIllsEXEYxER/lISzoLZvrFzaBs3K6OXx5RGYbyFFkoP OvMoUxxGmYKWOI/I+d3YhzwnWNrzO7bUbSPs7qPZrcLQ3r0s6zikC1QiCK4JGiXe/5og wPdQJKRebzPtnLru3w8VOJxEbM/tMNwEKAp8jvCQ4Dgpdrl/8YzxcnrGWuxgeGYvuK6y M2cF7aNmSfmQpmwOLiBOg9WpXH19Fb9J3h7aCnyZszfQcxpVhD/mRQ49kVPbwvHBTq8l rjNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VjCW5c2x; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x70si5424481pgd.724.2018.03.12.12.10.30; Mon, 12 Mar 2018 12:10:45 -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=@gmail.com header.s=20161025 header.b=VjCW5c2x; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932508AbeCLTJX (ORCPT + 99 others); Mon, 12 Mar 2018 15:09:23 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:43114 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932452AbeCLTJT (ORCPT ); Mon, 12 Mar 2018 15:09:19 -0400 Received: by mail-pg0-f67.google.com with SMTP id e9so6904776pgs.10; Mon, 12 Mar 2018 12:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eNc3lYqF5UlYuxfF03ec7+0F6tK+oSbCqz64YEBJPhA=; b=VjCW5c2xLb+d3Y0GJOwBQVIHjpI8Q/ugO5SsxZCJUa6pi2gsj29YziZwlf1yEal3KH fX1U8EgfMP2xbHz2P39g3I7qrq6ct+YrVHjFYqDZbzg1wADiChi7xCxSjNuj1cqHehsS +C/wDURFe1esnWDR+45Ey8lu3qpPvQnpk+8Wa4stOrxofVYtTiiJrvaZDQZwZecY557B eMsSle8Fp00iSpzQZDzJW4+srGCAoKd+bwgyjVu9H47C8FISRN1Szcwofkr0PiOhSD8a dmJzOUB6478DLHmuxIhjZimQ2B3gIS3V6eev6ZuQ8s9cyJk1lIi85MLk9LDJEKB4bqZj +fRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eNc3lYqF5UlYuxfF03ec7+0F6tK+oSbCqz64YEBJPhA=; b=UBTSXYZYwOtWsE2RIF0gnta4Z34Zm0EVUhrAZVx6OIg4BO2C86s/nxpr9uxB7t6j/W ZQF+qM2iNUQxAG79BshbM68++hzbQFUiKAOKS0ii5ivDQ4+2ExiSADmsG4chnme0Jcec OgOEO4kcdEifaX2rHcu+X8aT7IVqhi7EzXh6jf72rr4yPVqipXQg5CUrd+h55LGKPFmK x+VxiyXugzZQm8o3C8ckdlJHfT26GIYbrkf8nEhwuaRIXZWJwbWAZaAXPZ5yD8CgHUTu hdAGBxForjZIdEjue/VvoRYD5CXf7XxO9yJaEbjoHNaZ6JzSwK9Fgvo/9S9xWX9bvbGX SVCQ== X-Gm-Message-State: AElRT7HdhPQd0zVFVp8GW5PdI5nvWTs7gkAkLzKrcJdWP2/iHkeH7Kyr fe3MOR30ni9/HB7ZUymHLAnvsIEV X-Received: by 10.99.114.77 with SMTP id c13mr7430449pgn.286.1520881758426; Mon, 12 Mar 2018 12:09:18 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id s67sm18038477pfg.104.2018.03.12.12.09.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 12:09:17 -0700 (PDT) From: Dmitry Torokhov To: linux-input@vger.kernel.org, Benson Leung Cc: Nick Dyer , Olof Johansson , linux-kernel@vger.kernel.org Subject: [PATCH 06/14] platform/chrome: chromeos_laptop - introduce pr_fmt() Date: Mon, 12 Mar 2018 12:08:59 -0700 Message-Id: <20180312190907.174301-7-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.16.2.660.g709887971b-goog In-Reply-To: <20180312190907.174301-1-dmitry.torokhov@gmail.com> References: <20180312190907.174301-1-dmitry.torokhov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define pr_fmt() to standardize driver messages. Signed-off-by: Dmitry Torokhov --- drivers/platform/chrome/chromeos_laptop.c | 31 ++++++++++------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 0a43f1833de3f..08ce7a105e768 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -4,6 +4,8 @@ // Copyright (C) 2012 Google, Inc. // Author: Benson Leung +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -139,15 +141,12 @@ static struct i2c_client *__add_probed_i2c_device( if (name) { dmi_dev = dmi_find_device(DMI_DEV_TYPE_DEV_ONBOARD, name, NULL); if (!dmi_dev) { - pr_err("%s failed to dmi find device %s.\n", - __func__, - name); + pr_err("failed to dmi find device %s\n", name); return NULL; } dev_data = (struct dmi_dev_onboard *)dmi_dev->device_data; if (!dev_data) { - pr_err("%s failed to get data from dmi for %s.\n", - __func__, name); + pr_err("failed to get data from dmi for %s\n", name); return NULL; } info->irq = dev_data->instance; @@ -155,7 +154,7 @@ static struct i2c_client *__add_probed_i2c_device( adapter = i2c_get_adapter(bus); if (!adapter) { - pr_err("%s failed to get i2c adapter %d.\n", __func__, bus); + pr_err("failed to get i2c adapter %d\n", bus); return NULL; } @@ -174,19 +173,18 @@ static struct i2c_client *__add_probed_i2c_device( dummy = i2c_new_probed_device(adapter, &dummy_info, alt_addr_list, NULL); if (dummy) { - pr_debug("%s %d-%02x is probed at %02x\n", - __func__, bus, info->addr, dummy->addr); + pr_debug("%d-%02x is probed at %02x\n", + bus, info->addr, dummy->addr); i2c_unregister_device(dummy); client = i2c_new_device(adapter, info); } } if (!client) - pr_notice("%s failed to register device %d-%02x\n", - __func__, bus, info->addr); + pr_notice("failed to register device %d-%02x\n", + bus, info->addr); else - pr_debug("%s added i2c device %d-%02x\n", - __func__, bus, info->addr); + pr_debug("added i2c device %d-%02x\n", bus, info->addr); i2c_put_adapter(adapter); return client; @@ -227,7 +225,7 @@ static int find_i2c_adapter_num(enum i2c_adapter_type type) dev = bus_find_device(&i2c_bus_type, NULL, &lookup, __find_i2c_adap); if (!dev) { /* Adapters may appear later. Deferred probing will retry */ - pr_notice("%s: i2c adapter %s not found on system.\n", __func__, + pr_notice("i2c adapter %s not found on system.\n", lookup.name); return -ENODEV; } @@ -349,7 +347,7 @@ static int setup_tsl2563_als(enum i2c_adapter_type type) static int __init chromeos_laptop_dmi_matched(const struct dmi_system_id *id) { cros_laptop = (void *)id->driver_data; - pr_debug("DMI Matched %s.\n", id->ident); + pr_debug("DMI Matched %s\n", id->ident); /* Indicate to dmi_scan that processing is done. */ return 1; @@ -392,8 +390,7 @@ static int chromeos_laptop_probe(struct platform_device *pdev) ret = -EPROBE_DEFER; } else { /* Ran out of tries. */ - pr_notice("%s: Ran out of tries for device.\n", - __func__); + pr_notice("ran out of tries for device.\n"); i2c_dev->state = TIMEDOUT; } } else { @@ -600,7 +597,7 @@ static int __init chromeos_laptop_init(void) int ret; if (!dmi_check_system(chromeos_laptop_dmi_table)) { - pr_debug("%s unsupported system.\n", __func__); + pr_debug("unsupported system\n"); return -ENODEV; } -- 2.16.2.660.g709887971b-goog