mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: 郭力豪 <lhjeff911@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	呂芳騰LuWells <wells.lu@sunplus.com>, "lh.kuo" <lh.kuo@sunplus.com>,
	nathan@kernel.org
Subject: Re: [PATCH] spi: remove spin_lock_irq in the irq procress
Date: Sat, 16 Apr 2022 08:49:13 -0700	[thread overview]
Message-ID: <d8cddce3-c353-e8e9-9221-84eed6d28b69@redhat.com> (raw)
In-Reply-To: <CAGcXWkzZex-XTEoq8H5mc+3Y2BH=cphdpH-815Y+TAq812K=8g@mail.gmail.com>


On 4/14/22 6:16 AM, 郭力豪 wrote:
> Hi Tom :
>
>      This SPI driver only handles one transfer at a time.
> That's why locks are not needed.

Please add this statement to the commit log.

In a commit log, not only do I look for what was changed but also why 
the change was made.

Tom

>
>
> Li-hao Kuo
>
> Tom Rix <trix@redhat.com> 於 2022年4月13日 週三 下午7:45寫道:
>>
>> On 4/12/22 6:38 PM, Li-hao Kuo wrote:
>>> - remove spin_lock_irq and spin_unlock_irq in the irq funciton
>> function
>>
>> I was expecting a statement on why is the lock is not needed.
>>
>> Could you add one ?
>>
>> Tom
>>
>>> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com>
>>> ---
>>>    drivers/spi/spi-sunplus-sp7021.c | 4 +---
>>>    1 file changed, 1 insertion(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/spi/spi-sunplus-sp7021.c b/drivers/spi/spi-sunplus-sp7021.c
>>> index f989f7b..120623c 100644
>>> --- a/drivers/spi/spi-sunplus-sp7021.c
>>> +++ b/drivers/spi/spi-sunplus-sp7021.c
>>> @@ -199,8 +199,6 @@ static irqreturn_t sp7021_spi_master_irq(int irq, void *dev)
>>>        if (tx_len == 0 && total_len == 0)
>>>                return IRQ_NONE;
>>>
>>> -     spin_lock_irq(&pspim->lock);
>>> -
>>>        rx_cnt = FIELD_GET(SP7021_RX_CNT_MASK, fd_status);
>>>        if (fd_status & SP7021_RX_FULL_FLAG)
>>>                rx_cnt = pspim->data_unit;
>>> @@ -239,7 +237,7 @@ static irqreturn_t sp7021_spi_master_irq(int irq, void *dev)
>>>
>>>        if (isrdone)
>>>                complete(&pspim->isr_done);
>>> -     spin_unlock_irq(&pspim->lock);
>>> +
>>>        return IRQ_HANDLED;
>>>    }
>>>


      reply	other threads:[~2022-04-16 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  1:38 Li-hao Kuo
2022-04-13 11:32 ` Mark Brown
2022-04-14 13:18   ` 郭力豪
2022-04-13 11:45 ` Tom Rix
2022-04-14 13:16   ` 郭力豪
2022-04-16 15:49     ` Tom Rix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8cddce3-c353-e8e9-9221-84eed6d28b69@redhat.com \
    --to=trix@redhat.com \
    --cc=broonie@kernel.org \
    --cc=lh.kuo@sunplus.com \
    --cc=lhjeff911@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=wells.lu@sunplus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®