From patchwork Fri Mar 29 18:18:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 161475 Delivered-To: patch@linaro.org Received: by 2002:ac9:18c7:0:0:0:0:0 with SMTP id i7csp2247566oce; Fri, 29 Mar 2019 11:18:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw15zF0GI0fzI2gDhnHUbriY90eep2DoaQiqGhFjCHQwJ+1yCUD6F/PxA1TZBEKB19JTT2X X-Received: by 2002:a63:c45:: with SMTP id 5mr40075568pgm.385.1553883528246; Fri, 29 Mar 2019 11:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553883528; cv=none; d=google.com; s=arc-20160816; b=b9XKoK4XaXmiWtIy1jWmyVxUwJJ5QW9ZAp17/UZTF98+K20jbqx5oZzBvI2GgHd3+9 5EdHvPBCJMa6mSMhTmSC1aSs0hVBNRZ5msaLrGVw2zFbQNYXZrzNCkxVb/yakcOnAAP+ CpxCT/IIj2hnRPdNYux1aVX+QnpBUznMK+QZlg1LnRNR5Nku/VqD3R70gaGOrPXhRBLY ZEYTlVJ0omf/AsA7pF4pvnQqtxVbafar6u7Hbw0sTDLkjm+tTyxCSD0OHFVjp+5HIwA8 aYGqDReJHnHt2ZignovFt6cnW4p6Cp7wUJrWqDay5hRhe8zFQm/WxNpsIAkuKDYEC0yT XY3A== 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 h37si2444388plb.93.2019.03.29.11.18.47; Fri, 29 Mar 2019 11:18:48 -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 S1730008AbfC2SSq (ORCPT + 31 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 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(+) -- 2.21.0.392.gf8f6787159e-goog Acked-by: Randy Dunlap # build-tested 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. */