Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2914560pxk; Mon, 28 Sep 2020 03:44:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXx04ZL51FoDgoFyI6mihmIJZd8EmpsamFhozEHUo2VgrRSLDVMENsRuV7Rh+Qx+9XYWce X-Received: by 2002:a17:906:cc98:: with SMTP id oq24mr973890ejb.106.1601289863644; Mon, 28 Sep 2020 03:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601289863; cv=none; d=google.com; s=arc-20160816; b=ArJ154WvsO/uJuZSTGsgy/GwsNIsXVuVmd1h4lGfqjj1lbd9F+T6em3uTwNPTv1TaO jA9qbLibeHGMHZnjxyP9nv1UIf8hjtJDYqNsFqk5mBTirZJx+Cgz9E222yNuX4Fj+9pi Kx1+Ov/yRaWAZ9h3wnn3eKzLC15yhQqLsfaZIP8ql7/6ryblWBAfNPQRxjTytzGxjTab f6SfJx9QV6iUZl66nGtw+FbSCRiKq/SHrb59wZbSOK9T2m1PmR+RmsVpPdLxVlotagBE fkcOb2dSCvkwGgMAAF0RSy+BikaPusFcLf90PWyDekkfAs2E5PcGcZADVvjrTfHyx+ow M6Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9OHLxj5LKThNKX3AdZ96/ghdViR26xgQsL7zhp/+aDs=; b=iMk9328XInbrGodzo2jV8TR5n3AmTQarg4DrIXDH0Y8drwoJAn0d+hQRRevZ3tLV2f tH351kd5qFIrMxP3Jjp2FPAAlTCoIoim2BtM6PJ5b6qEhT3O+EXrW/OlKXo5/I7/XX6r 84IUqU+4wCXU6lP972CZAcZjiAqFKEFW8NksCiby6E5v6rsGq8mdNuEHPoi6/adM9EwE h5mejznTjF3oD2L5Y6MxNyeccLSulqYl1IIxF+RT2iaSAYyDvKdL5d0lkl5Cm3QLZ5fi D0zZ0YAdMi7q++JocbGz4GxV31KfwUyWbdwvYWAyUucq/p2SFw9KnTBCwCxAtA2cPO5D noiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=a5ghI0fL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s14si360944ejx.304.2020.09.28.03.44.00; Mon, 28 Sep 2020 03:44:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=a5ghI0fL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbgI1Kma (ORCPT + 99 others); Mon, 28 Sep 2020 06:42:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbgI1KmJ (ORCPT ); Mon, 28 Sep 2020 06:42:09 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE5BC0613DA for ; Mon, 28 Sep 2020 03:42:06 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id e2so641471wme.1 for ; Mon, 28 Sep 2020 03:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9OHLxj5LKThNKX3AdZ96/ghdViR26xgQsL7zhp/+aDs=; b=a5ghI0fLgsfZKabmY7q23//OX5oPw2iffveHVQ71bkjGVVICZKZ17FxZGZCoYb1D30 hddl2lKzBQFamZTmMVG3n7p0Zs0/v6UBj/vSryoXw1wc1ZcA36pEWjhUBOa7ZD01L6cu EDHNit98fpoeDsy9F+TmaNP9mMQHlt14cJVNwEUJqjqmzodnuRQUPiKMiER95nW+yFkA 5FfIOoUthFQb9fX0KBbqlQnHnj7Yv13lyWOs8+H4V2T9n1ZRcWYLkAWUfmoc15nMhHEC FByGJR4jVd/F2rXJY46vesVPjgQlYYr+LVmmWL0fQ8F2rwQk29Azjd+Pz7eBnvbjiNVh McgQ== 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:mime-version:content-transfer-encoding; bh=9OHLxj5LKThNKX3AdZ96/ghdViR26xgQsL7zhp/+aDs=; b=sLHKrKXLFvd2n5RKSxVaBPnFnza1uVmM9o2SLm1Sri8W0EzBgtXUXRMUwvUQv66WGr N3WDJ0YKI31C2H3ra6O7FXMoFAjiJT3MJ4R+R0TWP9xcb+HCG2y7nu6noIBinzJaQb7a sfAeAV+VcEIZggql2Fff+HSxI0/VIYnubbFu/5B3XLhzHLeI0mKH61rU0KjrdKy5cRMr CY27s0wsLe3EmchQjMi/6P69ZTZ6qnh0anMhKFfFUl9jA74Aa2xXnu/+FOTF5Ubgy2IS jEMIjM8kJJ3Zt35f9ggHhhs4OhrVSMMDJWL8+zplFd4Pob7dehf/Awe31Hotg+8QK7Sz GT9g== X-Gm-Message-State: AOAM530W3RMu9BSGZE97hAI6tidklfi53KOJ/0rntFogUmdk3ilqpctA BIKnlwfvw9Yjyp6FguZL6H95dQ== X-Received: by 2002:a7b:cc84:: with SMTP id p4mr1008856wma.58.1601289725175; Mon, 28 Sep 2020 03:42:05 -0700 (PDT) Received: from debian-brgl.home (lfbn-nic-1-68-20.w2-15.abo.wanadoo.fr. [2.15.159.20]) by smtp.gmail.com with ESMTPSA id f14sm939258wrt.53.2020.09.28.03.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 03:42:04 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Jonathan Corbet , Andy Shevchenko , Kent Gibson Cc: linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 5/9] gpio: mockup: use pr_fmt() Date: Mon, 28 Sep 2020 12:41:51 +0200 Message-Id: <20200928104155.7385-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200928104155.7385-1-brgl@bgdev.pl> References: <20200928104155.7385-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski We don't need a custom logging helper. Let's use the standard pr_fmt() macro which allows us to use all pr_*() routines with custom format. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-mockup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c index 90a1d6c2775f..c2b2f7d5ff34 100644 --- a/drivers/gpio/gpio-mockup.c +++ b/drivers/gpio/gpio-mockup.c @@ -7,6 +7,8 @@ * Copyright (C) 2017 Bartosz Golaszewski */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -30,8 +32,6 @@ /* Maximum of three properties + the sentinel. */ #define GPIO_MOCKUP_MAX_PROP 4 -#define gpio_mockup_err(...) pr_err(KBUILD_MODNAME ": " __VA_ARGS__) - /* * struct gpio_pin_status - structure describing a GPIO status * @dir: Configures direction of gpio as "in" or "out" @@ -548,7 +548,7 @@ static int __init gpio_mockup_init(void) err = platform_driver_register(&gpio_mockup_driver); if (err) { - gpio_mockup_err("error registering platform driver\n"); + pr_err("error registering platform driver\n"); debugfs_remove_recursive(gpio_mockup_dbg_dir); return err; } @@ -577,7 +577,7 @@ static int __init gpio_mockup_init(void) pdev = platform_device_register_full(&pdevinfo); if (IS_ERR(pdev)) { - gpio_mockup_err("error registering device"); + pr_err("error registering device"); platform_driver_unregister(&gpio_mockup_driver); gpio_mockup_unregister_pdevs(); debugfs_remove_recursive(gpio_mockup_dbg_dir); -- 2.26.1