Date: Mon, 9 Feb 2015 07:56:51 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278438 - head/sys/dev/drm2/radeon Message-ID: <201502090756.t197upWX086163@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Feb 9 07:56:50 2015 New Revision: 278438 URL: https://svnweb.freebsd.org/changeset/base/278438 Log: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1748 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c ============================================================================== --- head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (const 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 = (const 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 = (const 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 = (const 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; Modified: head/sys/dev/drm2/radeon/si.c ============================================================================== --- head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (const u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (const u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (const u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502090756.t197upWX086163>