Hi Adam,
+static void check_and_ack(struct pcc_chan_info *pchan, struct mbox_chan *chan)
+{
+ struct pcc_extended_type_hdr pcc_hdr;
+
+ if (pchan->type != ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE)
+ return;
+ memcpy_fromio(&pcc_hdr, pchan->shmem_base_addr,
+ sizeof(struct pcc_extended_type_hdr));
+ /*
+ * The PCC slave subspace channel needs to set the command complete bit
+ * and ring doorbell after processing message.
+ *
+ * The PCC master subspace channel clears chan_in_use to free channel.
+ */
+ if (!!le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK)
This should be:
if (!!(le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK))
- otherwise you're bitwise testing the result of the '!!'.
Cheers,
Jeremy