lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <001101cff818$bfe149b0$3fa3dd10$%han@samsung.com>
Date:	Tue, 04 Nov 2014 19:18:59 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Lee Jones' <lee.jones@...aro.org>,
	'Heiko Stübner' <heiko@...ech.de>
Cc:	'Bryan Wu' <cooloney@...il.com>, linux-kernel@...r.kernel.org,
	'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH] backlight: use of_find_backlight_by_node stub when
 backlight class disabled

On Tuesday, November 04, 2014 6:08 PM, Heiko Stübner wrote:
> On Mon, 03 Nov 2014, Lee Jones wrote:
> 
> > On Wed, 29 Oct 2014, Heiko Stübner wrote:
> >
> > > Drivers may want to search for an optional backlight even when the backlight
> > > class is disabled. In this case the linker would miss the function referenced
> > > in the backlight header.
> > >
> > > Therefore use the stub function also when the backlight class is disabled.
> > >
> > > Signed-off-by: Heiko Stuebner <heiko@...ech.de>
> > > ---
> > >  include/linux/backlight.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Applied to Backlight -next with Jingoo's Ack.
> 
> I've removed this patch, as it causes unexpected:
> 
>   Redefinition of of_find_backlight_by_node()

I reproduced the same build error.

Then, how about folding the following two patches into
one single patch? These two patches were already sent by Heiko Stübner.

  [PATCH] backlight: use of_find_backlight_by_node stub when backlight class disabled
  [PATCH] backlight: extend of_find_backlight_by_node stub-check to modules

Then, the one single patch will do as follows.

-#ifdef CONFIG_OF
+#if defined(CONFIG_OF) && (defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
+			   defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE))

In this case, I cannot find any build errors.
Thank you.

Best regards,
Jingoo Han

> 
> ... error.
> 
> Bear in mind that defined(CONFIG_BACKLIGHT_CLASS_DEVICE) is false if
> it's built in as a module.  Change to nested #ifdefs instead.
> 
> > > diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> > > index adb14a8..d9cb644 100644
> > > --- a/include/linux/backlight.h
> > > +++ b/include/linux/backlight.h
> > > @@ -157,7 +157,7 @@ struct generic_bl_info {
> > >  	void (*kick_battery)(void);
> > >  };
> > >
> > > -#ifdef CONFIG_OF
> > > +#if defined(CONFIG_OF) && defined(CONFIG_BACKLIGHT_CLASS_DEVICE)
> > >  struct backlight_device *of_find_backlight_by_node(struct device_node *node);
> > >  #else
> > >  static inline struct backlight_device *
> >
> 
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ