Skip to content

Commit fb6c05b

Browse files
committed
Merge tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers
NXP/FSL SoC driver updates for v5.8 DPAA2 DPIO driver - Prefer the CPU affined DPIO QUICC Engine drivers - Replace one-element array and use struct_size() helper Cleanups in various drivers * tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: dpio: Remove unused inline function qbman_write_eqcr_am_rt_register soc: fsl: qe: clean up an indentation issue soc: fsl: dpio: Prefer the CPU affine DPIO soc: fsl: qbman: Remove unused inline function qm_eqcr_get_ci_stashing soc: fsl: qe: Replace one-element array and use struct_size() helper treewide: Replace zero-length array with flexible-array Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 60b4000 + e9e4ef9 commit fb6c05b

File tree

7 files changed

+10
-23
lines changed

7 files changed

+10
-23
lines changed

drivers/soc/fsl/dpio/dpio-service.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
5858
* If cpu == -1, choose the current cpu, with no guarantees about
5959
* potentially being migrated away.
6060
*/
61-
if (unlikely(cpu < 0))
61+
if (cpu < 0)
6262
cpu = smp_processor_id();
6363

6464
/* If a specific cpu was requested, pick it up immediately */
@@ -70,6 +70,10 @@ static inline struct dpaa2_io *service_select(struct dpaa2_io *d)
7070
if (d)
7171
return d;
7272

73+
d = service_select_by_cpu(d, -1);
74+
if (d)
75+
return d;
76+
7377
spin_lock(&dpio_list_lock);
7478
d = list_entry(dpio_list.next, struct dpaa2_io, node);
7579
list_del(&d->node);

drivers/soc/fsl/dpio/qbman-portal.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -572,18 +572,6 @@ void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, u32 qdid,
572572
#define EQAR_VB(eqar) ((eqar) & 0x80)
573573
#define EQAR_SUCCESS(eqar) ((eqar) & 0x100)
574574

575-
static inline void qbman_write_eqcr_am_rt_register(struct qbman_swp *p,
576-
u8 idx)
577-
{
578-
if (idx < 16)
579-
qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT + idx * 4,
580-
QMAN_RT_MODE);
581-
else
582-
qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT2 +
583-
(idx - 16) * 4,
584-
QMAN_RT_MODE);
585-
}
586-
587575
#define QB_RT_BIT ((u32)0x100)
588576
/**
589577
* qbman_swp_enqueue_direct() - Issue an enqueue command

drivers/soc/fsl/qbman/qman.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,6 @@ static inline int qm_eqcr_init(struct qm_portal *portal,
449449
return 0;
450450
}
451451

452-
static inline unsigned int qm_eqcr_get_ci_stashing(struct qm_portal *portal)
453-
{
454-
return (qm_in(portal, QM_REG_CFG) >> 28) & 0x7;
455-
}
456-
457452
static inline void qm_eqcr_finish(struct qm_portal *portal)
458453
{
459454
struct qm_eqcr *eqcr = &portal->eqcr;

drivers/soc/fsl/qe/qe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
448448
unsigned int i;
449449
unsigned int j;
450450
u32 crc;
451-
size_t calc_size = sizeof(struct qe_firmware);
451+
size_t calc_size;
452452
size_t length;
453453
const struct qe_header *hdr;
454454

@@ -480,7 +480,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
480480
}
481481

482482
/* Validate the length and check if there's a CRC */
483-
calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
483+
calc_size = struct_size(firmware, microcode, firmware->count);
484484

485485
for (i = 0; i < firmware->count; i++)
486486
/*

drivers/soc/fsl/qe/ucc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock,
519519
int clock_bits;
520520
u32 shift;
521521
struct qe_mux __iomem *qe_mux_reg;
522-
__be32 __iomem *cmxs1cr;
522+
__be32 __iomem *cmxs1cr;
523523

524524
qe_mux_reg = &qe_immr->qmx;
525525

include/linux/fsl/bestcomm/bestcomm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
struct bcom_bd {
2929
u32 status;
30-
u32 data[0]; /* variable payload size */
30+
u32 data[]; /* variable payload size */
3131
};
3232

3333
/* ======================================================================== */

include/soc/fsl/qe/qe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ struct qe_firmware {
307307
u8 revision; /* The microcode version revision */
308308
u8 padding; /* Reserved, for alignment */
309309
u8 reserved[4]; /* Reserved, for future expansion */
310-
} __attribute__ ((packed)) microcode[1];
310+
} __packed microcode[];
311311
/* All microcode binaries should be located here */
312312
/* CRC32 should be located here, after the microcode binaries */
313313
} __attribute__ ((packed));

0 commit comments

Comments
 (0)