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 No arithmetic on void ...



details:   https://anonhg.NetBSD.org/src/rev/08025f47efaf
branches:  trunk
changeset: 364239:08025f47efaf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:41:13 2018 +0000

description:
No arithmetic on void *.  No dropping volatile on floor.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/cik.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (73 lines):

diff -r 33ebabe3cc5c -r 08025f47efaf sys/external/bsd/drm2/dist/drm/radeon/cik.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/cik.c       Mon Aug 27 06:40:56 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/cik.c       Mon Aug 27 06:41:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $        */
+/*     $NetBSD: cik.c,v 1.6 2018/08/27 06:41:13 riastradh Exp $        */
 
 /*
  * Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  * Authors: Alex Deucher
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.5 2018/08/27 06:38:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cik.c,v 1.6 2018/08/27 06:41:13 riastradh Exp $");
 
 #include <linux/firmware.h>
 #include <linux/slab.h>
@@ -6373,7 +6373,7 @@
                const struct rlc_firmware_header_v1_0 *hdr =
                        (const struct rlc_firmware_header_v1_0 *)rdev->rlc_fw->data;
                const __le32 *fw_data = (const __le32 *)
-                       (rdev->rlc_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                       ((const char *)rdev->rlc_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
 
                radeon_ucode_print_rlc_hdr(&hdr->header);
 
@@ -6869,31 +6869,31 @@
                        if (me == 0) {
                                hdr = (const struct gfx_firmware_header_v1_0 *)rdev->ce_fw->data;
                                fw_data = (const __le32 *)
-                                       (rdev->ce_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                                       ((const char *)rdev->ce_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                                table_offset = le32_to_cpu(hdr->jt_offset);
                                table_size = le32_to_cpu(hdr->jt_size);
                        } else if (me == 1) {
                                hdr = (const struct gfx_firmware_header_v1_0 *)rdev->pfp_fw->data;
                                fw_data = (const __le32 *)
-                                       (rdev->pfp_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                                       ((const char *)rdev->pfp_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                                table_offset = le32_to_cpu(hdr->jt_offset);
                                table_size = le32_to_cpu(hdr->jt_size);
                        } else if (me == 2) {
                                hdr = (const struct gfx_firmware_header_v1_0 *)rdev->me_fw->data;
                                fw_data = (const __le32 *)
-                                       (rdev->me_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                                       ((const char *)rdev->me_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                                table_offset = le32_to_cpu(hdr->jt_offset);
                                table_size = le32_to_cpu(hdr->jt_size);
                        } else if (me == 3) {
                                hdr = (const struct gfx_firmware_header_v1_0 *)rdev->mec_fw->data;
                                fw_data = (const __le32 *)
-                                       (rdev->mec_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                                       ((const char *)rdev->mec_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                                table_offset = le32_to_cpu(hdr->jt_offset);
                                table_size = le32_to_cpu(hdr->jt_size);
                        } else {
                                hdr = (const struct gfx_firmware_header_v1_0 *)rdev->mec2_fw->data;
                                fw_data = (const __le32 *)
-                                       (rdev->mec2_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
+                                       ((const char *)rdev->mec2_fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                                table_offset = le32_to_cpu(hdr->jt_offset);
                                table_size = le32_to_cpu(hdr->jt_size);
                        }
@@ -7946,7 +7946,7 @@
                ring_index = rptr / 4;
 
                radeon_kfd_interrupt(rdev,
-                               (const void *) &rdev->ih.ring[ring_index]);
+                               (const volatile void *) &rdev->ih.ring[ring_index]);
 
                src_id =  le32_to_cpu(rdev->ih.ring[ring_index]) & 0xff;
                src_data = le32_to_cpu(rdev->ih.ring[ring_index + 1]) & 0xfffffff;



Home | Main Index | Thread Index | Old Index