Received: by 10.223.185.116 with SMTP id b49csp1456105wrg; Sun, 11 Feb 2018 12:28:16 -0800 (PST) X-Google-Smtp-Source: AH8x225Oa7GjZ7PftHnav8vEnzFWVtuNmRTfIMVy/kw4ULqIUe7uZ8PBEp6STVrJwUpvC1veA2h0 X-Received: by 10.98.242.14 with SMTP id m14mr4266368pfh.230.1518380896804; Sun, 11 Feb 2018 12:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518380896; cv=none; d=google.com; s=arc-20160816; b=bzNCTw1gSp6KDgxsJprvVIcAnRFQ/xIv5/ZRt8HN02pIK3I5ThumP1D4/Wnqv1UJ31 +ha25A0ssMUmtUVyi/nVeHfbch6UemT1q3s1G213x5VpkmVyzWjrcVx+QqOupde45Vdt tikt4aoqojiYUK+lnfr7jYuE0zlhPpB0W+tiPxF2n0fAZ7LE5Lb+zjpP02uT6FqT/g2q LQWfhYh5Zj7euLc4e4nAJP5WaOWxn4af5GMXadBTYGs+jDmS9hvu2UKZCD7Rrpghe3i8 3pyagyU0QKHT9hrba3iJnwU99omvBS5+JWm5nsg3FuXJdz6P2+ls5K7I5xp++pBEMmt2 OfVw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=QRSm1Nc6TebnZVOSgVBzpvS8y9TFc9rygqDZ4NjtEg8=; b=TM7GO65/AH8wneF5QhW2h9Y6zAPJBF1GiELHVsQiTgnmE5VI74KQflsEDro6okSJKQ wo62Krdl4B0Njy/J544PE3Gq8FokTmehJxfzpNkUFnOYygH5SzK5wQoSUARCVhN5J8qm Z/gXp42hLmlLyiGHi3W39ww1wwHb61nWvo7KBMQdv01jlVh0b+8F/YjH5ZrIZignUmqp 6ePq/wCQ6pDxySu3ErDlyXA1eqgBodWZrCCNEisf0KZqulT7H3vSWql+f+3DzClDN2CA 8QFO6TYq/iHJag8pYvO5ZtM8tEziBsLN1MtrZRikVxR7BSTFHJ8uvRMIgcEhljiFE7e9 qOqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jF06J4IS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si2809856pgd.335.2018.02.11.12.28.02; Sun, 11 Feb 2018 12:28:16 -0800 (PST) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=jF06J4IS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932140AbeBKU1X (ORCPT + 99 others); Sun, 11 Feb 2018 15:27:23 -0500 Received: from casper.infradead.org ([85.118.1.10]:54836 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932091AbeBKU1W (ORCPT ); Sun, 11 Feb 2018 15:27:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QRSm1Nc6TebnZVOSgVBzpvS8y9TFc9rygqDZ4NjtEg8=; b=jF06J4ISkMiRu54OnUepLKw5f1 /Xx44jaVw7RtA2DDQHSsePwFihGgRpMTIX5utc0/Rr6VeJy/T2rE3dTrGmbyDZsF1rpOuDRlwYu8C Y1VHBqXwvfVm7LWvb1Gi6CfOEgWcleLOqOF8kir1eFd+4D61gsKRV7KKmTTy0ZXmIUMIYFdfitlo2 7N4krqeUyGMshWx6pKVo28B6tUtPG/5uUnmb5O1MuJRsD5du9++/sIdIrcVkpTTHBw6OvNPVDZqAV 7us3ioCLeDdnkxO6/qHUF0GfgHACbnU6fZO19A5S0VluB+7DtYuYKlQHCneX4DhzEwOdVb6rOjuRF jZEDyERg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.site) by casper.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ekyDW-0002Wg-HP; Sun, 11 Feb 2018 20:27:18 +0000 Subject: Re: [PATCH 2/6] genalloc: selftest To: Philippe Ombredanne , Igor Stoppa Cc: Matthew Wilcox , Jonathan Corbet , Kees Cook , mhocko@kernel.org, labbott@redhat.com, jglisse@redhat.com, Christoph Hellwig , cl@linux.com, linux-security-module@vger.kernel.org, linux-mm@kvack.org, LKML , kernel-hardening@lists.openwall.com References: <20180211031920.3424-1-igor.stoppa@huawei.com> <20180211031920.3424-3-igor.stoppa@huawei.com> From: Randy Dunlap Message-ID: Date: Sun, 11 Feb 2018 12:27:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/18 12:22, Philippe Ombredanne wrote: > On Sun, Feb 11, 2018 at 4:19 AM, Igor Stoppa wrote: >> Introduce a set of macros for writing concise test cases for genalloc. >> >> The test cases are meant to provide regression testing, when working on >> new functionality for genalloc. >> >> Primarily they are meant to confirm that the various allocation strategy >> will continue to work as expected. >> >> The execution of the self testing is controlled through a Kconfig option. >> >> Signed-off-by: Igor Stoppa > > > >> --- /dev/null >> +++ b/include/linux/genalloc-selftest.h >> @@ -0,0 +1,26 @@ >> +/* SPDX-License-Identifier: GPL-2.0 > > nit... For a comment in .h this line should be instead its own comment > as the first line: >> +/* SPDX-License-Identifier: GPL-2.0 */ Why are we treating header files (.h) differently than .c files? Either one can use the C++ "//" comment syntax. > > >> --- /dev/null >> +++ b/lib/genalloc-selftest.c >> @@ -0,0 +1,400 @@ >> +/* SPDX-License-Identifier: GPL-2.0 > > And for a comment in .c this line should use C++ style as the first line: > >> +// SPDX-License-Identifier: GPL-2.0 > > Please check the docs for this (I know this can feel surprising but > this has been debated at great length on list) > > Thank you! > -- ~Randy