From patchwork Thu Jun 20 06:40:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 11005953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D42813AF for ; Thu, 20 Jun 2019 06:40:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A51527F85 for ; Thu, 20 Jun 2019 06:40:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF69F28387; Thu, 20 Jun 2019 06:40:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 786F227F85 for ; Thu, 20 Jun 2019 06:40:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726124AbfFTGk1 (ORCPT ); Thu, 20 Jun 2019 02:40:27 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:39766 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbfFTGk0 (ORCPT ); Thu, 20 Jun 2019 02:40:26 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hdqkD-0000lS-Oz; Thu, 20 Jun 2019 14:40:25 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hdqkB-0000KR-7G; Thu, 20 Jun 2019 14:40:23 +0800 Date: Thu, 20 Jun 2019 14:40:23 +0800 From: Herbert Xu To: Steve French , linux-cifs@vger.kernel.org Cc: Masahiro Yamada Subject: cifs: Fix tracing build error with O= Message-ID: <20190620064023.cwvcj5g4rgnmkmmn@gondor.apana.org.au> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently if you build the kernel with O= then fs/cifs fails with: $ make O=build ... CC [M] fs/cifs/trace.o In file included from ../fs/cifs/trace.h:846:0, from ../fs/cifs/trace.c:8: ../include/trace/define_trace.h:95:43: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^ compilation terminated. The reason is that -I$(src) expands to -Ifs/cifs which does not work with O=. This patch fixes it by adding srctree to the front. Signed-off-by: Herbert Xu diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile index 51af69a1a328..616163deee18 100644 --- a/fs/cifs/Makefile +++ b/fs/cifs/Makefile @@ -2,7 +2,7 @@ # # Makefile for Linux CIFS/SMB2/SMB3 VFS client # -ccflags-y += -I$(src) # needed for trace events +ccflags-y += -I$(srctree)/$(src) # needed for trace events obj-$(CONFIG_CIFS) += cifs.o cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \