Re: [PATCH] arch: sh: Include <linux/io.h> in dac.h

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.comp.video.dri.devel
Message-ID <d3af51074e76f051b72d59c1bc45ebe4eff3cb4e.camel@physik.fu-berlin.de>
Hi Thomas,

On Mon, 2026-04-13 at 08:59 +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 12.04.26 um 09:35 schrieb John Paul Adrian Glaubitz:
> > Hi Thomas,
> > 
> > On Tue, 2025-10-28 at 18:07 +0100, Thomas Zimmermann wrote:
> > > Include <linux/io.h> to avoid depending on <linux/backlight.h> for
> > > including it. Declares __raw_readb() and __raw_writeb().
> > > 
> > > Signed-off-by: Thomas Zimmermann <[email protected]>
> > > Reported-by: kernel test robot <[email protected]>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> > > Fixes: 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
> > > Cc: Thomas Zimmermann <[email protected]>
> > > Cc: Daniel Thompson (RISCstar) <[email protected]>
> > > Cc: Simona Vetter <[email protected]>
> > > Cc: Lee Jones <[email protected]>
> > > Cc: Daniel Thompson <[email protected]>
> > > Cc: Jingoo Han <[email protected]>
> > > Cc: [email protected]
> > > ---
> > > This is fallout from a recent cleanup of the backlight header file. I don't
> > > have the option of building or testing this change, though.
> > > ---
> > >   arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
> > >   1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/arch/sh/include/cpu-sh3/cpu/dac.h b/arch/sh/include/cpu-sh3/cpu/dac.h
> > > index fd02331608a8..323ec8570bcd 100644
> > > --- a/arch/sh/include/cpu-sh3/cpu/dac.h
> > > +++ b/arch/sh/include/cpu-sh3/cpu/dac.h
> > > @@ -2,6 +2,8 @@
> > >   #ifndef __ASM_CPU_SH3_DAC_H
> > >   #define __ASM_CPU_SH3_DAC_H
> > >   
> > > +#include <linux/io.h>
> > > +
> > >   /*
> > >    * Copyright (C) 2003  Andriy Skulysh
> > >    */
> > I'm just looking at this patch again and was wondering where <linux/backlight.h> is
> > actually being pulled in on SH3. I assume this is somewhere on the driver side, no?
> 
> Oh well, it's been ages...
> 
> I've been cleaning up the plenty of places that include <linux/fb.h> and 
> <linux/backlight.h> unnecessarily. Besides the Fixes tag, presumably 
> commit df1445598758 ("backlight: hp680_bl: Do not include <linux/fb.h>") 
> is involved as well. The hp680_bl backlight driver got <linux/io.h> via 
> <linux/fb.h> via <linux/backlight.h> before including <cpu/dac.h>. With 
> fb.h gone from backlight.h gone,  dac.h should best include its 
> dependencies. Hence the patch here.

Perfect, thanks for the quick explanation! I will pick up the patch then.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.