lkml.org 
[lkml]   [2021]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH] task_struct::state frobbing
    On Thu, 25 Mar 2021 19:11:37 +0100
    Peter Zijlstra <peterz@infradead.org> wrote:

    > diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
    > index 5a3b65a6eb4f..17ee771e0051 100644
    > --- a/drivers/net/ethernet/qualcomm/qca_spi.c
    > +++ b/drivers/net/ethernet/qualcomm/qca_spi.c
    > @@ -653,8 +653,7 @@ qcaspi_intr_handler(int irq, void *data)
    > struct qcaspi *qca = data;
    >
    > qca->intr_req++;
    > - if (qca->spi_thread &&
    > - qca->spi_thread->state != TASK_RUNNING)
    > + if (qca->spi_thread)
    > wake_up_process(qca->spi_thread);
    >
    > return IRQ_HANDLED;
    > @@ -777,8 +776,7 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
    >
    > netif_trans_update(dev);
    >
    > - if (qca->spi_thread &&
    > - qca->spi_thread->state != TASK_RUNNING)
    > + if (qca->spi_thread)
    > wake_up_process(qca->spi_thread);
    >
    > return NETDEV_TX_OK;

    I would break out the above changes (and the like) into a separate patch,
    as it's changing the logic that doesn't match what the change log is doing.

    That is, I would make all the changes that doesn't care about what the
    state variable is (that is, removing the reference to it) first. Then do
    the type change in a later patch.

    -- Steve

    \
     
     \ /
      Last update: 2021-03-25 19:35    [W:4.620 / U:0.484 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site