Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932968AbcLSKru (ORCPT ); Mon, 19 Dec 2016 05:47:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:49115 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753509AbcLSKrt (ORCPT ); Mon, 19 Dec 2016 05:47:49 -0500 Subject: Re: [PATCH] scripts: checkincludes: add exit message for no duplicates found To: Cheah Kok Cheong References: <1482064519-4352-1-git-send-email-thrust73@gmail.com> From: Michal Marek Cc: linux-kernel@vger.kernel.org Message-ID: <213a88cd-de9c-d7f2-f765-1e8d35b569cf@suse.com> Date: Mon, 19 Dec 2016 11:47:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1482064519-4352-1-git-send-email-thrust73@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 627 Lines: 27 On 2016-12-18 13:35, Cheah Kok Cheong wrote: > If no duplicates found, inform user. > > Signed-off-by: Cheah Kok Cheong > --- > scripts/checkincludes.pl | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl > index 97b2c61..2bf234c 100755 > --- a/scripts/checkincludes.pl > +++ b/scripts/checkincludes.pl > @@ -37,6 +37,13 @@ if ($#ARGV >= 1) { > } > } > > +my $dup_counter = 0; > + > +sub nodup_count { > + ++$dup_counter; > + return; > +} I don't think it's necessary to have a function only to increment a variable. Michal