Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756377AbaJXLqO (ORCPT ); Fri, 24 Oct 2014 07:46:14 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:42161 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756260AbaJXLqM (ORCPT ); Fri, 24 Oct 2014 07:46:12 -0400 MIME-Version: 1.0 In-Reply-To: <1414073085-19296-2-git-send-email-wangzhou.bry@gmail.com> References: <1414073085-19296-1-git-send-email-wangzhou.bry@gmail.com> <1414073085-19296-2-git-send-email-wangzhou.bry@gmail.com> Date: Fri, 24 Oct 2014 19:46:11 +0800 Message-ID: Subject: Re: [PATCH v2 1/2] mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc From: Haojian Zhuang To: Zhou Wang Cc: David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, Mark Rutland , pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, Rob Herring , galak@codeaurora.org, caizhiyong@huawei.com, "xuwei (O)" , wangzhou1@hisilicon.com, "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 23, 2014 at 10:04 PM, Zhou Wang wrote: > Signed-off-by: Zhou Wang > --- > drivers/mtd/nand/Kconfig | 5 + > drivers/mtd/nand/Makefile | 1 + > drivers/mtd/nand/hisi504_nand.c | 836 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 842 insertions(+) > create mode 100644 drivers/mtd/nand/hisi504_nand.c > I think that you need to run scripts/checkpatch.pl. There're some warnings reported on this patch. > + > + case NAND_CMD_SEQIN: > + host->offset = column; > + It's better not using waterfall style. Maybe you can write it clearly. case NAND_CMD_SEQIN: host->offset = column; set_addr(mtd, column, page_addr); break; > + chip->ecc.mode = of_get_nand_ecc_mode(np); > + /* read ecc-bits from dts */ > + of_property_read_u32(np, "hisi,nand-ecc-bits", &host->ecc_bits); Do you need to check the ecc_bits at here? Maybe user inputed the wrong ecc_bits in DTS. Best Regards Haojian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/