From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdKVRFn (ORCPT ); Wed, 22 Nov 2017 12:05:43 -0500 Received: from smtprelay0242.hostedemail.com ([216.40.44.242]:40705 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751458AbdKVRFl (ORCPT ); Wed, 22 Nov 2017 12:05:41 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:5007:10004:10400:10848:11026:11232:11473:11658:11914:12043:12048:12296:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21433:21451:21627:30012:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: copy19_314b65456ee5b X-Filterd-Recvd-Size: 2091 Message-ID: <1511370336.6989.100.camel@perches.com> Subject: Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define From: Joe Perches To: Greg Kroah-Hartman , netdev@vger.kernel.org, Julia Lawall , cocci , outreachy-kernel@googlegroups.com Cc: "David S. Miller" , Andreas Kemnade , Johan Hovold , linux-kernel@vger.kernel.org, Philippe Ombredanne , linux-usb@vger.kernel.org Date: Wed, 22 Nov 2017 09:05:36 -0800 In-Reply-To: <20171117141939.GD17880@kroah.com> References: <20171117141939.GD17880@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote: > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source > code license to work properly, as there is no need to unwind the > unneeded dereference. [] > diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c [] > @@ -76,7 +76,6 @@ > > #define MOD_AUTHOR "Option Wireless" > #define MOD_DESCRIPTION "USB High Speed Option driver" > -#define MOD_LICENSE "GPL" > > #define HSO_MAX_NET_DEVICES 10 > #define HSO__MAX_MTU 2048 > @@ -3288,7 +3287,7 @@ module_exit(hso_exit); > > MODULE_AUTHOR(MOD_AUTHOR); > MODULE_DESCRIPTION(MOD_DESCRIPTION); > -MODULE_LICENSE(MOD_LICENSE); > +MODULE_LICENSE("GPL"); Probably all of these MODULE_(MOD_) uses could be simplified as well. Perhaps there's utility in a (cocci?) script that looks for used-once macro #defines in various types of macros.