The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] zram: cut the trailing new-line in algorithm name
Date: Fri, 22 May 2015 22:09:01 +0900	[thread overview]
Message-ID: <20150522130901.GB3793@swordfish> (raw)
In-Reply-To: <1432287274-7638-1-git-send-email-sergey.senozhatsky@gmail.com>

On (05/22/15 18:34), Sergey Senozhatsky wrote:
[..]
>  	down_write(&zram->init_lock);
>  	if (init_done(zram)) {
>  		up_write(&zram->init_lock);
> @@ -371,6 +378,11 @@ static ssize_t comp_algorithm_store(struct device *dev,
>  	}
>  	strlcpy(zram->compressor, buf, sizeof(zram->compressor));
>  	up_write(&zram->init_lock);
> +
> +	/* cut the trailing new-line */
> +	sz = strlen(zram->compressor) - 1;
> +	if (zram->compressor[sz] == '\n')
> +		zram->compressor[sz] = 0x00;

oh, how did it escape from the ->init_lock scope... will resend. sorry.

	-ss


      reply	other threads:[~2015-05-22 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  9:34 [PATCH] zram: cut the trailing new-line in algorithm name Sergey Senozhatsky
2015-05-22 13:09 ` Sergey Senozhatsky [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=20150522130901.GB3793@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky@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