Skip to content

Commit

Permalink
media: ti-vpe: cal: Remove isvcirqset() and isportirqset() macros
Browse files Browse the repository at this point in the history
The isvcirqset() isn't used. The isportirqset() doesn't increase
readability. Inline the latter and simply drop the former.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Benoit Parrot <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
pinchartl authored and sigmaris committed Aug 8, 2020
1 parent 1fc0285 commit 4c0ba11
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/media/platform/ti-vpe/cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,11 +1265,6 @@ static inline void cal_process_buffer_complete(struct cal_ctx *ctx)
ctx->cur_frm = ctx->next_frm;
}

#define isvcirqset(irq, vc, ff) (irq & \
(CAL_CSI2_VC_IRQENABLE_ ##ff ##_IRQ_##vc ##_MASK))

#define isportirqset(irq, port) (irq & CAL_HL_IRQ_MASK(port))

static irqreturn_t cal_irq(int irq_cal, void *data)
{
struct cal_dev *cal = data;
Expand Down Expand Up @@ -1309,7 +1304,7 @@ static irqreturn_t cal_irq(int irq_cal, void *data)
reg_write(cal, CAL_HL_IRQSTATUS(1), status);

for (i = 0; i < ARRAY_SIZE(cal->ctx); ++i) {
if (isportirqset(status, i)) {
if (status & CAL_HL_IRQ_MASK(i)) {
ctx = cal->ctx[i];

spin_lock(&ctx->slock);
Expand All @@ -1332,7 +1327,7 @@ static irqreturn_t cal_irq(int irq_cal, void *data)
reg_write(cal, CAL_HL_IRQSTATUS(2), status);

for (i = 0; i < ARRAY_SIZE(cal->ctx); ++i) {
if (isportirqset(status, i)) {
if (status & CAL_HL_IRQ_MASK(i)) {
ctx = cal->ctx[i];
dma_q = &ctx->vidq;

Expand Down

0 comments on commit 4c0ba11

Please sign in to comment.