[{"id":1781056,"web_url":"http://patchwork.ozlabs.org/comment/1781056/","msgid":"<20171005215204.GJ25966@bill-the-cat>","list_archive_url":null,"date":"2017-10-05T21:52:04","subject":"Re: [U-Boot] [U-Boot, v2,\n\t2/8] printk: collect printk stuff into <linux/printk.h> with\n\tloglevel support","submitter":{"id":65875,"url":"http://patchwork.ozlabs.org/api/people/65875/","name":"Tom Rini","email":"trini@konsulko.com"},"content":"On Sat, Sep 16, 2017 at 02:10:40PM +0900, Masahiro Yamada wrote:\n\n> When we import code from Linux, with regular re-sync planned, we want\n> to use printk() and pr_*().  U-Boot does not support them in a clean\n> way.  So, people end up with local macros, or compat headers here and\n> there, then we occasionally see build errors of definition conflicts.\n> \n> We have include/linux/compat.h, but putting all sorts of unrelated\n> things into a single header is just a temporal workaround.  Hence this\n> patch, to find the best home for all printk variants.  If you want to\n> use printk() and friends, please include <linux/printk.h>.  This header\n> is self-contained, and pulls in only a few headers.\n> \n> When I was testing this clean-up, I noticed the image size exceeded\n> its platform limit on some boards.  This is because all pr_*() that\n> were previously defined as no-op in include/linux/mtd/mtd.h (unless\n> CONFIG_MTD_DEBUG is set), are now enabled.\n> \n> To make such boards happy, this commit also implements CONFIG_LOGLEVEL.\n> The concept is similar to the kernel parameter \"loglevel\".  (Actually,\n> the Kconfig help message was taken from kernel-paremeter.txt of Linux)\n> Messages with a loglevel smaller than console loglevel will be printed.\n> \n> The difference is the loglevel is build-time determined.  To save the\n> image size, lower priority pr_*() are compiled out.  I set the default\n> of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages\n> are compiled in.\n> \n> I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.\n> \n> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>\n\nApplied to u-boot/master, thanks!","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"R1zsJDUr\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y7RNc1xm8z9t45\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 08:53:36 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid E388AC21C54; Thu,  5 Oct 2017 21:52:29 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id E20B0C21E08;\n\tThu,  5 Oct 2017 21:52:19 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 2A48DC21C62; Thu,  5 Oct 2017 21:52:11 +0000 (UTC)","from mail-qt0-f177.google.com (mail-qt0-f177.google.com\n\t[209.85.216.177])\n\tby lists.denx.de (Postfix) with ESMTPS id 343ABC21DB5\n\tfor <u-boot@lists.denx.de>; Thu,  5 Oct 2017 21:52:08 +0000 (UTC)","by mail-qt0-f177.google.com with SMTP id 6so19062892qtw.3\n\tfor <u-boot@lists.denx.de>; Thu, 05 Oct 2017 14:52:08 -0700 (PDT)","from bill-the-cat ([2606:a000:1401:811b:59d1:8451:efeb:a7b3])\n\tby smtp.gmail.com with ESMTPSA id\n\tb138sm109070ywa.37.2017.10.05.14.52.06\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 05 Oct 2017 14:52:06 -0700 (PDT)"],"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=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=4PfHSXBH/Mq39pKKy7+Vewulgd9zED+Sw+4chDsea8I=;\n\tb=R1zsJDUrqxfegqvW6in+cpQEh6kasLffsEzzKncqtRqnCvfHVJStzWAyhSHPMCk8sn\n\tJh+SzmlWjYwSunX/3OEO8fIm1pQ5MQkctdBVGWG1Eixxy95ymJXSD6+RUHKQ6sdN9cWy\n\tk/P5YfdrOkOIBJlIdBJXs1iEPaYvMxCsdPO04=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=4PfHSXBH/Mq39pKKy7+Vewulgd9zED+Sw+4chDsea8I=;\n\tb=DyukGjtI2IDf3nHzBvGTg7fcmXv1mwcpIftCWt7oANzvbkTlameTSKRzoAJSMnIx4w\n\tZB0zYUtMiKTA42dlv3Kc7bbZZhbTANRKxZRZG2/laAz+l+HoS9vytdOu/YhBVsdyqyjm\n\trLKgWzRNHFEthZMecex2JSUS7CfVxzish3rz4vHxwZQSNjLn20pCl7kdLeNNNETuNkOK\n\tigQ8Mc3ZbvnWQmoKTvqjPH8954cB+WRZ0zKKiOSqu+xNhqKEuanfKAC8CWsQ4+4U1wYD\n\t3c6sjvXKDMQaLmK9S+txXFpmDPyLGxdYEAdSvhFW1iyEuCSGmQSxYTkBY/W+kwNJUZME\n\tg0NA==","X-Gm-Message-State":"AMCzsaXFQR8VyRvu5LMFs6XX1LaEaaf2roQzr7UUVEdjmUfqTMFO8qEj\n\tMhfk4fQKbmCF5Hrguv/v73Nzgw==","X-Google-Smtp-Source":"AOwi7QB1mIB9QXF7BB+BCwDR/XWl5hXHk2dUgfHKIwQOlzfCNgfmgdD+/+CK1tlv2mG855Mjm0DHKA==","X-Received":"by 10.13.234.146 with SMTP id t140mr112930ywe.326.1507240327063; \n\tThu, 05 Oct 2017 14:52:07 -0700 (PDT)","Date":"Thu, 5 Oct 2017 17:52:04 -0400","From":"Tom Rini <trini@konsulko.com>","To":"Masahiro Yamada <yamada.masahiro@socionext.com>","Message-ID":"<20171005215204.GJ25966@bill-the-cat>","References":"<1505538646-19191-3-git-send-email-yamada.masahiro@socionext.com>","MIME-Version":"1.0","In-Reply-To":"<1505538646-19191-3-git-send-email-yamada.masahiro@socionext.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Cc":"Marek Vasut <marex@denx.de>, u-boot@lists.denx.de,\n\tPeter Howard <phoward@gme.net.au>,\n\tStefan Agner <stefan.agner@toradex.com>","Subject":"Re: [U-Boot] [U-Boot, v2,\n\t2/8] printk: collect printk stuff into <linux/printk.h> with\n\tloglevel support","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============0165090044348008388==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]