Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp904523yba; Mon, 1 Apr 2019 20:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo6D4QkHDimuc3TjWqjxz15biaNQET+s5vkfkKAgnmdFoJrrXH1bV8Xd/n6vqUdG/1u59b X-Received: by 2002:aa7:9088:: with SMTP id i8mr64926786pfa.118.1554176665411; Mon, 01 Apr 2019 20:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554176665; cv=none; d=google.com; s=arc-20160816; b=WdfXgSN02C+GrGC3KnwoC8fNAjwrWTAg/X/R0T+u95AxB1EZQ7n6GI2E/uKknm47st 46PRbGs4nxdaGH1pnEgErcj+HH2HLeFgt8J1T5X0rOLn7O7jByaSIoOTx//y8fG9rRtd 2fchB4Svmu4qfOfuNqcBNKdtzTe993uWH/zp9ej2FJzdp7cKArgQJRSQenUs7wV1uF23 TUjdXovbHuJYa8aQ/Nda1S38uydFbBKU2LF364/7xpZzQwhqdzXBUAB1urfJPRQmCUdq NKP6IQqaXMtP4oF1/1O2r15+wRqIfuAyYIxdgsnFxCvd5gJ4avJzRqInMR7Isda9HZH8 dmMg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Hp60OTE4ke8iP5Aud+CmanJ0ZyIKgseuIbzLLPcisQY=; b=fiBlt4EU2exGaTcSSUeKQGMlR2QWM1UtbZPQnHogUjnoxL7uYaC4ouuHeo2UxxrTUn rznAUjyTwQ81O6ugVziKZkXtVNo3vZkWwST3r7AVguo/q8XbeNNby0l2dhVJywhx8Zje 4JO7r6wcFRYJzShD18r/63ZHWEflKAuIVFWOeNLHgFjIv6EXuvnybGX/CTn7hbeM0a8Q g4DJaoE5IgQ7FsWzSLDWiLVfcQVQQuVLDRj3j1f4JWIJPG2zwNmTplEZE/3IqkyqErGQ G1C7vkH5WtuX4sEnM+P4AgvgSwuD0bIUbi09m/0U+snNvXaDB8hffdxf6uWuisf8SWW6 HQ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=g3m1Y2Sc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w70si6415579pgd.571.2019.04.01.20.44.09; Mon, 01 Apr 2019 20:44:25 -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=@android.com header.s=20161025 header.b=g3m1Y2Sc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728856AbfDBDKY (ORCPT + 99 others); Mon, 1 Apr 2019 23:10:24 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44416 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfDBDKY (ORCPT ); Mon, 1 Apr 2019 23:10:24 -0400 Received: by mail-pl1-f194.google.com with SMTP id g12so5484889pll.11 for ; Mon, 01 Apr 2019 20:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Hp60OTE4ke8iP5Aud+CmanJ0ZyIKgseuIbzLLPcisQY=; b=g3m1Y2ScyzDAURubjhsTnVSDieFyBlqPSM2LC7CUatm8gRlzI4Z4XQ8e+sauoBVcMy /Si0ZgUXDkb0dPj3vSxlgc5r0s2q7Upfik19UZen265H5YZZ42iiEK9QbuX7YonIPVGD d0/tPGVBnFEdWBuZzWmyAl7nqsH30axLzN9a/pDbloDEH6lC9LU9a4jIP9tdhzmsciY5 S3tIIQOc4z1gsawWCFsfc9AkK7pkcFlCQf4Z5R8i1IFoxZ3IVzHzOFybLqrgNgncMa7W Yh4ifra9SolAtD3ZfW1fVy94mG7zhGcdjiK400DReloJN9yY0S5qFzHvofEschSfANPf kDSw== 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:mime-version :content-transfer-encoding; bh=Hp60OTE4ke8iP5Aud+CmanJ0ZyIKgseuIbzLLPcisQY=; b=D5ujoxlQj6GNcBMRblKduPLcOndkhU1v8uR7ntjT53kA89N8wl/D20NYm8GhR/HOGF xzlY32AsfK21LZYwHZ/+4l0mpOP2lQaH+6MYb0qHE4neSIGMm3ptI3cVbGOlICnPNPu2 HslEXUD9xxvDtUrNyuRne8fzRJc43KZxx20spwxH/M0HNUyf3M7HxVYqoH0pIcqsLgf8 VYQZhyyTMm6wc4fmnSqtflvRilEHmKFwZEcZOKwg5U+8C2VOuXBsubcRzgIbaZRVdjiM AVbc9XD56fsQDzveD2uekvZe0cjhs6teEkl/dlLqUVHRUaf5eBjW3gCb2usN1D9JKBGK S1mg== X-Gm-Message-State: APjAAAXVB5U+Y4BB04HP9u3BP9C7/3QuCrCP2fDjxgpVPWgk/iZZimGB siYN6wESULfQgY1Q0T7A1W1f3A== X-Received: by 2002:a17:902:2c83:: with SMTP id n3mr69465358plb.281.1554174623140; Mon, 01 Apr 2019 20:10:23 -0700 (PDT) Received: from trong-glaptop.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id c17sm16168464pfd.76.2019.04.01.20.10.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 20:10:22 -0700 (PDT) From: trong@android.com To: oberpar@linux.ibm.com, akpm@linux-foundation.org Cc: ndesaulniers@google.com, ghackmann@android.com, linux-mm@kvack.org, kbuild-all@01.org, rdunlap@infradead.org, lkp@intel.com, linux-kernel@vger.kernel.org, Tri Vo Subject: [PATCH v3] gcov: fix when CONFIG_MODULES is not set Date: Tue, 2 Apr 2019 10:09:56 +0700 Message-Id: <20190402030956.48166-1-trong@android.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog 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: Tri Vo Fixes: 8c3d220cb6b5 ("gcov: clang support") Cc: Greg Hackmann Cc: Peter Oberparleiter Cc: linux-mm@kvack.org Cc: kbuild-all@01.org Reported-by: Randy Dunlap Reported-by: kbuild test robot Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2 Signed-off-by: Nick Desaulniers Signed-off-by: Tri Vo --- kernel/gcov/clang.c | 4 ++++ kernel/gcov/gcc_3_4.c | 4 ++++ kernel/gcov/gcc_4_7.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c index 125c50397ba2..cfb9ce5e0fed 100644 --- a/kernel/gcov/clang.c +++ b/kernel/gcov/clang.c @@ -223,7 +223,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info) */ bool gcov_info_within_module(struct gcov_info *info, struct module *mod) { +#ifdef CONFIG_MODULES return within_module((unsigned long)info->filename, mod); +#else + return false; +#endif } /* Symbolic links to be created for each profiling data file. */ diff --git a/kernel/gcov/gcc_3_4.c b/kernel/gcov/gcc_3_4.c index 801ee4b0b969..8fc30f178351 100644 --- a/kernel/gcov/gcc_3_4.c +++ b/kernel/gcov/gcc_3_4.c @@ -146,7 +146,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info) */ bool gcov_info_within_module(struct gcov_info *info, struct module *mod) { +#ifdef CONFIG_MODULES return within_module((unsigned long)info, mod); +#else + return false; +#endif } /* Symbolic links to be created for each profiling data file. */ diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c index ec37563674d6..0b6886d4a4dd 100644 --- a/kernel/gcov/gcc_4_7.c +++ b/kernel/gcov/gcc_4_7.c @@ -159,7 +159,11 @@ void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info) */ bool gcov_info_within_module(struct gcov_info *info, struct module *mod) { +#ifdef CONFIG_MODULES return within_module((unsigned long)info, mod); +#else + return false; +#endif } /* Symbolic links to be created for each profiling data file. */ -- 2.21.0.392.gf8f6787159e-goog