forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c
....@@ -1,4 +1,6 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2
+/* Copyright (c) 2019-2020 Marvell International Ltd. */
3
+
24 #include <linux/types.h>
35 #include <asm/byteorder.h>
46 #include <linux/bug.h>
....@@ -420,7 +422,7 @@
420422 if (p_time->hour > 23)
421423 p_time->hour = 0;
422424 if (p_time->min > 59)
423
- p_time->hour = 0;
425
+ p_time->min = 0;
424426 if (p_time->msec > 999)
425427 p_time->msec = 0;
426428 if (p_time->usec > 999)
....@@ -1274,7 +1276,7 @@
12741276 */
12751277 for (offset = 0; offset < size; offset += sizeof(u32)) {
12761278 val = qed_rd(p_hwfn, p_ptt, addr + offset);
1277
- val = be32_to_cpu(val);
1279
+ val = be32_to_cpu((__force __be32)val);
12781280 memcpy(&p_mfw_buf[offset], &val, sizeof(u32));
12791281 }
12801282
....@@ -1323,7 +1325,7 @@
13231325 */
13241326 for (offset = 0; offset < size; offset += sizeof(u32)) {
13251327 memcpy(&val, &p_mfw_buf[offset], sizeof(u32));
1326
- val = cpu_to_be32(val);
1328
+ val = (__force u32)cpu_to_be32(val);
13271329 qed_wr(p_hwfn, p_ptt, addr + offset, val);
13281330 }
13291331