Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1788247ybb; Fri, 29 Mar 2019 11:19:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2WXbDXzbNmDE0sMG0Zzn8RAh7wmzhTnS6A6dUbmiSr0sMnpyzTKs5k1Iw58YJAJEfswgQ X-Received: by 2002:a63:61d7:: with SMTP id v206mr46454017pgb.349.1553883578891; Fri, 29 Mar 2019 11:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553883578; cv=none; d=google.com; s=arc-20160816; b=R06LY+jDE4AkaSfRmSvXtXVA9yKgplMJ9E0VGHQN6TynSCuj3+FNzCvuZMmHghrCsd +ZgGg23V2ClEI0uo/fHLKXhM9igM2iOmJEoBS7ixnZIYNZ49DDmC2dRijtXMOSJ0yN/r bTwhKx1mxku2lDKP81UrfASt/7KIrpOSLl5GANAl3SmM34/SV9QDKQ8kfvUngemBMZo5 fbMSKshXhobQzjgrNNzCfM03dVtx3riJl1fBP8tdTglR12D740RfdW7TGYFzteXf4WBp ohTG3ZYln1uOEVrnfi1syREOSXhd3+gZEFAnbLloLHotkDd61dS6jtJNNYX6qHlmUWj6 VqRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=TseWlpWgDOC1dH/DYUii6Dj7Adu2b04wsLgsksnWzVs=; b=NDU8JqM5LCAfZKq0+MOah+uNDjvsPnEgF1bRr2XiE1idLcKg2jP1wlg8koYwB+D0wG 6Y7EnFqgiTbAOXHq0lFsN33NTH9wLUU89XvoJ079e1lElWCISrQXoCu1tvP68F5U+PbY QDL9FNcCm5qPOWTAJ/Ty6CRW8KUNe1ZcSxefY3NkEBUY0uIGgrREzRWcG+87hOslUl2x c8o90WeL78OPbLy62eCTr/pSLBcEIJidNB5j9hiqI7KxRL2N6QI17O25SyKXKDzYuxRm rMmmWYYhL9HFs4kiKy+ZhCsPFgZGrSzosEDWiyNsTKH7oplYwvmDDxfOhEl6eBlTsnES dYkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aCWK7gJz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si2360399plk.7.2019.03.29.11.19.22; Fri, 29 Mar 2019 11:19:38 -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=@google.com header.s=20161025 header.b=aCWK7gJz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729993AbfC2SSq (ORCPT + 99 others); Fri, 29 Mar 2019 14:18:46 -0400 Received: from mail-oi1-f202.google.com ([209.85.167.202]:46424 "EHLO mail-oi1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729932AbfC2SSp (ORCPT ); Fri, 29 Mar 2019 14:18:45 -0400 Received: by mail-oi1-f202.google.com with SMTP id r190so1202048oie.13 for ; Fri, 29 Mar 2019 11:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=TseWlpWgDOC1dH/DYUii6Dj7Adu2b04wsLgsksnWzVs=; b=aCWK7gJzF3d75NDpKwWtvmS/qE84L+JURj00H6Rnfrs9q+nLcB7Iar9x4ITUCEC0Nb 3lumsJUWh9/3schkD1WrA+EGu2Vu6ZLjfVb6lYn94aGhq8iMp69ap/CFBL1esizbgHGT zuRylkxVZv3nLdX/jczIvsCBbtQkWaKggyYZ2Fo3Tedv2UuFmPW5INX+fQNmYKnrmwCA 2cb9kFZDTglPbLG6521pJ03Rx2hZfprggupI01xKA2z7uvIgASCVvL13RwWwi7kGKJ4q zj0Urly5rpwdSrRefTuReJ4cPhu5Bc6ksomuE39b6dp1n3b0lMTAt5Fbp92I3eBS84u8 6VUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=TseWlpWgDOC1dH/DYUii6Dj7Adu2b04wsLgsksnWzVs=; b=bn6/Gk+lu8Zp3kG+YcKkf48P4EuymfZZYvX8rZk+5s3+itrV80y7D8D78l5iMoYgAF k3AuLC/uXiGhN3MTCwlqZH/oLF/o/OITpAKLHgTPwKP89SUrBUt+a6EaPj5pKG7oxutJ ckoly+d2qvwaIQVxUFHf/07Auwn7NN4FzTd1Y+7qzKrim31aWAqz9MHTMYVa3PBJqwUQ +bo1QsfKJMbJVZNBJAj7tRFoI+99pvHPacvl2uEhPpbkheyxhbiSbzHrCDdw8D1a63cc 7zbdRP48nGhoMHV/9EjfA3L+95klvr7fpUCExWXOESOfm8kOGCOh1nhiyCxNF4APB5PH pQQg== X-Gm-Message-State: APjAAAU4tEOsV4UpU2nM4yyOUR0c+88t9cyv9V5txB1HV9eieKPIgPUJ qC2T4XEVIPYLak9pDesH8635BQ7gbvp+d8wfKQE= X-Received: by 2002:aca:3841:: with SMTP id f62mr4238023oia.9.1553883524800; Fri, 29 Mar 2019 11:18:44 -0700 (PDT) Date: Fri, 29 Mar 2019 11:18:39 -0700 In-Reply-To: Message-Id: <20190329181839.139301-1-ndesaulniers@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog Subject: [PATCH v2] gcov: fix when CONFIG_MODULES is not set From: Nick Desaulniers To: oberpar@linux.ibm.com, akpm@linux-foundation.org Cc: Nick Desaulniers , Greg Hackmann , Tri Vo , linux-mm@kvack.org, kbuild-all@01.org, Randy Dunlap , kbuild test robot , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes commit 8c3d220cb6b5 ("gcov: clang support") Cc: Greg Hackmann Cc: Tri Vo 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 --- kernel/gcov/gcc_3_4.c | 4 ++++ kernel/gcov/gcc_4_7.c | 4 ++++ 2 files changed, 8 insertions(+) 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