Thread (39 messages) 39 messages, 7 authors, 2025-08-15

Re: [PATCH v3 3/5] net: rnpgbe: Add basic mbx ops support

From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: 2025-08-12 16:08:09
Also in: linux-doc, lkml

+ * mucse_read_mbx - Reads a message from the mailbox
+ * @hw: pointer to the HW structure
+ * @msg: the message buffer
+ * @size: length of buffer
+ *
+ * @return: 0 on success, negative on failure
+ **/
+int mucse_read_mbx(struct mucse_hw *hw, u32 *msg, u16 size)
+{
+	struct mucse_mbx_info *mbx = &hw->mbx;
+
+	/* limit read size */
+	min(size, mbx->size);
you have to store the result of min() as it's lost now

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help