From patchwork Mon Mar 12 19:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10277133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DCB3B603B5 for ; Mon, 12 Mar 2018 19:11:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD04028E58 for ; Mon, 12 Mar 2018 19:11:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBAC128E5C; Mon, 12 Mar 2018 19:11:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4334828E58 for ; Mon, 12 Mar 2018 19:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932496AbeCLTJW (ORCPT ); Mon, 12 Mar 2018 15:09:22 -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-Google-Smtp-Source: AG47ELuqMfRx3B+e86yV3dIdfLApwdlqStLjuGDac6vFTj/VYt7iNCx9pafw+ep0FslFca87boAIjg== 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-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }