Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3710451imu; Mon, 28 Jan 2019 09:25:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6bBD+RnII1ndpncezXBnJj3L2kKhvyUqHfzSUn9p851gRbOu+w7umzOs3c0tcfsO7VEy2i X-Received: by 2002:a62:3603:: with SMTP id d3mr23493979pfa.146.1548696354696; Mon, 28 Jan 2019 09:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696354; cv=none; d=google.com; s=arc-20160816; b=d0V8uTM6tVfFL5aqwTlVQWfEm/3pFXCclObhBMQK15i8Bpp1TV6f5E8PelguMT7YNS rd2QE6dfAmIOcpG2W23oN2fX5rIV+CRUdSLjGsbBCMfq8+242aJYx/lWcCUWuLCfZ8tR zqAVg3vUt+MU8rj+3/AO8dm4BZcbiL+M07cg0lakexkSiN3w4kJySuMS+QEv4RFXA7jE Wkoxs9IfJvNMXkaLfwSfgItqf5Hgpm+iNpAzg1to/H7pg7TGww3GBUHFv0gkQg2vLXyz kW0sRggVv9xCNDU180O1Ku/hAmF8URyQdqkwpfSvJqwUJjDpbyVlkay7guUBth1/3Il8 kijg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0UtQ7BIHBinPm/+2oGbR8GJAbV3JlAcV/FNDDJgCZKQ=; b=MT3mn1Hg3K6Nbc7IlbRDbSH/c4JHSsLVbRsBmMDeNLJHk5vWxTBFLkeCdhH6IUgWe+ 2z/uT949PCuUzQ0dAFJi/tZANjDWHZWzy5kO2B3te5BNy9vpAuGIBjDQpymD3SOqqWJZ hxNmjZhbvJuaoOPHEOiEgeCdQuRjaJmc3gHxNcw8juLaGjk8IWIeIZR4LaVh1ISZ6yoL MN/pC2t10LXEfKFaLmjHGJrlu8nK2P0TBl24WtHK5gNB5wWBp+DBtXOhMXK7u9sD5QUH TnGYPmN+ywGF1mx3RwqiHfQAzsumGmq8fJD9081Ao1WonyQMBr9oSxH5YYKTsvIdL0k+ 9JXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TyovDcHU; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k25si33972418pfe.10.2019.01.28.09.25.39; Mon, 28 Jan 2019 09:25:54 -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=pass header.i=@kernel.org header.s=default header.b=TyovDcHU; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731171AbfA1RZ3 (ORCPT + 99 others); Mon, 28 Jan 2019 12:25:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:46496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730961AbfA1QBM (ORCPT ); Mon, 28 Jan 2019 11:01:12 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 256D02082E; Mon, 28 Jan 2019 16:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691271; bh=i3zSXy11zY0+DidiBDEhOf8dL85Mhur4FhdIrrnlCrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TyovDcHU+ZegafW3oCK5eNOCDwMko4ncRu7YtxOvwJfSMInItKPsDo/b7cBhQaFgy DeUgRwdrv4mllyP6zGC7Nl3yj4P3Ayr3Kf70f+C4xgO1P6+RAbRRKbtR8Z5yibK7Y7 dQgMOJT9uBs6jj2EPFdJYrYNcDwoY0Ytn70Xngek= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.19 040/258] vbox: fix link error with 'gcc -Og' Date: Mon, 28 Jan 2019 10:55:46 -0500 Message-Id: <20190128155924.51521-40-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit b8ae30a7020d61e0504529adf45abb08fa5c59f5 ] With the new CONFIG_CC_OPTIMIZE_FOR_DEBUGGING option, we get a link error in the vboxguest driver, when that fails to optimize out the call to the compat handler: drivers/virt/vboxguest/vboxguest_core.o: In function `vbg_ioctl_hgcm_call': vboxguest_core.c:(.text+0x1f6e): undefined reference to `vbg_hgcm_call32' Another compile-time check documents better what we want and avoids the error. Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/virt/vboxguest/vboxguest_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c index 3093655c7b92..1475ed5ffcde 100644 --- a/drivers/virt/vboxguest/vboxguest_core.c +++ b/drivers/virt/vboxguest/vboxguest_core.c @@ -1312,7 +1312,7 @@ static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev, return -EINVAL; } - if (f32bit) + if (IS_ENABLED(CONFIG_COMPAT) && f32bit) ret = vbg_hgcm_call32(gdev, client_id, call->function, call->timeout_ms, VBG_IOCTL_HGCM_CALL_PARMS32(call), -- 2.19.1