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: <20190918075939.GZ3958@phenom.ffwll.local>
Date:   Wed, 18 Sep 2019 09:59:39 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Mihail Atanassov <Mihail.Atanassov@....com>
Cc:     Daniel Vetter <daniel@...ll.ch>, Liviu Dudau <Liviu.Dudau@....com>,
        "maarten.lankhorst@...ux.intel.com" 
        <maarten.lankhorst@...ux.intel.com>,
        "seanpaul@...omium.org" <seanpaul@...omium.org>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        Brian Starkey <Brian.Starkey@....com>,
        Ayan Halder <Ayan.Halder@....com>,
        "Jonathan Chai (Arm Technology China)" <Jonathan.Chai@....com>,
        "Julien Yin (Arm Technology China)" <Julien.Yin@....com>,
        nd <nd@....com>,
        "Lowry Li (Arm Technology China)" <Lowry.Li@....com>,
        "james qian wang (Arm Technology China)" <james.qian.wang@....com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/komeda: Remove in-code use of ifdef

On Tue, Sep 17, 2019 at 03:05:08PM +0000, Mihail Atanassov wrote:
> Provide a dummy static inline function in the header instead.
> 
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: Lowry Li (Arm Technology China) <Lowry.Li@....com>
> Cc: james qian wang (Arm Technology China) <james.qian.wang@....com>
> Fixes: 4d74b25ee395 ("drm/komeda: Adds error event print functionality")
> Signed-off-by: Mihail Atanassov <mihail.atanassov@....com>

Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>

> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 ++
>  drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> index e28e7e6563ab..8acf8c0601cc 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> @@ -220,6 +220,8 @@ struct komeda_dev *dev_to_mdev(struct device *dev);
>  
>  #ifdef CONFIG_DRM_KOMEDA_ERROR_PRINT
>  void komeda_print_events(struct komeda_events *evts);
> +#else
> +static inline void komeda_print_events(struct komeda_events *evts) {}
>  #endif
>  
>  #endif /*_KOMEDA_DEV_H_*/
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> index 18d7e2520225..dc85c08e614d 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> @@ -47,9 +47,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
>  	memset(&evts, 0, sizeof(evts));
>  	status = mdev->funcs->irq_handler(mdev, &evts);
>  
> -#ifdef CONFIG_DRM_KOMEDA_ERROR_PRINT
>  	komeda_print_events(&evts);
> -#endif
>  
>  	/* Notify the crtc to handle the events */
>  	for (i = 0; i < kms->n_crtcs; i++)
> -- 
> 2.23.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ