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]
Date:   Wed, 24 Feb 2021 11:59:45 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org, linux-fbdev@...r.kernel.org,
        kernel test robot <lkp@...el.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()

On 2/22/21 9:44 AM, Ville Syrjälä wrote:
> On Sun, Feb 21, 2021 at 07:28:53PM -0800, Randy Dunlap wrote:
>> Fix build errors when these functions are not defined.
>>
>> ../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
>> ../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
>>  2002 |  pm = aty_ld_lcd(POWER_MANAGEMENT, par);
>> ../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
>>  2004 |  aty_st_lcd(POWER_MANAGEMENT, pm, par);
>> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
>> Reported-by: kernel test robot <lkp@...el.com>
>> Cc: linux-fbdev@...r.kernel.org
>> Cc: dri-devel@...ts.freedesktop.org
>> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
>> Cc: Sam Ravnborg <sam@...nborg.org>
>> Cc: Daniel Vetter <daniel@...ll.ch>
>> Cc: David Airlie <airlied@...ux.ie>
>> Cc: Jani Nikula <jani.nikula@...ux.intel.com>
>> ---
>>  drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
>> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
>> @@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
>>  		return aty_ld_le32(LCD_DATA, par);
>>  	}
>>  }
>> +#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
>> +	 defined(CONFIG_FB_ATY_GENERIC_LCD) */
> 
> A better fix would seem to be to include these functions if
> CONFIG_PPC_PMAC is enabled. Otherwise the PM code will surely
> not work correctly. Though I'm not sure if that PPC PM
> code makes any sense w/o LCD/backlight support anyway.

Hi Ville,

I tried this:

-#if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_GENERIC_LCD) || \
-defined(CONFIG_FB_ATY_BACKLIGHT)
+#if defined(CONFIG_PPC_PMAC)

in both atyfb_base.c and atyfb.h, but then there is a build error in
mach64_ct.c when PPC_PMAC is not enabled but FB_ATY_GENERIC_LCD is enabled.
[mach64_ct.c is the only other user of aty_{ld,st}_lcd()]

or did you mean adding CONFIG_PPC_PMAC to that longish #if list?
(that's not how I understood your comment.)


I'll gladly step away and let you submit patches for this. :)

>> +void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>> +{ }
>> +
>> +u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>> +{
>> +	return 0;
>> +}
>>  #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
>>  
>>  #ifdef CONFIG_FB_ATY_GENERIC_LCD
>> _______________________________________________


thanks.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ