mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Minchan Kim <minchan@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	"Jens Axboe" <axboe@kernel.dk>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Mike Galbraith" <umgwanakikbuti@gmail.com>
Subject: Re: [PATCH v2 1/3] zram: Replace bit spinlocks with a spinlock_t.
Date: Fri, 5 Jul 2024 14:02:22 +0200	[thread overview]
Message-ID: <801cac51-1bd3-4f79-8474-251a7a81ca08@intel.com> (raw)
In-Reply-To: <20240704121908.GjH4p40u@linutronix.de>

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 4 Jul 2024 14:19:08 +0200

> On 2024-07-04 13:38:04 [+0200], Alexander Lobakin wrote:
>>> index 3acd7006ad2cc..036845cd4f25e 100644
>>> --- a/drivers/block/zram/zram_drv.c
>>> +++ b/drivers/block/zram/zram_drv.c
>>> @@ -57,19 +57,34 @@ static void zram_free_page(struct zram *zram, size_t index);
>>>  static int zram_read_page(struct zram *zram, struct page *page, u32 index,
>>>  			  struct bio *parent);
>>>  
>>> +static void zram_meta_init_table_locks(struct zram *zram, size_t num_pages)
>>> +{
>>> +	size_t index;
>>> +
>>> +	for (index = 0; index < num_pages; index++)
>>
>> Maybe declare @index right here?
> 
> But why? Declarations at the top followed by code. 

I meant

	for (size_t index = 0; index < num_pages; index++)

It's allowed and even recommended for a couple years already.

> 
>>
>>> +		spin_lock_init(&zram->table[index].lock);
>>> +}
>>
>> [...]
>>
>> Thanks,
>> Olek
> 
> Sebastian

Thanks,
Olek

  reply	other threads:[~2024-07-05 12:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 15:28 [PATCH v2 0/3] " Sebastian Andrzej Siewior
2024-06-20 15:28 ` [PATCH v2 1/3] " Sebastian Andrzej Siewior
2024-07-04 11:38   ` Alexander Lobakin
2024-07-04 12:19     ` Sebastian Andrzej Siewior
2024-07-05 12:02       ` Alexander Lobakin [this message]
2024-07-05 12:23         ` Sebastian Andrzej Siewior
2024-07-08  3:03         ` Sergey Senozhatsky
2024-07-08  3:32           ` Sergey Senozhatsky
2024-06-20 15:28 ` [PATCH v2 2/3] zram: Remove ZRAM_LOCK Sebastian Andrzej Siewior
2024-06-20 15:28 ` [PATCH v2 3/3] zram: Shrink zram_table_entry::flags Sebastian Andrzej Siewior
2024-07-04  9:39 ` [PATCH v2 0/3] zram: Replace bit spinlocks with a spinlock_t Sergey Senozhatsky

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=801cac51-1bd3-4f79-8474-251a7a81ca08@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=umgwanakikbuti@gmail.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®