Date: Thu, 12 Feb 2015 07:21:24 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278617 - in stable: 10/sys/dev/drm2/radeon 9/sys/dev/drm2/radeon Message-ID: <201502120721.t1C7LOqu012895@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Thu Feb 12 07:21:22 2015 New Revision: 278617 URL: https://svnweb.freebsd.org/changeset/base/278617 Log: MFC r278004: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1727 MFC r278438: 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 Differential Revision: https://reviews.freebsd.org/D1748 Modified: stable/10/sys/dev/drm2/radeon/ni.c stable/10/sys/dev/drm2/radeon/si.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/drm2/radeon/ni.c stable/9/sys/dev/drm2/radeon/si.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/ni.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { 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) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d 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; Modified: stable/10/sys/dev/drm2/radeon/si.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (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 = (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 = (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?201502120721.t1C7LOqu012895>