Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754052AbcLFROu (ORCPT ); Tue, 6 Dec 2016 12:14:50 -0500 Received: from smtpout.microchip.com ([198.175.253.82]:33715 "EHLO email.microchip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752291AbcLFROt (ORCPT ); Tue, 6 Dec 2016 12:14:49 -0500 From: Cyrille Pitchen To: CC: , , , , , Cyrille Pitchen Subject: [PATCH 1/1] mtd: spi-nor: remove WARN_ONCE() message in spi_nor_write() Date: Tue, 6 Dec 2016 18:14:24 +0100 Message-ID: <0078578d0f5d2402ac623afabf601d25998f84a9.1481044434.git.cyrille.pitchen@atmel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: H4sIAAAAAAAAC+NgFvrEosTGxcLF5cOiy/HJLcJg1rwHtzgsrs/bx2zRMWUVk8X9a6dZLDa0r2WyuPdpG6MDawBDFGtmXlJ+RQJrxqnjexkL5nNV7L/XwtLAuJ6ji5GLQ0hgHaPE6i0zWboYOTnYBAwl3j44ygpiiwhISmw4cYERpIhZ4DijxIIVr9lAEsICARKbzrcA2RwcLAIqEo/2RoCEeQXiJY4cuMwMYksIyEncPNfJDBEXlDg58wnYfGYBCYmDL16AxYUE1CQWtqyAqg+UOHa4jxHCdpJ4vu4mG4RtJ3F4+kV2CNtBomvBb2aYmqePL0LZ2hLbX+1jhbB1JLYd7GeBsG0l9syYyARhu0s8eLQcyvaVmPWwAaomSqJtyWa2CYxis5CcOgvJqQsYmVYxSjt7+OkGh+m6Rjh7GJjr5SZnFOjmJmbm6SXn525ihMRHzg7GyZP8DzFKcjApifJunXQ+XIgvKT+lMiOxOCO+qDQntfgQowQHj5IIL/8yoBxvcUFibnFmOkxKhoNDSYL38VKglGBRanpqRVpmTklqEUT6FKOklDjvR5CkAEhfRmkeXO4So6iUMG8USI6nILUoN7MEIn6LUZjjIZMQS15+XqoU0IkMQKDB+IpRnINRSZhXGuQGnsy8ErgTXgFdxwR03brdp0GuK0lESEk1MFoExa5pqrGSyLB3XdK+RlVq09Gma+q/yzyZnxxM6dyodNLQ1USn7eKfi7kBvsuSaoKObwtpfpLblFbBclo5uvCKl9nuGUxZ9W6nJFMt67rSBJS+5u1K3FS8J2rtlSufi2+52Jp5Lmz78G15k0/RziOTv7zPZpdT9LW8PPPMcnNJM2lZqwZNJZbijERDLeai4kQA6OnQsAUDAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 31 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. Hence this warning is pretty annoying and useless so we just remove it. Signed-off-by: Cyrille Pitchen Suggested-by: Richard Weinberger Suggested-by: Andras Szemzo --- 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); -- 2.7.4