Re: [PATCH v6 1/6] fbdev/matrox: Remove trailing whitespaces

2023-05-12 Thread Thomas Zimmermann
Hi Am 11.05.23 um 19:02 schrieb Helge Deller: On 5/11/23 16:27, Thomas Zimmermann wrote: But the work I do within fbdev is mostly for improving DRM. Sure. For the other issues in this file, I don't think that matroxfb should even be around any longer. Fbdev has been deprecated for a long ti

Re: [PATCH 04/12] riscv: mm: init: Pass a pointer to virt_to_page()

2023-05-12 Thread Alexandre Ghiti
+cc linux-riscv On 5/11/23 13:59, Linus Walleij wrote: Functions that work on a pointer to virtual memory such as virt_to_pfn() and users of that function such as virt_to_page() are supposed to pass a pointer to virtual memory, ideally a (void *) or other pointer. However since many architecture

Re: [PATCH 02/12] m68k: Pass a pointer to virt_to_pfn() virt_to_page()

2023-05-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, May 11, 2023 at 1:59 PM Linus Walleij wrote: > Functions that work on a pointer to virtual memory such as > virt_to_pfn() and users of that function such as > virt_to_page() are supposed to pass a pointer to virtual > memory, ideally a (void *) or other pointer. However since >

Re: [PATCH 00/12] arch: Make virt_to_pfn into a static inline

2023-05-12 Thread Geert Uytterhoeven
Hi Linus, On Thu, May 11, 2023 at 1:59 PM Linus Walleij wrote: > This is an attempt to harden the typing on virt_to_pfn() > and pfn_to_virt(). > > Making virt_to_pfn() a static inline taking a strongly typed > (const void *) makes the contract of a passing a pointer of that > type to the function

Re: [PATCH v6 1/6] fbdev/matrox: Remove trailing whitespaces

2023-05-12 Thread Finn Thain
On Thu, 11 May 2023, Thomas Zimmermann wrote: > But I'd really like to see most of these drivers being moved into > staging and deleted soon afterwards. Users will complain about those > drivers that are really still required. Those might be worth to spend > effort on. > That strategy is not

[PATCH v7 2/7] fbdev/matrox: Remove trailing whitespaces

2023-05-12 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Arnd Bergmann Reviewed-by: Sam Ravnborg Reviewed-by: Sui Jingfeng Tested-by: Sui Jingfeng --- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2

[PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address

2023-05-12 Thread Thomas Zimmermann
Cast I/O offsets to pointers to use them with I/O functions. The I/O functions expect pointers of type 'volatile void __iomem *', but the offsets are plain integers. Build warnings are ../drivers/video/fbdev/hitfb.c: In function 'hitfb_accel_wait': ../arch/x86/include/asm/hd64461.h:18:33: warn

[PATCH v7 3/7] ipu-v3: Include

2023-05-12 Thread Thomas Zimmermann
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Arnd Bergmann Reviewed-by: Sam Ravnborg Reviewed-by: Sui Jingfeng --- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu

[PATCH v7 0/7] fbdev: Move framebuffer I/O helpers to

2023-05-12 Thread Thomas Zimmermann
Fbdev provides helpers for framebuffer I/O, such as fb_readl(), fb_writel() or fb_memcpy_to_fb(). The implementation of each helper depends on the architecture, but they are all equivalent to regular I/O functions of similar names. So use regular functions instead and move all helpers into The fi

[PATCH v7 4/7] fbdev: Include in various drivers

2023-05-12 Thread Thomas Zimmermann
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Arnd Bergmann Reviewed-by: Sam Ravnborg Reviewed-by: Sui Jingfeng --- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h

[PATCH v7 7/7] fbdev: Rename fb_mem*() helpers

2023-05-12 Thread Thomas Zimmermann
Update the names of the fb_mem*() helpers to be consistent with their regular counterparts. Hence, fb_memset() now becomes fb_memset_io(), fb_memcpy_fromfb() now becomes fb_memcpy_fromio() and fb_memcpy_tofb() becomes fb_memcpy_toio(). No functional changes. v6: * update new file fb_io_fop

[PATCH v7 5/7] fbdev: Include instead of

2023-05-12 Thread Thomas Zimmermann
Replace include statements for with . Fixes the coding style: if a header is available in asm/ and linux/, it is preferable to include the header from linux/. This only affects a few source files, most of which already include . Suggested-by: Sam Ravnborg Signed-off-by: Thomas Zimmermann Review

[PATCH v7 6/7] fbdev: Move framebuffer I/O helpers into

2023-05-12 Thread Thomas Zimmermann
Implement framebuffer I/O helpers, such as fb_read*() and fb_write*(), in the architecture's header file or the generic one. The common case has been the use of regular I/O functions, such as __raw_readb() or memset_io(). A few architectures used plain system- memory reads and writes. Sparc used

Re: [PATCH 02/12] m68k: Pass a pointer to virt_to_pfn() virt_to_page()

2023-05-12 Thread Geert Uytterhoeven
On Fri, May 12, 2023 at 11:55 AM Geert Uytterhoeven wrote: > On Thu, May 11, 2023 at 1:59 PM Linus Walleij > wrote: > > Functions that work on a pointer to virtual memory such as > > virt_to_pfn() and users of that function such as > > virt_to_page() are supposed to pass a pointer to virtual > >

Re: [PATCH 08/12] arm64: vdso: Pass (void *) to virt_to_page()

2023-05-12 Thread Catalin Marinas
On Thu, May 11, 2023 at 01:59:25PM +0200, Linus Walleij wrote: > Like the other calls in this function virt_to_page() expects > a pointer, not an integer. > > However since many architectures implement virt_to_pfn() as > a macro, this function becomes polymorphic and accepts both a > (unsigned lon

Re: [PATCH 11/12] arm64: memory: Make virt_to_pfn() a static inline

2023-05-12 Thread Catalin Marinas
On Thu, May 11, 2023 at 01:59:28PM +0200, Linus Walleij wrote: > Making virt_to_pfn() a static inline taking a strongly typed > (const void *) makes the contract of a passing a pointer of that > type to the function explicit and exposes any misuse of the > macro virt_to_pfn() acting polymorphic and

RE: [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address

2023-05-12 Thread David Laight
From: Thomas Zimmermann > Sent: 12 May 2023 11:25 > > Cast I/O offsets to pointers to use them with I/O functions. The I/O > functions expect pointers of type 'volatile void __iomem *', but the > offsets are plain integers. Build warnings are > > ../drivers/video/fbdev/hitfb.c: In function 'hit

Re: [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address

2023-05-12 Thread Thomas Zimmermann
Hi Am 12.05.23 um 13:16 schrieb David Laight: From: Thomas Zimmermann Sent: 12 May 2023 11:25 Cast I/O offsets to pointers to use them with I/O functions. The I/O functions expect pointers of type 'volatile void __iomem *', but the offsets are plain integers. Build warnings are ../drivers/