Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3914689ybl; Mon, 12 Aug 2019 08:23:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkdIscOjEbuoxq9tN/YMBYnXR//7bhB5p7fmFPcj/iFqM/bsx5FMS7EARwNgy1AfEb5Hmd X-Received: by 2002:a17:902:b090:: with SMTP id p16mr12276014plr.93.1565623402650; Mon, 12 Aug 2019 08:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565623402; cv=none; d=google.com; s=arc-20160816; b=PpKOypWqwt1XYg9ld+qjTSn80WlivGaFCLV2kyDFB+BotDSqEOU4z53u5i1elMv8xH OAxCD5z5jeZDYTvU6AEE4PSF/rycHKes6T/fJd3fkyE4OjbpzFhy2mHdjsvFwUgmWeH/ aQiwz/oUif6H0z4wize/nSYa7yNqbhHwX6Z5ogNatlDp6ra52ovWm9AaznawjMeJVPQq TnZgj16jPS1EorBk/Q54dL5Ng/C4xNCK2FwxzjSerHDYVol8unz+AmK8xhbctsG3Y2DW bIK9waSJp9Hk4d8uC4XgJ43tJvuleiWGlDRULbCcLGAkH63fGn/EAEBsMkKJ0V1UbhV+ MlXw== 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=Zbw0t6lejk4G6cnkRecei3s1P5sNxAOl1amPr4XO5a0=; b=pbKa7uD9eABlpE06WGp7F7HC+yHV6uh2WyJYPHqmihD0OUIvSbgVYB0hl0zDpFE+md nLap8UmeYMt5u2sIcpLmoCXR79/ksHfk9t/uFYZqCvBcezI2gej5qiPXmofvcr6RH+od uWrojw7OXbi6QCTu+MVomXyaHbGyFCiwH8qpQlM1aS2D6ey+3bpJ9A0ZNwHiInBfIs+2 hgCZkDFfkd1wxqLHZQfy2L96iDYCtsQXgQRVLsQYQFlxmB3kVacggUVZ/MoHjQzxgYoG ssUA84Xr2ryPWCIg4GHwcPb2lEU5bXW/SaUl5Vk2ww003Cocws/ie0r7vF8iy2n4BA35 16gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XUbrbMiP; 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 k3si11362973pjt.103.2019.08.12.08.23.04; Mon, 12 Aug 2019 08:23:22 -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=XUbrbMiP; 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 S1727696AbfHLPUi (ORCPT + 99 others); Mon, 12 Aug 2019 11:20:38 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36734 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727122AbfHLPUi (ORCPT ); Mon, 12 Aug 2019 11:20:38 -0400 Received: by mail-ot1-f68.google.com with SMTP id k18so28021577otr.3; Mon, 12 Aug 2019 08:20:37 -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=Zbw0t6lejk4G6cnkRecei3s1P5sNxAOl1amPr4XO5a0=; b=XUbrbMiPdC4CsGZo+BrXMTeROlKzIsaOvXUR4UzkqeJKNOVMv0xqBdCWPxign2/PI3 hbWQki1CTgaL45djIDH8Q9Tz5BP0sjFR0oLooi4/v/MvUCC4pEi7BoaCqDXCwDe5CLwy UZfbr+6aujfiKa+Ey/m3J3/QVzBgMoNX8I7VW1kgkEG+rJrz1jU5ujGCizrw2wAHmk+u VEdisRV0jcGiKQAD+Z3Rp4x2boADfN818OUwb8I4m7rCyOMYmFqJrs+rdTfqgfQDZJj7 h9PJY8Hp7l231v9wzmOsU8rTcWPNZlDfXgX6PMJol+7tb6KP9VWVBKS8aC7OwwzwfRnD J3UQ== 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=Zbw0t6lejk4G6cnkRecei3s1P5sNxAOl1amPr4XO5a0=; b=r1Z+ojp/fOywMeNQzARdEB/CqPoAc2T4MSBxRFcpzgVEzNAal6+XjDeB90avdGOhBg dzbB85F/h35bFkODkhc9keHOAuNST5N1RBJ3hZjKwcsT+M2FMBtnXaThd+S/hkkRB4x5 lGjJo2/IAh4ctAWlOKL9+j/WRMImSbUz8MZy7soRL0WveAHmwEYOIGJyXl5q/VR/GnuF 4F6NMZZa/Ric3/eE1auDXU4L3PbzVk22V2JyaYcbBqRocxZYjn7HpyIVYMFPgnC0gkFE sPQS6g97BR4bApRhetXUWQXLw0V3C7/iKvS94IT2Ven//PyBmzWF1jW8M2VT4GA0wBlU vf7A== X-Gm-Message-State: APjAAAU/VJ4HMxPMFmLMmYnEWotzSSV82/OglE0vctGaudH4jhrUJYmu A8QLTuLRySyLm/TLkec6/4A= X-Received: by 2002:aca:6044:: with SMTP id u65mr13621440oib.25.1565623237010; Mon, 12 Aug 2019 08:20:37 -0700 (PDT) Received: from localhost.localdomain ([65.154.66.198]) by smtp.gmail.com with ESMTPSA id e10sm31792662oie.37.2019.08.12.08.20.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 08:20:36 -0700 (PDT) From: stillcompiling@gmail.com To: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org (open list:HID CORE LAYER), linux-kernel@vger.kernel.org (open list) Cc: Joe Perches , Joshua Clayton Subject: [PATCH v3 1/3] HID: core: reformat and reduce hid_printk macros Date: Mon, 12 Aug 2019 09:20:20 -0600 Message-Id: <20190812152022.27963-2-stillcompiling@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190812152022.27963-1-stillcompiling@gmail.com> References: <20190812152022.27963-1-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. Per Joe Perches hid_printk(), hid_emerg(), hid_crit(), and hid_alert() are unlikely ever to be used. Remove them. Signed-off-by: Joshua Clayton 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