Received: by 10.213.65.68 with SMTP id h4csp787300imn; Tue, 20 Mar 2018 15:36:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELvx1+3jwr+f1YrRTzuFvLpOs9kymZC6kpTauSMEq2OePSs7RdV3Fvbd0BxLzV9xAm3ciAfb X-Received: by 10.99.124.7 with SMTP id x7mr13216419pgc.356.1521585418138; Tue, 20 Mar 2018 15:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521585418; cv=none; d=google.com; s=arc-20160816; b=eVJ6XTdd4aHKDxw3uARWnXzFi8lMV4p96MUZffTqqaA3Fg+z0Nt5nlgb4gV/tuWM3f scv5c+FnBTdOhXgGNc6RayQkLV7qbzud62neOomafz2n1PMmDkdF4zotBVMaDfGJ1sIn vcdF2j0g+gtgRHlzz36wRfsPjOnStzAFbtkXmHZnqox1NxAX2RT6eVECytQczw/mZqe5 bs4R0Rnu+ntdA3y03zgUu8R+J+yQSK92c6O8xrYzmvlR3JQkP2QHTXC/BQwu3ZzRedHS IL3puQg6ahtVnGfa9fZ5YdOmbIKl/0cbNyyhzFlMfYHm4xuRmNbPbfptdkjCBFs6sIb6 FCrw== 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=PMMGimRH6bmCQ6tnd3pQ4mFd8G6rWCq2bnn+DBjYuB8=; b=bqnLnLGndVUoykjyWI6XNaM8mP8St3k+DKjdJRga5mBKCjgfQx2mQSi2VnhsxAO5hN KkklibRnwTgH2437D879rWNleNuCNYLj8P+83OJSfrtK/9G4oW7XVZVr/T5SDIECAzzV Ncoe9ygNIHoaBX0hELTHWbwAkHaYoCkr6gyym7sRuBHjIF0bNBvKm6xPtHkvgHfg2sXy CHhx9jTK4u4TXvkH+AbfWy6tvFuH3pdDkto+LXLTrsBlAogpdZzh3jyPK6xOs7Cfy6rm ZHwEG/1FnpWjdzikTtGqsy9WONbdRRli1Ok9qwbIzLS7f6Exl++kr1PFnzVIS2ME12qc tK8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tkIMMc35; 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 a6-v6si1671343pln.632.2018.03.20.15.36.43; Tue, 20 Mar 2018 15:36:58 -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=tkIMMc35; 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 S1752119AbeCTWej (ORCPT + 99 others); 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-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-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.804.g6dcf76e118-goog