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

From: Vadim Fedorenko
Date: Tue Aug 12 2025 - 12:15:20 EST


+ * 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