All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Cc: computersforpeace@gmail.com, boris.brezillon@free-electrons.com,
	richard@nod.at, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write()
Date: Tue, 6 Dec 2016 20:00:15 +0100	[thread overview]
Message-ID: <096f8b4c-b00a-af89-e667-7385226c2e7e@gmail.com> (raw)
In-Reply-To: <0078578d0f5d2402ac623afabf601d25998f84a9.1481044434.git.cyrille.pitchen@atmel.com>

On 12/06/2016 06:14 PM, Cyrille Pitchen wrote:
> This patch removes the WARN_ONCE() test in spi_nor_write().
> This macro triggers the display of a warning message almost every time we
> use a UBI file-system because a write operation is performed at offset 64,
> which is in the middle of the SPI NOR memory page. This is a valid
> operation for ubifs.

Is that a valid operation for all spi nors ?

> Hence this warning is pretty annoying and useless so we just remove it.
> 
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
> Suggested-by: Richard Weinberger <richard@nod.at>
> Suggested-by: Andras Szemzo <szemzo.andras@gmail.com>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index c9bcd05ca5d9..cdeb2c6b1492 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1265,9 +1265,6 @@ static int spi_nor_write(struct mtd_info *mtd, loff_t to, size_t len,
>  		ssize_t written;
>  
>  		page_offset = (to + i) & (nor->page_size - 1);
> -		WARN_ONCE(page_offset,
> -			  "Writing at offset %zu into a NOR page. Writing partial pages may decrease reliability and increase wear of NOR flash.",
> -			  page_offset);
>  		/* the size of data remaining on the first page */
>  		page_remain = min_t(size_t,
>  				    nor->page_size - page_offset, len - i);
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-12-06 19:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 17:14 [PATCH 1/1] mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write() Cyrille Pitchen
2016-12-06 19:00 ` Marek Vasut [this message]
2016-12-06 23:38   ` Cyrille Pitchen
2016-12-07  3:07     ` Marek Vasut
2016-12-07  6:21       ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-12-07 13:07         ` Cyrille Pitchen
2016-12-07 13:50           ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-12-07  7:40       ` Boris Brezillon
2016-12-08 15:31 ` Boris Brezillon
2016-12-13 16:43   ` Cyrille Pitchen
2017-02-09  2:23     ` Brian Norris
2017-02-09 13:50       ` Cyrille Pitchen
2017-02-10 18:29         ` Brian Norris

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=096f8b4c-b00a-af89-e667-7385226c2e7e@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.