From patchwork Tue Dec 26 17:05:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10133199 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 BFBF26037D for ; Tue, 26 Dec 2017 17:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8AFF2DF7E for ; Tue, 26 Dec 2017 17:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D8DA2E10A; Tue, 26 Dec 2017 17:33:58 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 10E492DF7E for ; Tue, 26 Dec 2017 17:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751107AbdLZRdl (ORCPT ); Tue, 26 Dec 2017 12:33:41 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:45610 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbdLZRdf (ORCPT ); Tue, 26 Dec 2017 12:33:35 -0500 X-IronPort-AV: E=Sophos;i="5.45,461,1508796000"; d="scan'208";a="306932435" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 26 Dec 2017 18:33:31 +0100 From: Julia Lawall To: Dmitry Torokhov Cc: kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 1/1] Input: inline macros for MODULE_LICENSE, etc Date: Tue, 26 Dec 2017 18:05:05 +0100 Message-Id: <1514307905-3486-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1514307905-3486-1-git-send-email-Julia.Lawall@lip6.fr> References: <1514307905-3486-1-git-send-email-Julia.Lawall@lip6.fr> 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 Inline macro for MODULE_LICENSE to make the license information easy to find, eg with grep. Inline the other module-related macros at the same time. A simplified version of the semantic patch for the MODULE_LICENSE case is as follows: (http://coccinelle.lip6.fr/) // @s@ identifier i; expression e; @@ #define i e @@ declarer name MODULE_LICENSE; identifier s.i; expression s.e; @@ MODULE_LICENSE( - i + e ); // Signed-off-by: Julia Lawall --- drivers/input/misc/keyspan_remote.c | 9 +++------ drivers/input/tablet/acecad.c | 9 +++------ drivers/input/tablet/hanwang.c | 10 +++------- drivers/input/tablet/kbtab.c | 9 +++------ 4 files changed, 12 insertions(+), 25 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 77c47d6..594d2f84 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -18,9 +18,6 @@ #include #define DRIVER_VERSION "v0.1" -#define DRIVER_AUTHOR "Michael Downey " -#define DRIVER_DESC "Driver for the USB Keyspan remote control." -#define DRIVER_LICENSE "GPL" /* Parameters that can be passed to the driver. */ static int debug; @@ -590,6 +587,6 @@ static void keyspan_disconnect(struct usb_interface *interface) module_usb_driver(keyspan_driver); MODULE_DEVICE_TABLE(usb, keyspan_table); -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE(DRIVER_LICENSE); +MODULE_AUTHOR("Michael Downey "); +MODULE_DESCRIPTION("Driver for the USB Keyspan remote control."); +MODULE_LICENSE("GPL"); diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index aebb3f9..4b68549 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -34,13 +34,10 @@ * Version Information */ #define DRIVER_VERSION "v3.2" -#define DRIVER_DESC "USB Acecad Flair tablet driver" -#define DRIVER_LICENSE "GPL" -#define DRIVER_AUTHOR "Edouard TISSERANT " -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE(DRIVER_LICENSE); +MODULE_AUTHOR("Edouard TISSERANT "); +MODULE_DESCRIPTION("USB Acecad Flair tablet driver"); +MODULE_LICENSE("GPL"); #define USB_VENDOR_ID_ACECAD 0x0460 #define USB_DEVICE_ID_FLAIR 0x0004 diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c index df4bea9..4042c41 100644 --- a/drivers/input/tablet/hanwang.c +++ b/drivers/input/tablet/hanwang.c @@ -28,13 +28,9 @@ #include #include -#define DRIVER_AUTHOR "Xing Wei " -#define DRIVER_DESC "USB Hanwang tablet driver" -#define DRIVER_LICENSE "GPL" - -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE(DRIVER_LICENSE); +MODULE_AUTHOR("Xing Wei "); +MODULE_DESCRIPTION("USB Hanwang tablet driver"); +MODULE_LICENSE("GPL"); #define USB_VENDOR_ID_HANWANG 0x0b57 #define HANWANG_TABLET_INT_CLASS 0x0003 diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index a41c3ff..831fbec 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -13,13 +13,10 @@ */ #define DRIVER_VERSION "v0.0.2" -#define DRIVER_AUTHOR "Josh Myer " -#define DRIVER_DESC "USB KB Gear JamStudio Tablet driver" -#define DRIVER_LICENSE "GPL" -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE(DRIVER_LICENSE); +MODULE_AUTHOR("Josh Myer "); +MODULE_DESCRIPTION("USB KB Gear JamStudio Tablet driver"); +MODULE_LICENSE("GPL"); #define USB_VENDOR_ID_KBGEAR 0x084e