Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp48303pxb; Tue, 14 Sep 2021 18:17:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/0YCA+Uirk7BhqZplPUDS5at/MPj27Fg/B1HMj8Hp7mzkLEasbQ0/rtDkFcNUcBBv4w4T X-Received: by 2002:ac2:558a:: with SMTP id v10mr12025505lfg.338.1631668632464; Tue, 14 Sep 2021 18:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631668632; cv=none; d=google.com; s=arc-20160816; b=DhPa68PCZj+KyE2re5RkAFHjhaT7LaGbItIuK5MdF+kuiOn/t6nlo+4+T6NLQNnLVx z3BWKTA/PLs3IcWKdEX+9sP5q+9m+jto2FoDLfAStD7szlZpr3rEGh2QfEV03gNwSssx s33PLEZvltE7Cc0Oxnaa7NtQfDCQtpxhIOf3YuC/5s4WBGaNkSorym2I5oTd9NArydF/ yHuYNjQIm5Xa6OboF8/evU7cwmXrlw7tJu3d1fsCWqvF1cW6IraNLKmRlKqywOGR37C+ ytEU7svueJF8Wa/6g5OGCPLHQl0obrjolABQwAHTmO30870W985ehdW+fK7crblw50tH AAhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZNpudidzVmP4jemFhTF+Od7e/hnMt6Xl6jWXwSgmpfs=; b=bPQyjX7QEzHDwsqgR8Sf5aJqn9FZJyZGluHvbSwmbF733IqbqUyGe6SlMskVRc0wFk ++/mh7sJaKCsT2a27GkQugQxPY4iaY4krvb0jW2ErStDnssxM8IH8G0ZwNVJWZJxFO0o 7226ZVRaSHg5Y3d30pLlqxZ3/XzUv08LPfA4ZYgbxlaCz7wmbu3yr6a/6tSEPRS8DmEe rIcmhCF3wrLG3InUZV16oEwyf1M0A+o1BAfjACUIzJTXDmvofYNkTFmYLL2MYVWkjNLT HCZRh7AyU/qrYttXMOTkZXbUsj2YyNKaKPhOCNIRN52vDq2uTN234sftfdy6+s3DYJK5 KDnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M9TTANL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id br5si11463266lfb.525.2021.09.14.18.16.45; Tue, 14 Sep 2021 18:17:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M9TTANL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231979AbhIOBPi (ORCPT + 99 others); Tue, 14 Sep 2021 21:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbhIOBPi (ORCPT ); Tue, 14 Sep 2021 21:15:38 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 307D5C061574 for ; Tue, 14 Sep 2021 18:14:20 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1631668456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZNpudidzVmP4jemFhTF+Od7e/hnMt6Xl6jWXwSgmpfs=; b=M9TTANL6lOT2gGPl2aW6mLuWfct17FK29lfcwNsgUym1xpmkQMzLy/s6hTJKSE6Eldfa8t O08E2qM0ZqBj7QYOIO73uw/Nf/TIsh4H8EwtslkhTedbslG1Jd9AH9oV8jxhcA4e8FKI4L RR1XOfuUt7ZH2pXQfeE6d86aAdVlEBE= From: Jackie Liu To: dri-devel@lists.freedesktop.org Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, liu.yun@linux.dev Subject: [PATCH v3] mdacon: fix redefinition of 'scr_memsetw' Date: Wed, 15 Sep 2021 09:13:54 +0800 Message-Id: <20210915011354.2669416-1-liu.yun@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: liu.yun@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jackie Liu CONFIG_VGA_CONSOLE=n and CONFIG_MDA_CONSOLE=n will cause vt_buffer.h not include . But if we set CONFIG_MDA_CONSOLE=m, mdacon.c include is in front of include . VT_BUF_HAVE_MEMSETW is not defined, so vt_buffer.h will define a scr_memsetw, after that, vga.h also define a scr_memsetw, so the repeated definition of scr_memsetw appears, builds error. We only need to make vt_buffer.h also contain vga.h when CONFIG_MDA_CONSOLE=m. This problem can be fixed. BTW, mdacon.c no need to include vga.h forcibly, let vt_buffer.h do it. Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Fixes: ac036f9570a2 ("vga: optimise console scrolling") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jackie Liu --- drivers/video/console/mdacon.c | 1 - include/linux/vt_buffer.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index ef29b321967f..5898d01bc492 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -42,7 +42,6 @@ #include #include -#include static DEFINE_SPINLOCK(mda_lock); diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h index 848db1b1569f..3a79cc27a33b 100644 --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h @@ -16,7 +16,7 @@ #include -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) +#if defined(CONFIG_VGA_CONSOLE) || IS_ENABLED(CONFIG_MDA_CONSOLE) #include #endif -- 2.25.1