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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a0N54scMtjCjOjqVQRSikhxn3bKBmKSk9VHz1AVGkiLqA@mail.gmail.com>
Date:   Fri, 12 May 2017 21:39:21 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Hans Verkuil <hverkuil@...all.nl>
Cc:     Hans Verkuil <hans.verkuil@...co.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        linux-media@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies

On Fri, May 12, 2017 at 12:00 PM, Hans Verkuil <hverkuil@...all.nl> wrote:
> On 05/12/17 11:49, Arnd Bergmann wrote:

>> I can probably come up with a workaround, but haven't completely thought
>> through all the combinations yet. Also, I assume the same fix will be needed
>> for exynos, though that has not come up in randconfig testing so far.
>
> Try this patch:
>
> Signed-off-by: Hans Verkuil <hans.verkuil@...co.com>
> ---
> diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h
> index eb50ce54b759..da3528c8edb9 100644
> --- a/include/media/cec-notifier.h
> +++ b/include/media/cec-notifier.h
> @@ -29,7 +29,7 @@ struct edid;
>  struct cec_adapter;
>  struct cec_notifier;
>
> -#ifdef CONFIG_MEDIA_CEC_NOTIFIER
> +#if IS_REACHABLE(CONFIG_MEDIA_CEC_NOTIFIER)
>

This misses how CONFIG_MEDIA_CEC_NOTIFIER is just a
 'bool' option to the 'MEDIA_CEC_CORE' symbol that controls
whether the code is built-in or in a module, and it lacks helpers
for cec_notifier_{un,}register.

The version below seems to work, though I don't particularly
like the IS_REACHABLE() addition since that can be confusing
to users.

Signed-off-by: Arnd Bergmann <arnd@...db.de>

diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h
index eb50ce54b759..69f7d8eed1b0 100644
--- a/include/media/cec-notifier.h
+++ b/include/media/cec-notifier.h
@@ -29,7 +29,7 @@ struct edid;
 struct cec_adapter;
 struct cec_notifier;

-#ifdef CONFIG_MEDIA_CEC_NOTIFIER
+#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_MEDIA_CEC_NOTIFIER)

 /**
  * cec_notifier_get - find or create a new cec_notifier for the given device.
@@ -106,6 +106,17 @@ static inline void
cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
 {
 }

+static inline void cec_notifier_register(struct cec_notifier *n,
+   struct cec_adapter *adap,
+   void (*callback)(struct cec_adapter *adap, u16 pa))
+{
+}
+
+static inline void cec_notifier_unregister(struct cec_notifier *n)
+{
+}
+
+
 #endif

 #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ