From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1C7BC43217 for ; Thu, 1 Dec 2022 11:42:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 29B7B83013; Thu, 1 Dec 2022 12:42:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="SGUcGunC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29E8085161; Thu, 1 Dec 2022 12:42:38 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C88C981A0C for ; Thu, 1 Dec 2022 12:42:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rogerq@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4B9E9B81F15; Thu, 1 Dec 2022 11:42:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11575C433D6; Thu, 1 Dec 2022 11:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669894954; bh=jk6dBkjntw8Lm2rnRchxtzhkc/nUqjozLkI8qY0JGlY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SGUcGunCIsmN9NETRzGUDVOUYPo16D2dgiObtqMqxnRvPwq66UFdf+/J2ouazkm40 rLcfTG0TTJMnhq496Xu9bY6iC+FUznEOTVzkBstPObxvBYVdcNSwnMFsRP7zqHAyY2 3/Emg0ne3SeoosQIp/mpYIRRyoagfa4R7/olZvbb4IrU4w1QPIdSc0EPCkMbNZzcKz ZULBMmxYv2N/zrp7yDDjTCKEZpJ+Z15TEhxZIw4ce8uK3Ze7NfkE91bvP4uRgT+Yri 5OV1eTc/62V94g3X70GZ+oCK8vQZlu3TU0Kzztl9GUFiMiBY6aJUAsvvcdALb9iE2i vl+hcd0NikfTw== Message-ID: <4aa9cc3d-fa9e-b05f-6a75-0bcade5c62da@kernel.org> Date: Thu, 1 Dec 2022 13:42:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [u-boot][PATCH 05/14] mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction To: Dario Binacchi , Tom Rini Cc: michael@amarulasolutions.com, u-boot@lists.denx.de References: <20221011115012.6181-1-rogerq@kernel.org> <20221011115012.6181-6-rogerq@kernel.org> <20221129161759.GU3787616@bill-the-cat> Content-Language: en-US From: Roger Quadros In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 30/11/2022 10:11, Dario Binacchi wrote: > Hi Tom, > > On Tue, Nov 29, 2022 at 5:18 PM Tom Rini wrote: >> >> On Tue, Nov 29, 2022 at 04:25:13PM +0100, Dario Binacchi wrote: >>> Hi Roger, >>> >>> On Tue, Oct 11, 2022 at 1:50 PM Roger Quadros wrote: >>>> >>>> The BCH detection hardware can generate ECC bytes for multiple >>>> sectors in one go. Use that feature. >>>> >>>> correct() only corrects one sector at a time so we need to call it >>>> repeatedly for each sector. >>>> >>>> Signed-off-by: Roger Quadros >> [snip] >>>> +/** >>>> + * omap_calculate_ecc_bch - ECC generator for 1 sector >>>> + * @mtd: MTD device structure >>>> + * @dat: The pointer to data on which ecc is computed >>>> + * @ecc_code: The ecc_code buffer >>>> + * >>>> + * Support calculating of BCH4/8/16 ECC vectors for one sector. This is used >>>> + * when SW based correction is required as ECC is required for one sector >>>> + * at a time. >>>> + */ >>>> +static int omap_calculate_ecc_bch(struct mtd_info *mtd, >>>> + const u_char *dat, u_char *ecc_calc) >>> >>> Please add __maybe_unused. Without it the CI/CD pipeline fails: >>> >>> arm: + devkit8000 >>> +drivers/mtd/nand/raw/omap_gpmc.c:442:12: error: >>> 'omap_calculate_ecc_bch' defined but not used >>> [-Werror=unused-function] >>> + 442 | static int omap_calculate_ecc_bch(struct mtd_info *mtd, >>> + | ^~~~~~~~~~~~~~~~~~~~~~ >>> +cc1: all warnings being treated as errors >> >> While not a firm rule, a general suggestion is if it's easy to fix a CI >> error like this, do so (and add Signed-off-by tag) during testing a PR >> rather than ask for a resubmit. Unless there's other more complex >> changes needed as well. > > I'll do it. Thanks for the suggestion and the explanation. Thanks for saving me from a re-spin. :) -- cheers, -roger