From patchwork Mon Dec 4 03:36:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 120509 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4312331qgn; Mon, 4 Dec 2017 03:35:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMbKGnJ4gEk25MIWcurf+GqfdiFdj96KH+6y9nJzI6W9bB15doAvAC0YIcT+gdu2sWHBUX8N X-Received: by 10.80.183.148 with SMTP id h20mr9270235ede.53.1512387323290; Mon, 04 Dec 2017 03:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512387323; cv=none; d=google.com; s=arc-20160816; b=bz87X88gOgTJzn8BjBXWa5SarTQhezN7oAWbTN9ysal/haIZNtX/TCEsgFCQc/GCZv 0qdno2RlgdBda7BHRbL7cCEfO01wqNFKVJPeOtgXOBio0R0g9qrif7A508G566ndC3P/ Q8JpTaIMp4A4qFHSTSfJJexQMlLHCGlj1CiLL5rKaGBxmziDTiHgI954acmpTq1JJ0TU vdWtxyR5pcQml5TJE4hB/2yGGbgvb36seZ700FhqYsm3/Ref7XSH3LmgOgyTI9rPyHq1 x/zoFaFiumPdck5/Ev968fQNRdyhZG2H0PzZGQ0fHhtTw6xIL6qzmX5uQ+rWN12eolY0 KnEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=NMojI2tbqEOkAqbuzYq704Snv4MQqkJ5sn+9erRDkQg=; b=jzrLyP+pzmZFMAqEgxDH1eZQiQA5iHj0FRomprq8zLITRb31b0zJkp0Dmdng0xlnZd u4ydYAqd9YC52O6UrKhz43Fn0BEJXz7gIVFeYGrwPxhO2rUu3ZjmGIFzQkaqcuGKYvUJ jX7gSfu0TAcD4A0TswxRlHruX44fs5l0DlPOBLHxzoq6IqBU+PTlK3zFKvvzhGNKA536 JmHwkCNwskKFBSCEcQs/rqNZWIt9pdczp/TtU2kaP+nZ/1whwTVkuY/KlNqEMHUwqWJG IY+rK6hF+R4pNVZ0x+hCYTC4A3vTkSI9o6iJAPLoC7Q5IBnoWFQr5UKI5CK1lmwG+6/E xX8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=co0wV1DQ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id e8si8035721edc.183.2017.12.04.03.35.22; Mon, 04 Dec 2017 03:35:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=co0wV1DQ; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id C6B0EC21E84; Mon, 4 Dec 2017 11:35:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1D21CC21E5A; Mon, 4 Dec 2017 11:31:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 79FFDC2205A; Mon, 4 Dec 2017 03:38:45 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id DEA12C21D75 for ; Mon, 4 Dec 2017 03:38:41 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id vB43bE4o022247; Mon, 4 Dec 2017 12:37:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com vB43bE4o022247 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1512358636; bh=F9ppC5Jnxe5y+4lO7yNF4i+5EbMVTeahcp2UcC/Dncc=; h=From:To:Cc:Subject:Date:From; b=co0wV1DQxkvarnA+eaAkvj6GkAP6P4zBIDLxFQfOyuUr1B/7fE0Z0n1yCk+wjimtu PC51evjWmzy7Bb41SjENm+jysi4TJwhGAg9TTm2+Q0eoliKkVw55i1FGTFneQSN5iu HpjubGWvc5r0MpwpRlBtvbPBqMjwCFJt6w6qRsTr1LoWTJ2HiPT7EZCn0L0pq2llMB UvV85owKVqQOo5/53PvbTa7BLn6fGXuHEKD7mdLsbqEBi3AawGmp1XDHp53kI+tC4L K+AtYcwJRTbHIGz2OThxSbo7x9Knln+aB1Edj8rvU5bjgOsEpsK4GdiQd6ZrGuMxIZ lIhQNPDlsiICw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 4 Dec 2017 12:36:59 +0900 Message-Id: <1512358624-6309-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Mon, 04 Dec 2017 11:31:54 +0000 Cc: Andy Fleming , Chunhe Lan , Marek Vasut , Tom Rini , Alexander Graf , Thomas Weber , Scott Wood , Oleksandr Zhadan and Michael Durrant , Jagan Teki , Po Liu , Peter Tyser , Joe Hershberger , Priyanka Jain , Xiaobo Xie , Tom Warren , Andes Subject: [U-Boot] [PATCH v2 0/5] Remove assert() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" assert() is almost used in the same way as BUG_ON(), except: - the logic is opposite - currently, assert() is compiled only when DEBUG is defined Coccinelle can easily convert assert() to BUG_ON(), but the problem is it would grow the image size. In v2, I introduced CONFIG_ENABLE_BUG_CHECKS. This option is 'n' by default, and makes it BUG_ON etc. into no-op. Masahiro Yamada (5): Move CONFIG_PANIC_HANG to Kconfig Enable CONFIG_PANIC_HANG for boards without do_reset() Introduce CONFIG_ENABLE_BUG_CHECKS to disable BUG{_ON} by default treewide: convert assert() to BUG_ON() Remove assert() README | 10 ---- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 3 + arch/arm/mach-exynos/clock.c | 4 +- arch/arm/mach-tegra/clock.c | 10 ++-- arch/arm/mach-tegra/pinmux-common.c | 80 +++++++++++++-------------- arch/arm/mach-tegra/tegra114/clock.c | 10 ++-- arch/arm/mach-tegra/tegra124/clock.c | 10 ++-- arch/arm/mach-tegra/tegra20/clock.c | 14 ++--- arch/arm/mach-tegra/tegra210/clock.c | 10 ++-- arch/arm/mach-tegra/tegra30/clock.c | 10 ++-- arch/powerpc/cpu/mpc85xx/Kconfig | 37 +++++++++++++ arch/sandbox/cpu/state.c | 4 +- arch/x86/cpu/intel_common/mrc.c | 2 +- arch/x86/lib/efi/efi.c | 2 +- arch/x86/lib/fsp/fsp_support.c | 6 +- arch/x86/lib/physmem.c | 5 +- board/freescale/qemu-ppce500/qemu-ppce500.c | 8 +-- cmd/bootefi.c | 2 +- cmd/mtdparts.c | 2 +- cmd/tpm_test.c | 28 +++++----- common/dlmalloc.c | 86 ++++++++++++++--------------- common/fdt_support.c | 2 +- common/hwconfig.c | 36 ++++++------ configs/TWR-P1025_defconfig | 1 + configs/UCP1020_SPIFLASH_defconfig | 1 + configs/UCP1020_defconfig | 1 + configs/adp-ae3xx_defconfig | 1 + configs/cl-som-imx7_defconfig | 1 + configs/evb-rk3229_defconfig | 1 + configs/mccmon6_sd_defconfig | 1 + configs/opos6uldev_defconfig | 1 + configs/qemu-ppce500_defconfig | 1 + configs/tricorder_defconfig | 1 + configs/tricorder_flash_defconfig | 1 + configs/uniphier_ld4_sld8_defconfig | 1 + configs/uniphier_v7_defconfig | 1 + configs/uniphier_v8_defconfig | 1 + configs/xpedite517x_defconfig | 1 + configs/xpedite520x_defconfig | 1 + configs/xpedite537x_defconfig | 1 + configs/xpedite550x_defconfig | 1 + drivers/clk/clk-uclass.c | 2 +- drivers/clk/rockchip/clk_rk3036.c | 23 ++++---- drivers/clk/rockchip/clk_rk3128.c | 27 ++++----- drivers/clk/rockchip/clk_rk3188.c | 28 ++++------ drivers/clk/rockchip/clk_rk322x.c | 23 ++++---- drivers/clk/rockchip/clk_rk3288.c | 36 +++++------- drivers/clk/rockchip/clk_rk3328.c | 8 +-- drivers/clk/rockchip/clk_rk3368.c | 4 +- drivers/clk/rockchip/clk_rk3399.c | 51 +++++++---------- drivers/clk/rockchip/clk_rv1108.c | 2 +- drivers/core/device-remove.c | 8 +-- drivers/core/device.c | 2 +- drivers/core/ofnode.c | 24 ++++---- drivers/core/uclass.c | 4 +- drivers/gpio/gpio-uclass.c | 2 +- drivers/i2c/i2c-uclass.c | 2 +- drivers/input/input.c | 4 +- drivers/input/key_matrix.c | 2 +- drivers/misc/cros_ec.c | 10 ++-- drivers/misc/cros_ec_i2c.c | 4 +- drivers/mtd/nand/tegra_nand.c | 2 +- drivers/mtd/spi/sandbox.c | 4 +- drivers/net/fsl-mc/mc.c | 2 +- drivers/phy/phy-uclass.c | 2 +- drivers/power/tps6586x.c | 4 +- drivers/rtc/rtc-uclass.c | 10 ++-- drivers/sound/sound.c | 2 +- drivers/spi/exynos_spi.c | 6 +- drivers/usb/emul/sandbox_flash.c | 2 +- drivers/usb/host/usb-uclass.c | 4 +- drivers/video/stb_truetype.h | 2 +- fs/ext4/dev.c | 2 +- fs/ext4/ext4_common.c | 2 +- fs/ext4/ext4_journal.c | 2 +- fs/fat/fat.c | 2 +- include/common.h | 15 ----- include/configs/B4860QDS.h | 1 - include/configs/C29XPCIE.h | 1 - include/configs/MPC8536DS.h | 1 - include/configs/MPC8544DS.h | 1 - include/configs/MPC8572DS.h | 1 - include/configs/P1010RDB.h | 1 - include/configs/P1023RDB.h | 2 - include/configs/P2041RDB.h | 1 - include/configs/T102xQDS.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T1040QDS.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/T4240RDB.h | 1 - include/configs/UCP1020.h | 1 - include/configs/adp-ae3xx.h | 1 - include/configs/corenet_ds.h | 1 - include/configs/cyrus.h | 1 - include/configs/ls1012a_common.h | 1 - include/configs/ls1088a_common.h | 2 - include/configs/ls2080a_common.h | 2 - include/configs/p1_p2_rdb_pc.h | 1 - include/configs/p1_twr.h | 1 - include/configs/qemu-ppce500.h | 1 - include/configs/t4qds.h | 1 - include/configs/tricorder.h | 1 - include/configs/uniphier.h | 2 - include/configs/xpedite517x.h | 1 - include/configs/xpedite520x.h | 1 - include/configs/xpedite537x.h | 1 - include/configs/xpedite550x.h | 1 - include/configs/xtfpga.h | 4 -- include/dm/ofnode.h | 4 +- include/efi_loader.h | 12 ++-- include/linux/bug.h | 9 ++- lib/Kconfig | 17 ++++++ lib/circbuf.c | 16 +++--- lib/efi_loader/efi_boottime.c | 2 +- lib/efi_loader/efi_device_path.c | 2 +- lib/efi_loader/efi_file.c | 2 +- lib/efi_loader/efi_memory.c | 2 +- lib/fdtdec.c | 8 +-- lib/membuff.c | 4 +- lib/physmem.c | 4 +- lib/qsort.c | 2 +- lib/slre.c | 8 +-- lib/tiny-printf.c | 9 --- lib/vsprintf.c | 9 --- net/eth-uclass.c | 2 +- net/eth_legacy.c | 2 +- net/net.c | 2 +- test/command_ut.c | 30 +++++----- test/compression.c | 16 +++--- test/print_ut.c | 42 +++++++------- 130 files changed, 466 insertions(+), 504 deletions(-)