Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mailbox: prefix new constants with MBOX_

Commit 89e5d7d61600 ("mailbox: remove superfluous internal header")
moved some constants to a public header but forgot to add a mailbox
specific prefix. Add this now to prevent future collisions on a too
generic naming.

Link: https://sashiko.dev/#/patchset/20260327151112.5202-2-wsa%2Brenesas%40sang-engineering.com
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>

authored by

Wolfram Sang and committed by
Jassi Brar
0bd75b7a 22004524

+19 -19
+1 -1
drivers/mailbox/cix-mailbox.c
··· 413 413 switch (cp->type) { 414 414 case CIX_MBOX_TYPE_DB: 415 415 /* Overwrite txdone_method for DB channel */ 416 - chan->txdone_method = TXDONE_BY_ACK; 416 + chan->txdone_method = MBOX_TXDONE_BY_ACK; 417 417 fallthrough; 418 418 case CIX_MBOX_TYPE_REG: 419 419 if (priv->dir == CIX_MBOX_TX) {
+1 -1
drivers/mailbox/imx-mailbox.c
··· 732 732 p_chan = &mbox->chans[chan]; 733 733 734 734 if (type == IMX_MU_TYPE_TXDB_V2) 735 - p_chan->txdone_method = TXDONE_BY_ACK; 735 + p_chan->txdone_method = MBOX_TXDONE_BY_ACK; 736 736 737 737 return p_chan; 738 738 }
+11 -11
drivers/mailbox/mailbox.c
··· 72 72 } 73 73 } 74 74 75 - if (!err && (chan->txdone_method & TXDONE_BY_POLL)) { 75 + if (!err && (chan->txdone_method & MBOX_TXDONE_BY_POLL)) { 76 76 /* kick start the timer immediately to avoid delays */ 77 77 scoped_guard(spinlock_irqsave, &chan->mbox->poll_hrt_lock) 78 78 hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL); ··· 162 162 */ 163 163 void mbox_chan_txdone(struct mbox_chan *chan, int r) 164 164 { 165 - if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ))) { 165 + if (unlikely(!(chan->txdone_method & MBOX_TXDONE_BY_IRQ))) { 166 166 dev_err(chan->mbox->dev, 167 167 "Controller can't run the TX ticker\n"); 168 168 return; ··· 183 183 */ 184 184 void mbox_client_txdone(struct mbox_chan *chan, int r) 185 185 { 186 - if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) { 186 + if (unlikely(!(chan->txdone_method & MBOX_TXDONE_BY_ACK))) { 187 187 dev_err(chan->mbox->dev, "Client can't run the TX ticker\n"); 188 188 return; 189 189 } ··· 344 344 chan->cl = cl; 345 345 init_completion(&chan->tx_complete); 346 346 347 - if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone) 348 - chan->txdone_method = TXDONE_BY_ACK; 347 + if (chan->txdone_method == MBOX_TXDONE_BY_POLL && cl->knows_txdone) 348 + chan->txdone_method = MBOX_TXDONE_BY_ACK; 349 349 } 350 350 351 351 if (chan->mbox->ops->startup) { ··· 499 499 scoped_guard(spinlock_irqsave, &chan->lock) { 500 500 chan->cl = NULL; 501 501 chan->active_req = MBOX_NO_MSG; 502 - if (chan->txdone_method == TXDONE_BY_ACK) 503 - chan->txdone_method = TXDONE_BY_POLL; 502 + if (chan->txdone_method == MBOX_TXDONE_BY_ACK) 503 + chan->txdone_method = MBOX_TXDONE_BY_POLL; 504 504 } 505 505 506 506 module_put(chan->mbox->dev->driver->owner); ··· 531 531 return -EINVAL; 532 532 533 533 if (mbox->txdone_irq) 534 - txdone = TXDONE_BY_IRQ; 534 + txdone = MBOX_TXDONE_BY_IRQ; 535 535 else if (mbox->txdone_poll) 536 - txdone = TXDONE_BY_POLL; 536 + txdone = MBOX_TXDONE_BY_POLL; 537 537 else /* It has to be ACK then */ 538 - txdone = TXDONE_BY_ACK; 538 + txdone = MBOX_TXDONE_BY_ACK; 539 539 540 - if (txdone == TXDONE_BY_POLL) { 540 + if (txdone == MBOX_TXDONE_BY_POLL) { 541 541 542 542 if (!mbox->ops->last_tx_done) { 543 543 dev_err(mbox->dev, "last_tx_done method is absent\n");
+1 -1
drivers/mailbox/mtk-cmdq-mailbox.c
··· 728 728 cmdq->mbox.ops = &cmdq_mbox_chan_ops; 729 729 cmdq->mbox.of_xlate = cmdq_xlate; 730 730 731 - /* make use of TXDONE_BY_ACK */ 731 + /* make use of MBOX_TXDONE_BY_ACK */ 732 732 cmdq->mbox.txdone_irq = false; 733 733 cmdq->mbox.txdone_poll = false; 734 734
+1 -1
drivers/mailbox/omap-mailbox.c
··· 238 238 } 239 239 240 240 if (mbox->send_no_irq) 241 - mbox->chan->txdone_method = TXDONE_BY_ACK; 241 + mbox->chan->txdone_method = MBOX_TXDONE_BY_ACK; 242 242 243 243 omap_mbox_enable_irq(mbox, IRQ_RX); 244 244
+1 -1
drivers/mailbox/tegra-hsp.c
··· 514 514 struct tegra_hsp *hsp = mb->channel.hsp; 515 515 unsigned long flags; 516 516 517 - chan->txdone_method = TXDONE_BY_IRQ; 517 + chan->txdone_method = MBOX_TXDONE_BY_IRQ; 518 518 519 519 /* 520 520 * Shared mailboxes start out as consumers by default. FULL and EMPTY
+3 -3
include/linux/mailbox_controller.h
··· 15 15 /* Sentinel value distinguishing "no active request" from "NULL message data" */ 16 16 #define MBOX_NO_MSG ((void *)-1) 17 17 18 - #define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ 19 - #define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ 20 - #define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */ 18 + #define MBOX_TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ 19 + #define MBOX_TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ 20 + #define MBOX_TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */ 21 21 22 22 /** 23 23 * struct mbox_chan_ops - methods to control mailbox channels