Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7781795ybi; Mon, 22 Jul 2019 20:39:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz91NvP+gSUmzeaLT+Fp2UKMY1wJKSgs9j1w5Wto0X5ht1/HJcK+LUhBiWgdmXTY60FjhxV X-Received: by 2002:a17:902:28e9:: with SMTP id f96mr75388262plb.114.1563853191435; Mon, 22 Jul 2019 20:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563853191; cv=none; d=google.com; s=arc-20160816; b=fht1PjUjtYpwaCQ+cQ/E1qhhQAQKBKiqM0CQi4bJaWp5wDIYbyVeU3URtEUaJRvBlm OwAvj7KqZJ7nI3zjqKZT21cdYfGr4fWh8InCWw/fDaG/quiAshFrMUnu4j/qh1yg0wGz IqQ8Q0vI3wrstN7FocHc/c8cPA+vA1m6r6VxHTQhWF11a7ydeWaKfiWM4VLY0DEKd9zL FkYiOPBMGrULMNX04aY354qf2jhyrzBq5eGljsS9uUsu+jmhIIQDKe4KDdVAOD/yEBGU EffBsw0e5yAHur/kPYgYdc75uDvVzP6no0mVHDeV1fqgcpX5b8B6okDpLHlbfaaEWV4T PXkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZbTATclhVfBlGWFDB5efjA9W9vf6/Py4hi06i3erHPU=; b=YW//H4svJsY3FJHW/MAqOKWXJORB3y/yVq20DdLAxlS+qYKzInK5rYhC2DIsnM/yWU GT1ZYdPQD2eVXWFlOx2Q8LeUImkOSnM+EoN0yadjf41/Kf7+DigeQeyKgagQHSEd2dE3 0ZF6HPO05dPb2JZ6GNdYs8V9aTARaLCjxZBjGdTvdJlugNSLU6f7z7KfaUlEcCZG/JVO TaUtEXFxXqpTZQI1/+bbTNY8n6hBan9acUFoXX5alkj2f8T2oAwKM6W5QENr8H5a2nuT 5ZzzRizlqy0NcDNgLqGVD0oBK+C9BdjIe0lsiGTMrMvPbKngfiW+8euKkSUy+BBmusLW p6cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AnoDBrth; 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 o63si10016840pjo.94.2019.07.22.20.39.36; Mon, 22 Jul 2019 20:39:51 -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=AnoDBrth; 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 S1732909AbfGVVsq (ORCPT + 99 others); Mon, 22 Jul 2019 17:48:46 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34446 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730274AbfGVVsn (ORCPT ); Mon, 22 Jul 2019 17:48:43 -0400 Received: by mail-ed1-f66.google.com with SMTP id s49so7115350edb.1; Mon, 22 Jul 2019 14:48:42 -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 :mime-version:content-transfer-encoding; bh=ZbTATclhVfBlGWFDB5efjA9W9vf6/Py4hi06i3erHPU=; b=AnoDBrthgsI3o8DGAH7++2JDKpO82XDtupaff6mpz+ogj/++m9LBhYgjzm5kZJkgeJ NGtdFGN3lGgpql95xFsgGsh0Wom2dUDyrglnt4RNWBFy7aNU5veBR7Vbpscp67hceA4i N42ClwCCBIvusI0evmnIdaWNN5TOIWZC+f1PuT8JonpTCccV8zWWC403k9ixwjL1STCf wAq+EK/I3Us34HitRF6oj1Yf0eRD0V/n4K1mD5kRZEbw5Xrc4pSaPcmkSZPY0yzHqWpa lHcVIbPb4ZRVLJnbbFQER1Jgt9sTFsbwLhbpiKlk+t0wmhPKJbTaUjkkKC21dIpfWLEJ 3lyw== 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=ZbTATclhVfBlGWFDB5efjA9W9vf6/Py4hi06i3erHPU=; b=PEXk9YTtgtDvcZZsnv6jyEUauXg94WcttO8V4GrNzTPh/V7RYoJ2D5vgNNci4Y/NZx pd2KLB5plvy9WH2F24A4ZcR/4o3/GG653tG9i6DnHtztNNMEFkO1B5LMWyu4rIVm8RR4 Z5m2x1TNl5FWDBnUzG8W1PhVaPFZSy3cjVnC1RttqxPdtvX+hBaOtcYuECAuosoZFhrk IOaRd85r321dZ47f1OdG5evJspjlVhflo8i+3HpqhkD9dfx2Q/UbatM5qMy2l/lAY6Ef i0mViu6MeN/NZeSVB3e5+NATylSkA7EPfOLb3nWsS4GAkhCnLtT7SbYpRIKCaDQyDwej F8Iw== X-Gm-Message-State: APjAAAWfnnXbPsBo41/qFad6kBrPM5iKH8hDwiY5k3Ax1GJgGJA3f9XW +x0ySQUxdM+jgeMPdBwK1Gc= X-Received: by 2002:a17:906:ad86:: with SMTP id la6mr52067941ejb.43.1563832121287; Mon, 22 Jul 2019 14:48:41 -0700 (PDT) Received: from localhost.localdomain ([65.154.66.198]) by smtp.gmail.com with ESMTPSA id d4sm11315617edb.4.2019.07.22.14.48.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 14:48:40 -0700 (PDT) From: stillcompiling@gmail.com To: Joe Perches , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org (open list:HID CORE LAYER), linux-kernel@vger.kernel.org (open list) Cc: Joshua Clayton Subject: [PATCH v3 1/3] HID: core: reformat and reduce hid_printk macros Date: Mon, 22 Jul 2019 15:48:25 -0600 Message-Id: <20190722214827.29257-1-stillcompiling@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190722163642.10417-2-stillcompiling@gmail.com> References: <20190722163642.10417-2-stillcompiling@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joshua Clayton Reformat hid_printk macros to use standard __VA_ARGS__ syntax Remove hid_printk(), hid_emerg(), hid_crit(), and hid_alert(). Per Joe Perches these unused and likely never to be used. Signed-off-by: Joshua Clayton --- include/linux/hid.h | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/include/linux/hid.h b/include/linux/hid.h index d770ab1a0479..e6c7efdb0458 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -1154,29 +1154,21 @@ int hid_pidff_init(struct hid_device *hid); #define hid_pidff_init NULL #endif -#define dbg_hid(format, arg...) \ +#define dbg_hid(fmt, ...) \ do { \ if (hid_debug) \ - printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ + printk(KERN_DEBUG "%s: " fmt, __FILE__, ##__VA_ARGS__); \ } while (0) -#define hid_printk(level, hid, fmt, arg...) \ - dev_printk(level, &(hid)->dev, fmt, ##arg) -#define hid_emerg(hid, fmt, arg...) \ - dev_emerg(&(hid)->dev, fmt, ##arg) -#define hid_crit(hid, fmt, arg...) \ - dev_crit(&(hid)->dev, fmt, ##arg) -#define hid_alert(hid, fmt, arg...) \ - dev_alert(&(hid)->dev, fmt, ##arg) -#define hid_err(hid, fmt, arg...) \ - dev_err(&(hid)->dev, fmt, ##arg) -#define hid_notice(hid, fmt, arg...) \ - dev_notice(&(hid)->dev, fmt, ##arg) -#define hid_warn(hid, fmt, arg...) \ - dev_warn(&(hid)->dev, fmt, ##arg) -#define hid_info(hid, fmt, arg...) \ - dev_info(&(hid)->dev, fmt, ##arg) -#define hid_dbg(hid, fmt, arg...) \ - dev_dbg(&(hid)->dev, fmt, ##arg) +#define hid_err(hid, fmt, ...) \ + dev_err(&(hid)->dev, fmt, ##__VA_ARGS__) +#define hid_notice(hid, fmt, ...) \ + dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__) +#define hid_warn(hid, fmt, ...) \ + dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__) +#define hid_info(hid, fmt, ...) \ + dev_info(&(hid)->dev, fmt, ##__VA_ARGS__) +#define hid_dbg(hid, fmt, ...) \ + dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__) #endif -- 2.21.0