radeon: Enable Werror for radeon graphics driver.
* Fix warnings by adding casts, adjusting types, removing obsolete code. * Correcting two typos * Activate Werror for radeon * Part of ticket #9460 Change-Id: I0dda1eea3a60810ba83b9e2cc109872b9cbf2cfd Reviewed-on: https://review.haiku-os.org/c/haiku/+/10347 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
6a81f43a4b
commit
ec4e585599
@@ -674,7 +674,7 @@ rule ArchitectureSetupWarnings architecture
|
||||
EnableWerror src add-ons kernel drivers graphics matrox ;
|
||||
EnableWerror src add-ons kernel drivers graphics neomagic ;
|
||||
# EnableWerror src add-ons kernel drivers graphics nvidia ;
|
||||
# EnableWerror src add-ons kernel drivers graphics radeon ;
|
||||
EnableWerror src add-ons kernel drivers graphics radeon ;
|
||||
EnableWerror src add-ons kernel drivers graphics radeon_hd ;
|
||||
# EnableWerror src add-ons kernel drivers graphics s3 ;
|
||||
EnableWerror src add-ons kernel drivers graphics skeleton ;
|
||||
|
||||
@@ -538,7 +538,7 @@ typedef struct {
|
||||
|
||||
area_id regs_area; // area of memory mapped registers
|
||||
area_id ROM_area; // area of ROM
|
||||
void *framebuffer_pci; // physical address of frame buffer (aka local memory)
|
||||
phys_addr_t framebuffer_pci; // physical address of frame buffer (aka local memory)
|
||||
// this is a hack needed by BeOS
|
||||
|
||||
crtc_info crtc[2]; // info about each crtc
|
||||
|
||||
@@ -465,7 +465,7 @@ status_t SET_DISPLAY_MODE(
|
||||
}
|
||||
|
||||
vc->fbc.frame_buffer = si->local_mem + vc->fb_offset;
|
||||
vc->fbc.frame_buffer_dma = (void *)((uint8 *)si->framebuffer_pci + vc->fb_offset);
|
||||
vc->fbc.frame_buffer_dma = (void *)((uintptr_t)si->framebuffer_pci + vc->fb_offset);
|
||||
vc->fbc.bytes_per_row = vc->pitch;
|
||||
|
||||
SHOW_FLOW( 0, "frame buffer CPU-address=%x, phys-address=%x",
|
||||
|
||||
@@ -324,7 +324,7 @@ static status_t initRingBuffer( device_info *di, int aring_size )
|
||||
shared_info *si = di->si;
|
||||
CP_info *cp = &si->cp;
|
||||
vuint8 *regs = di->regs;
|
||||
int32 offset;
|
||||
uint32 offset;
|
||||
memory_type_e memory_type;
|
||||
|
||||
memset( &cp->ring, 0, sizeof( cp->ring ));
|
||||
@@ -391,7 +391,7 @@ static status_t initCPFeedback( device_info *di )
|
||||
{
|
||||
CP_info *cp = &di->si->cp;
|
||||
vuint8 *regs = di->regs;
|
||||
int32 offset;
|
||||
uint32 offset;
|
||||
memory_type_e memory_type;
|
||||
status_t res;
|
||||
|
||||
@@ -442,7 +442,7 @@ static void uninitCPFeedback( device_info *di )
|
||||
static status_t initIndirectBuffers( device_info *di )
|
||||
{
|
||||
CP_info *cp = &di->si->cp;
|
||||
int32 offset;
|
||||
uint32 offset;
|
||||
memory_type_e memory_type;
|
||||
int i;
|
||||
status_t res;
|
||||
|
||||
@@ -69,12 +69,12 @@ static const tmds_pll_info default_tmds_pll[14][4] =
|
||||
// I have no clue how these values are _written_ into the BIOS, and
|
||||
// unfortunately, every BIOS does the detection in a different way,
|
||||
// so I'm not sure which is the _right_ way of doing it
|
||||
static char *Radeon_FindRom( rom_info *ri )
|
||||
static uint8*
|
||||
Radeon_FindRom(rom_info* ri)
|
||||
{
|
||||
uint32 segstart;
|
||||
uint8 *rom_base;
|
||||
char *rom;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for( segstart = 0x000c0000; segstart < 0x000f0000; segstart += 0x00001000 ) {
|
||||
bool found = false;
|
||||
@@ -86,13 +86,11 @@ static char *Radeon_FindRom( rom_info *ri )
|
||||
continue;
|
||||
|
||||
// find signature of ATI
|
||||
rom = rom_base;
|
||||
|
||||
found = false;
|
||||
|
||||
for( i = 0; i < 128 - strlen( ati_rom_sig ); i++ ) {
|
||||
if( ati_rom_sig[0] == rom_base[i] ) {
|
||||
if( strncmp(ati_rom_sig, rom_base + i, strlen( ati_rom_sig )) == 0 ) {
|
||||
if (strncmp(ati_rom_sig, (char*)(rom_base + i), strlen(ati_rom_sig)) == 0) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -102,7 +100,7 @@ static char *Radeon_FindRom( rom_info *ri )
|
||||
if( !found )
|
||||
continue;
|
||||
|
||||
// EK don't bother looking for signiture now, due to lack of consistancy.
|
||||
// EK don't bother looking for signature now, due to lack of consistency.
|
||||
|
||||
SHOW_INFO( 2, "found ROM @0x%" B_PRIx32, segstart );
|
||||
return rom_base;
|
||||
|
||||
@@ -523,7 +523,7 @@ bool Radeon_CardDetect(void)
|
||||
done:
|
||||
put_module(B_PCI_MODULE_NAME);
|
||||
|
||||
return (found_one ? B_OK : B_ERROR);
|
||||
return found_one;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ status_t
|
||||
init_hardware(void)
|
||||
{
|
||||
SHOW_INFO0(0, RADEON_DRIVER_VERSION);
|
||||
if (Radeon_CardDetect() == B_OK)
|
||||
if (Radeon_CardDetect())
|
||||
return B_OK;
|
||||
|
||||
return B_ERROR;
|
||||
|
||||
@@ -157,7 +157,7 @@ status_t Radeon_MapDevice( device_info *di, bool mmio_only )
|
||||
|
||||
// save physical address though noone can probably make
|
||||
// any use of it
|
||||
si->framebuffer_pci = (void *) di->pcii.u.h0.base_registers_pci[fb];
|
||||
si->framebuffer_pci = (phys_addr_t)di->pcii.u.h0.base_registers_pci[fb];
|
||||
|
||||
return B_OK;
|
||||
|
||||
|
||||
@@ -97,7 +97,8 @@ bool Radeon_VIPRead(
|
||||
static bool do_VIPFifoRead(device_info *di, uint8 channel, uint32 address, uint32 count, uint8 *buffer)
|
||||
{
|
||||
vuint8 *regs = di->regs;
|
||||
uint32 status, tmp;
|
||||
status_t status;
|
||||
uint32 tmp;
|
||||
|
||||
if(count!=1)
|
||||
{
|
||||
@@ -229,7 +230,7 @@ static bool do_VIPFifoWrite(device_info *di, uint8 channel, uint32 address,
|
||||
{
|
||||
vuint8 *regs = di->regs;
|
||||
|
||||
uint32 status;
|
||||
status_t status;
|
||||
uint32 i;
|
||||
|
||||
SHOW_FLOW( 2, "address=%" B_PRIx32 ", count=%" B_PRIu32 ", ",
|
||||
|
||||
Reference in New Issue
Block a user