Message ID | 20230329021529.16188-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp113898vqo; Tue, 28 Mar 2023 19:31:18 -0700 (PDT) X-Google-Smtp-Source: AKy350bRHo3TzxUGeB4qBxh6sDUqG2tC2zcX1HzltpNZRw6HaCyAz6dO0E/4bHM5DXm4yS+BtQKz X-Received: by 2002:a05:6402:1842:b0:4fd:21a6:a649 with SMTP id v2-20020a056402184200b004fd21a6a649mr15600050edy.40.1680057078165; Tue, 28 Mar 2023 19:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680057078; cv=none; d=google.com; s=arc-20160816; b=yxzB8YWgiW0Z/vwiQuYGMWCY1c9NzdmY2U0JV+OS7S3sTX/uGpOztZ2O+Ok+x+72l2 DF7olfMY+IpJF4eNt8YQJzi8g+BAr1GqN+PiSN1LR3JuhQvnZbzn2r4RzJW+l+X2Fht7 E4lUVK57lkZP8v3jRJ7T5TRetHI4t3VqX2QmjmZBdN60NTJ2E6b6BacaMJgceFLv4urW aMTH6H3X3q00VPqjAuEt4H3Gm1TwpnTWX6CT4Y1AN7h3bJHWtMxJEOG+ZkE1KK3A9g0g x8ICao9BoYIWJEgtyxVMlQ72hb7BC6NswAKgwV25ijmHTRNswWK4ji9R6JPZNm+orbIw SVeA== 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=J18Kt0VMrufsQrIsqC+xONid+dtZxRsR3hDUTRlZspM=; b=o3t057xsSDaIJTKu3pE0F6GcG69UCZ7O+u2XsyjRsMinxboVlYaTPnb5CraBojDCRs 6KXj8tUI5xmnrTrxQl4Bs7Ik/aVODNKYRSwZT/3RC9fs5NMbgAs0GGW7lZKkEjNUwp0O ehXLvyvnEzu2B95UK+RE5QWSFI1DLbJ+b1t0RKz/iLEtYQ05fOTTc3KIz/1Zyrw7IWoI FSjm2oPVGcw2fdPpqUlW0fBqOKGTWfN+T1qc6uiKVaE8rGWkzbjt6AKCMeib4boE5ioU JhpXHZzC3B/HvmDfeHizs2PsnhpPYDHlvvy2DL0uvR31Xzf6Y0jvW13Fh1GLqr3zLTCQ lTMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BQNuij8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f26-20020a05640214da00b005021d78df8dsi12981792edx.540.2023.03.28.19.30.40; Tue, 28 Mar 2023 19:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BQNuij8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbjC2CPi (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Tue, 28 Mar 2023 22:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjC2CPh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 28 Mar 2023 22:15:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 092C9273C; Tue, 28 Mar 2023 19:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=J18Kt0VMrufsQrIsqC+xONid+dtZxRsR3hDUTRlZspM=; b=BQNuij8roX6B/ilCTm8Dku+KA4 i7NEy7tuNw65WKclXoWErOWL09+B6+GePNZFdN3sJC5qKbepPTdsqtvxK4/aP0AMOnzNfnBGkJE2F UeubaYBKce5xGaCsFurAPFZoUJst+i9EOqEV/EjZbyqSz8dikZxJ27Lp5gOZ+lN88Jyh9T7vlSaBE vsqA8f8wMhZbMvfsg8i97kicRQn541WsD6QUzQu86OcZWL81Ye1Q0nO0c8uXiXci/qHjv1NmbwQt4 A1wx4JcVq4rH3YOfWqLGfc0qaYInbLQWZsyBAeakPxhF8NmWg6Ig7MmJ4y3VZUYC8Xkay9fcB2caJ TdF79Kqw==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1phLLW-00GKXk-26; Wed, 29 Mar 2023 02:15:30 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH] linux/vt_buffer.h: allow either builtin or modular for macros Date: Tue, 28 Mar 2023 19:15:29 -0700 Message-Id: <20230329021529.16188-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761667530757761384?= X-GMAIL-MSGID: =?utf-8?q?1761667530757761384?= |
Series |
linux/vt_buffer.h: allow either builtin or modular for macros
|
|
Commit Message
Randy Dunlap
March 29, 2023, 2:15 a.m. UTC
Fix build errors on ARCH=alpha when CONFIG_MDA_CONSOLE=m.
This allows the ARCH macros to be the only ones defined.
In file included from ../drivers/video/console/mdacon.c:37:
../arch/alpha/include/asm/vga.h:17:40: error: expected identifier or '(' before 'volatile'
17 | static inline void scr_writew(u16 val, volatile u16 *addr)
| ^~~~~~~~
../include/linux/vt_buffer.h:24:34: note: in definition of macro 'scr_writew'
24 | #define scr_writew(val, addr) (*(addr) = (val))
| ^~~~
../include/linux/vt_buffer.h:24:40: error: expected ')' before '=' token
24 | #define scr_writew(val, addr) (*(addr) = (val))
| ^
../arch/alpha/include/asm/vga.h:17:20: note: in expansion of macro 'scr_writew'
17 | static inline void scr_writew(u16 val, volatile u16 *addr)
| ^~~~~~~~~~
../arch/alpha/include/asm/vga.h:25:29: error: expected identifier or '(' before 'volatile'
25 | static inline u16 scr_readw(volatile const u16 *addr)
| ^~~~~~~~
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
---
include/linux/vt_buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 3/29/23 04:15, Randy Dunlap wrote: > Fix build errors on ARCH=alpha when CONFIG_MDA_CONSOLE=m. > This allows the ARCH macros to be the only ones defined. > > In file included from ../drivers/video/console/mdacon.c:37: > ../arch/alpha/include/asm/vga.h:17:40: error: expected identifier or '(' before 'volatile' > 17 | static inline void scr_writew(u16 val, volatile u16 *addr) > | ^~~~~~~~ > ../include/linux/vt_buffer.h:24:34: note: in definition of macro 'scr_writew' > 24 | #define scr_writew(val, addr) (*(addr) = (val)) > | ^~~~ > ../include/linux/vt_buffer.h:24:40: error: expected ')' before '=' token > 24 | #define scr_writew(val, addr) (*(addr) = (val)) > | ^ > ../arch/alpha/include/asm/vga.h:17:20: note: in expansion of macro 'scr_writew' > 17 | static inline void scr_writew(u16 val, volatile u16 *addr) > | ^~~~~~~~~~ > ../arch/alpha/include/asm/vga.h:25:29: error: expected identifier or '(' before 'volatile' > 25 | static inline u16 scr_readw(volatile const u16 *addr) > | ^~~~~~~~ > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: Jiri Slaby <jirislaby@kernel.org> > Cc: dri-devel@lists.freedesktop.org > Cc: linux-fbdev@vger.kernel.org applied to fbdev git tree. Thanks! Helge > --- > include/linux/vt_buffer.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -- a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h > --- a/include/linux/vt_buffer.h > +++ b/include/linux/vt_buffer.h > @@ -16,7 +16,7 @@ > > #include <linux/string.h> > > -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) > +#if IS_ENABLED(CONFIG_VGA_CONSOLE) || IS_ENABLED(CONFIG_MDA_CONSOLE) > #include <asm/vga.h> > #endif >
diff -- a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h @@ -16,7 +16,7 @@ #include <linux/string.h> -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) +#if IS_ENABLED(CONFIG_VGA_CONSOLE) || IS_ENABLED(CONFIG_MDA_CONSOLE) #include <asm/vga.h> #endif