[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97bbdb2f-6245-caf2-c0f6-d628873bd6db@suse.de>
Date: Wed, 3 May 2023 10:12:34 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Javier Martinez Canillas <javierm@...hat.com>,
Sam Ravnborg <sam@...nborg.org>
Cc: linux-arch@...r.kernel.org, linux-fbdev@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-parisc@...r.kernel.org,
arnd@...db.de, deller@....de, chenhuacai@...nel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
James.Bottomley@...senpartnership.com,
linux-m68k@...ts.linux-m68k.org, geert@...ux-m68k.org,
loongarch@...ts.linux.dev, vgupta@...nel.org,
sparclinux@...r.kernel.org, kernel@...0n.name,
linux-snps-arc@...ts.infradead.org, davem@...emloft.net,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 4/6] fbdev: Include <linux/io.h> via <asm/fb.h>
Hi
Am 03.05.23 um 09:19 schrieb Javier Martinez Canillas:
> Thomas Zimmermann <tzimmermann@...e.de> writes:
>
> Hello Thomas,
>
>> Am 02.05.23 um 21:54 schrieb Sam Ravnborg:
>>> On Tue, May 02, 2023 at 03:02:21PM +0200, Thomas Zimmermann wrote:
>
> [...]
>
>>>> #include <linux/console.h> /* Why should fb driver call console functions? because console_lock() */
>>>> #include <video/vga.h>
>>>>
>>>> +#include <asm/fb.h>
>>>
>>> When we have a header like linux/fb.h - it is my understanding that it is
>>> preferred to include that file, and not the asm/fb.h variant.
>>>
>>> This is assuming the linux/fb.h contains the generic stuff, and includes
>>> asm/fb.h for the architecture specific parts.
>>>
>>> So drivers will include linux/fb.h and then they automatically get the
>>> architecture specific parts from asm/fb.h.
>>>
>>> In other words, drivers are not supposed to include asm/fb.h, if
>>> linux.fb.h exists - and linux/fb.h shall include the asm/fb.h.
>>>
>>> If the above holds true, then it is wrong and not needed to add asm/fb.h
>>> as seen above.
>>>
>>>
>>> There are countless examples where the above are not followed,
>>> but to my best understanding the above it the preferred way to do it.
>>
>> Where did youher this? I only know about this in the case of asm/io.h
>> vs. linux/io.h.
>>
>
> I understand that's the case too. I believe even checkpatch.pl complains
> about it? (not that the script always get right, but just as an example).
Do you know if that's the general rule? If so, we might want to
repurpose <asm/fbio.h> for the framebuffer I/O functions.
Best regards
Thomas
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists