Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon Drop casts in favour o...
details: https://anonhg.NetBSD.org/src/rev/5b97061f0ed4
branches: trunk
changeset: 333936:5b97061f0ed4
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Nov 22 18:50:49 2014 +0000
description:
Drop casts in favour of expressions that actually give the right
pointer.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/cik.c | 6 +++---
sys/external/bsd/drm2/dist/drm/radeon/ni.c | 10 +++++-----
sys/external/bsd/drm2/dist/drm/radeon/si.c | 12 ++++++------
3 files changed, 14 insertions(+), 14 deletions(-)
diffs (108 lines):
diff -r 6b1a0b74450e -r 5b97061f0ed4 sys/external/bsd/drm2/dist/drm/radeon/cik.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/cik.c Sat Nov 22 18:31:03 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/cik.c Sat Nov 22 18:50:49 2014 +0000
@@ -1771,7 +1771,7 @@
{
const __be32 *fw_data;
u32 running, blackout = 0;
- u32 *io_mc_regs;
+ const u32 *io_mc_regs;
int i, regs_size, ucode_size;
if (!rdev->mc_fw)
@@ -1781,11 +1781,11 @@
switch (rdev->family) {
case CHIP_BONAIRE:
- io_mc_regs = (u32 *)&bonaire_io_mc_regs;
+ io_mc_regs = &bonaire_io_mc_regs[0][0];
regs_size = BONAIRE_IO_MC_REGS_SIZE;
break;
case CHIP_HAWAII:
- io_mc_regs = (u32 *)&hawaii_io_mc_regs;
+ io_mc_regs = &hawaii_io_mc_regs[0][0];
regs_size = HAWAII_IO_MC_REGS_SIZE;
break;
default:
diff -r 6b1a0b74450e -r 5b97061f0ed4 sys/external/bsd/drm2/dist/drm/radeon/ni.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/ni.c Sat Nov 22 18:31:03 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/ni.c Sat Nov 22 18:50:49 2014 +0000
@@ -609,7 +609,7 @@
{
const __be32 *fw_data;
u32 mem_type, running, blackout = 0;
- u32 *io_mc_regs;
+ const u32 *io_mc_regs;
int i, ucode_size, regs_size;
if (!rdev->mc_fw)
@@ -617,23 +617,23 @@
switch (rdev->family) {
case CHIP_BARTS:
- io_mc_regs = (u32 *)&barts_io_mc_regs;
+ io_mc_regs = &barts_io_mc_regs[0][0];
ucode_size = BTC_MC_UCODE_SIZE;
regs_size = BTC_IO_MC_REGS_SIZE;
break;
case CHIP_TURKS:
- io_mc_regs = (u32 *)&turks_io_mc_regs;
+ io_mc_regs = &turks_io_mc_regs[0][0];
ucode_size = BTC_MC_UCODE_SIZE;
regs_size = BTC_IO_MC_REGS_SIZE;
break;
case CHIP_CAICOS:
default:
- io_mc_regs = (u32 *)&caicos_io_mc_regs;
+ io_mc_regs = &caicos_io_mc_regs[0][0];
ucode_size = BTC_MC_UCODE_SIZE;
regs_size = BTC_IO_MC_REGS_SIZE;
break;
case CHIP_CAYMAN:
- io_mc_regs = (u32 *)&cayman_io_mc_regs;
+ io_mc_regs = &cayman_io_mc_regs[0][0];
ucode_size = CAYMAN_MC_UCODE_SIZE;
regs_size = BTC_IO_MC_REGS_SIZE;
break;
diff -r 6b1a0b74450e -r 5b97061f0ed4 sys/external/bsd/drm2/dist/drm/radeon/si.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/si.c Sat Nov 22 18:31:03 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/si.c Sat Nov 22 18:50:49 2014 +0000
@@ -1471,7 +1471,7 @@
{
const __be32 *fw_data;
u32 running, blackout = 0;
- u32 *io_mc_regs;
+ const u32 *io_mc_regs;
int i, regs_size, ucode_size;
if (!rdev->mc_fw)
@@ -1481,24 +1481,24 @@
switch (rdev->family) {
case CHIP_TAHITI:
- io_mc_regs = (u32 *)&tahiti_io_mc_regs;
+ io_mc_regs = &tahiti_io_mc_regs[0][0];
regs_size = TAHITI_IO_MC_REGS_SIZE;
break;
case CHIP_PITCAIRN:
- io_mc_regs = (u32 *)&pitcairn_io_mc_regs;
+ io_mc_regs = &pitcairn_io_mc_regs[0][0];
regs_size = TAHITI_IO_MC_REGS_SIZE;
break;
case CHIP_VERDE:
default:
- io_mc_regs = (u32 *)&verde_io_mc_regs;
+ io_mc_regs = &verde_io_mc_regs[0][0];
regs_size = TAHITI_IO_MC_REGS_SIZE;
break;
case CHIP_OLAND:
- io_mc_regs = (u32 *)&oland_io_mc_regs;
+ io_mc_regs = &oland_io_mc_regs[0][0];
regs_size = TAHITI_IO_MC_REGS_SIZE;
break;
case CHIP_HAINAN:
- io_mc_regs = (u32 *)&hainan_io_mc_regs;
+ io_mc_regs = &hainan_io_mc_regs[0][0];
regs_size = TAHITI_IO_MC_REGS_SIZE;
break;
}
Home |
Main Index |
Thread Index |
Old Index