From patchwork Tue Mar 20 22:31:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10298111 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 C1CF860386 for ; Tue, 20 Mar 2018 22:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A991E291B5 for ; Tue, 20 Mar 2018 22:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E2E32962D; Tue, 20 Mar 2018 22:34:45 +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 3E5E8291B5 for ; Tue, 20 Mar 2018 22:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbeCTWej (ORCPT ); Tue, 20 Mar 2018 18:34:39 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33697 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783AbeCTWbu (ORCPT ); Tue, 20 Mar 2018 18:31:50 -0400 Received: by mail-pg0-f68.google.com with SMTP id g12so1215073pgs.0; Tue, 20 Mar 2018 15:31:50 -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=PMMGimRH6bmCQ6tnd3pQ4mFd8G6rWCq2bnn+DBjYuB8=; b=tkIMMc35J35AmzgL0Isd9sHhbiVGjBO7Ywwsq5EVZIZtEm6wgwZYOwhW+73B2CTq3Y 1qS8bFuBzqt1xuX0BJ4ip6m/qwjxypthHwnlsEhpbnO1+kEZKVIz+vSDIudio3Z/tZDP FJBTuUxrboFFlmMHXIDC5+80dyxJx6Uh0OI1HCXM5PbG8hwkgwLuJ27u6LaSxpCChtPX b8VRMMf8e7Z9XCPuYInSXRTaWMoIcYDLnNS0P3rn0xhdxCE1l8bL+yeZVoRaFNODDWpP RZc6w7ZdcJwxzC0rtO7IePPYhofP48NkK/DwvZYsJ2hCuJVjfuvq0oILK7PAIox8ByjF FDQw== 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=PMMGimRH6bmCQ6tnd3pQ4mFd8G6rWCq2bnn+DBjYuB8=; b=DfqjnOqTsYtS2kvgRv/sRSqjQKKlALhRLWCsx8MuUWd3ugoQSj3KqjaT3ITxz1OSh9 1IWkGkDei5WlJxfaJ2Udt34c9qXKM2isj5oa+oLiLev2v5uq0ycE8Aql6fPUu//0Cccb IwETEj6z99pZJT6/ANVj8P95rRNVDjsJcgyEL7co336bA2vsE/xwo22AVoaltLV/q6cF ejpnQKsg3oD4/7R6f91n4Mtj9MdtAXKYnQhMtg9146a1iLT18YD/wH9wp7b+Pd+8SNhX Kze2HPDlV7jNLsczsWw0lHuzD6SI4V5xRWymhnmhtVdIs//ss+4McjBjk7noliJHRl36 oSkA== X-Gm-Message-State: AElRT7ESisNgIa9mS44vOZTL0lnePeDaqSNPX29jwJELVo7Y/fVhcoYY TCwgyGlT5DeEsQWUZHsgLK3TrXe6 X-Google-Smtp-Source: AG47ELtu7mMcNZdkjMZktcFFpccJNZJASlK8wJT42b2F6z4Fd6eM+mFMWpGIvPTh+UrJKJ75cTP26w== X-Received: by 10.99.154.81 with SMTP id e17mr13429977pgo.311.1521585109549; Tue, 20 Mar 2018 15:31:49 -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 r20sm6108360pff.165.2018.03.20.15.31.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 15:31:48 -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 v2 06/14] platform/chrome: chromeos_laptop - introduce pr_fmt() Date: Tue, 20 Mar 2018 15:31:30 -0700 Message-Id: <20180320223138.234724-7-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.16.2.804.g6dcf76e118-goog In-Reply-To: <20180320223138.234724-1-dmitry.torokhov@gmail.com> References: <20180320223138.234724-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; }